Extraction

Proxy and Geo-Targeting

The Scraper API can route extraction requests through Geonode proxies.

If you do not provide a proxy object, the API uses residential proxies by default and automatically determines the most appropriate routing location when possible.

Geo-targeting is useful when a website returns different content, language, pricing, availability, or search results based on the visitor's location.

Configure a Proxy

Use the proxy object to control the country and proxy type used for the extraction request.

Request

request.sh
curl -X POST "https://scraper.geonode.io/v1/extract" \
  -H "X-Api-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://example.com",
    "proxy": {
      "country": "US",
      "type": "residential"
    }
  }'

Country Codes

The proxy.country field uses standard ISO 3166-1 alpha-2 country codes.

CountryCode
United StatesUS
United KingdomGB
GermanyDE
PakistanPK
CanadaCA
FranceFR

For the complete list of supported country codes:

https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2

Proxy Types

Residential

Routes requests through residential IP addresses.

request.json
{
  "proxy": {
    "type": "residential"
  }
}

Datacenter

Routes requests through datacenter IP addresses.

request.json
{
  "proxy": {
    "type": "datacenter"
  }
}

Mix

Allows the API to use a combination of available proxy networks.

request.json
{
  "proxy": {
    "type": "mix"
  }
}

Proxy Configuration Reference

FieldTypeDescription
proxy.countrystring or nullTwo-letter ISO country code such as US, GB, DE, or PK.
proxy.typestringProxy type. Supported values are residential, datacenter, and mix. Defaults to residential.

Verify the Applied Proxy

The proxy configuration used for the request is returned in the response metadata.

Response

response.json
{
  "data": {
    "html": "<!doctype html>..."
  },
  "metadata": {
    "url": "http://example.com/",
    "proxy": {
      "country": "US",
      "type": "residential"
    },
    "processing_mode": "sync"
  },
  "tokens_charged": 1
}

You can inspect metadata.proxy.country and metadata.proxy.type to verify which proxy configuration was applied during extraction.

Success

You now know how to control the country and proxy network used for extraction requests.

Next Steps

Continue to Using Custom Headers to learn how to send additional HTTP headers with extraction requests.

On this page