Sessions | cURL
Learn how to reuse the same proxy for multiple requests with ScraperAPI in cURL using session_number. Great for logins, carts, and browsing emulation.
To reuse the same proxy for multiple requests, simply use the session_number
parameter by setting it equal to a unique integer for every session you want to maintain (e.g. session_number=123
). This will allow you to continue using the same proxy for each request with that session number. To create a new session simply set the session_number
parameter with a new integer to the API. The session value can be any integer. Sessions expire 15 minutes after the last usage.
API REQUEST
curl "http://api.scraperapi.com/?api_key=APIKEY&url=http://httpbin.org/ip&session_number=123"
PROXY MODE
curl -x "http://scraperapi.session_number=123:[email protected]:8001" -k "http://httpbin.org/ip"
Last updated
Was this helpful?