Extraction
Using Custom Headers
Use the headers object to send custom HTTP headers with the extraction request.
Important
{
"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
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
| Header | Purpose |
|---|---|
Accept-Language | Request content in a specific language |
User-Agent | Identify the browser or client making the request |
Referer | Indicate the page that initiated the request |
Cookie | Send session or authentication cookies |
Multiple Headers
You can send multiple headers in a single request.
{
"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.