Rotating Proxies
Scrapingdog's rotating proxies let you use a standard HTTP proxy configuration instead of the REST API. Point your scraper at the proxy exactly like any normal rotating proxy and request pages as usual.
Behind the scenes the proxy inspects the requested URL and transparently reroutes it to the matching Scrapingdog API (Google Search, Images, Shopping, News, Maps, Scholar, Bing, DuckDuckGo, Amazon, Walmart), returning the result as HTML. Any URL that doesn't match a dedicated API is scraped through the generic Web Scraping API (/scrape). From your side, it is simply "a proxy that returns the page HTML".
Endpoint:
http://proxy.scrapingdog.com:8081 Proxy format:
HTTP vs HTTPS:
http://scrapingdog:[email protected]:8081HTTP vs HTTPS:
http:// targets work with no special flags. https:// targets work too, but your client must disable SSL verification (curl -k, Python verify=False, etc.) because the proxy terminates the TLS tunnel itself to read and reroute the URL. If you don't want to disable SSL verification, use the http:// form of the target URL β the proxy always fetches the https version from Scrapingdog either way.API Parameters
π
Proxy Configuration
HostRequiredproxy.scrapingdog.com
Type: StringPortRequired8081
Type: IntegerUsernameRequiredscrapingdog
Type: StringPasswordRequiredYour personal API key from your dashboard.
Authentication uses standard proxy Basic auth (theProxy-Authorizationheader).
Type: String
β
οΈ Request Options (generic /scrape only)
dynamicOptionalEnable JavaScript rendering. Maps to the Scrapingdogdynamicparameter.
Type: BooleancountryOptionalGeotarget the request using a two-letter country code (e.g.us). Maps tocountry.
Type: StringstealthOptionalUse stealth proxies. Maps to the Scrapingdogstealth_proxyparameter.
Type: BooleanpremiumOptionalUse premium residential proxies. Maps topremium.
Type: BooleanwaitOptionalWait this many milliseconds before capturing the page. Maps towait.
Type: Integer
π¨
How to Pass Request Options
Username directivesOptionalEncode the options directly in the proxy string as dotted key/value pairs. A bare directive meanstrue.http://scrapingdog.dynamic=true.country=us.stealth:[email protected]:8081X-Sd-* headersOptionalSend options as per-request headers. These override any username directives.X-Sd-Dynamic: trueX-Sd-Country: usX-Sd-Stealth: true
π‘
Response & Error Codes
SuccessOptionalAlways returned asContent-Type: text/htmlβ the page HTML.407OptionalProxy Authentication Required β missing or invalid proxy credentials.401 / 403OptionalUpstream Scrapingdog error (e.g. an invalid API key). The status and body are forwarded as-is.400OptionalThe target URL could not be parsed.502OptionalThe proxy could not reach Scrapingdog.Health checkOptionalUnauthenticated endpoint for uptime monitoring:GET http://proxy.scrapingdog.com:8081/healthβ{"status":"ok"}
π
Notes & Limitations
Always fetches HTTPSOptionalThe proxy always requests the https version of the target from Scrapingdog, regardless of whether you usedhttp://orhttps://.HTTPS needs insecure modeOptionalIntercepting HTTPS requires your client to skip certificate verification. There is no way around this other than trusting a custom CA, or using thehttp://form of the target URL.Credit costOptionalCredits are billed per the specific API a URL routes to β a Google search costs Google Search API credits, not generic scraper credits. On/scrape, options likepremium,stealthanddynamicchange the credit cost.Allowed options onlyOptionalOnly the documented option keys are forwarded; unknown keys are dropped. Clients cannot overrideapi_keyorurl.
API Examples
Code to Integrate
# HTTP target (no special flags) curl -x "http://scrapingdog:[email protected]:8081" \ "http://www.google.com/search?q=coffee" # HTTPS target (disable SSL verification) curl -k -x "http://scrapingdog:[email protected]:8081" \ "https://www.amazon.com/dp/B08N5WRWNW" # With options (generic /scrape) via username directives curl -k -x "http://scrapingdog.dynamic=true.country=us:[email protected]:8081" \ "https://example.com"
import requests proxies = { "http": "http://scrapingdog:[email protected]:8081", "https": "http://scrapingdog:[email protected]:8081", } r = requests.get( "https://www.google.com/search?q=coffee", proxies=proxies, verify=False, # required for https targets ) print(r.text)
const axios = require("axios"); const { HttpsProxyAgent } = require("https-proxy-agent"); const agent = new HttpsProxyAgent( "http://scrapingdog:[email protected]:8081" ); axios .get("https://www.google.com/search?q=coffee", { httpAgent: agent, httpsAgent: agent, proxy: false, // disable TLS verification for https targets: // (or set NODE_TLS_REJECT_UNAUTHORIZED=0) }) .then((res) => console.log(res.data));
require "net/http" require "uri" uri = URI("https://www.google.com/search?q=coffee") proxy = Net::HTTP.new(uri.host, uri.port, "proxy.scrapingdog.com", 8081, "scrapingdog", "APIKEY") proxy.use_ssl = true proxy.verify_mode = OpenSSL::SSL::VERIFY_NONE # required for https targets puts proxy.get(uri).body
<?php $ch = curl_init("https://www.google.com/search?q=coffee"); curl_setopt($ch, CURLOPT_PROXY, "http://proxy.scrapingdog.com:8081"); curl_setopt($ch, CURLOPT_PROXYUSERPWD, "scrapingdog:APIKEY"); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); // required for https targets curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0); echo curl_exec($ch); curl_close($ch);
import java.io.*; import java.net.*; import javax.net.ssl.*; public class Main { public static void main(String[] args) throws Exception { // Proxy Basic auth Authenticator.setDefault(new Authenticator() { protected PasswordAuthentication getPasswordAuthentication() { return new PasswordAuthentication("scrapingdog", "APIKEY".toCharArray()); } }); Proxy proxy = new Proxy(Proxy.Type.HTTP, new InetSocketAddress("proxy.scrapingdog.com", 8081)); URL url = new URL("https://www.google.com/search?q=coffee"); HttpURLConnection con = (HttpURLConnection) url.openConnection(proxy); // NOTE: for https targets, install a trust-all SSLSocketFactory (verify off). BufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream())); String line; while ((line = in.readLine()) != null) System.out.println(line); in.close(); } }