Scraping

Proxies

Datacenter or premium, by country, with an optional sticky IP.

proxy_type is required on every scrape. It is the biggest lever on both success rate and cost.

TypeWhat it isWhen to use it
datacenterServer IPs. Fast, cheap.The default worth trying first.
premiumResidential IPs.The site blocks datacenter ranges, or you need a consumer-looking IP.

Start on datacenter and move up only when you see blocks. The cost difference is 10x before rendering is counted — see Credits.

Countries

country_code takes an ISO 3166-1 alpha-2 code and works on both proxy types.

{
  "url": "https://example.com",
  "proxy_type": "premium",
  "country_code": "ae"
}

You can stack up to 10, comma-separated, and the exit IP will be in any one of them:

{ "country_code": "us,gb,de" }

A request is only served by a provider that supports the type and the country you asked for — and for several countries, one that supports stacking. If none does, the request returns 400 rather than quietly giving you an IP somewhere else.

Case and spacing do not matter: US, gb and us,gb are the same request.

Sticky sessions

By default every request gets a fresh exit IP. When a site ties state to the IP — a cart, a search session, a rate limit keyed on address — pin it:

{
  "url": "https://example.com/cart",
  "proxy_type": "premium",
  "proxy_session": "cart7f2a",
  "proxy_session_lifetime": "30m"
}
  • proxy_session is letters and digits, up to 32 characters. Requests sharing the id share the exit IP.
  • proxy_session_lifetime is a number then s, m or h. Omit it for the provider’s default. It requires proxy_session; sending it alone is a bad_request.
  • Only providers that support sticky sessions will serve the request.

Some providers require an exact session-id length — IPRoyal wants 8 characters. If a sticky request fails where a plain one succeeds, check the length before anything else.

A sticky session pins the IP. It does not carry cookies or a login; that is Sessions and logins.