Extraction

Using Custom Headers

Use the headers object to send custom HTTP headers with the extraction request.

Important

request.json
{
  "url": "https://example.com",
  "headers": {
    "Accept-Language": "en-US,en;q=0.9"
  }
}

Do not put your Geonode API key inside headers.

Authentication belongs in the X-Api-Key request header sent to the Scraper API.

Send Custom Headers

Use the headers object to include one or more HTTP headers in your 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://geonode.com/",
    "headers": {
      "Accept-Language": "en-US,en;q=0.9",
      "User-Agent": "Mozilla/5.0"
    }
  }'

Common Headers

HeaderPurpose
Accept-LanguageRequest content in a specific language
User-AgentIdentify the browser or client making the request
RefererIndicate the page that initiated the request
CookieSend session or authentication cookies

Multiple Headers

You can send multiple headers in a single request.

request.json
{
  "url": "https://geonode.com/",
  "headers": {
    "Accept-Language": "en-US,en;q=0.9",
    "User-Agent": "Mozilla/5.0"
  }
}

Success

You now know how to send custom HTTP headers during extraction requests.

Next Steps

Continue to Link Extraction to learn how to return links found on a webpage along with its extracted content.

On this page