Advanced API Functionality

RocketScrape API enables you to customize the API's functionality by adding additional parameters to your requests. The API will accept the following parameters:

Note: Such domains google, ebay, amazon, aliexpress, similarweb, zoominfo, booking, olx are considered as "premium" resources and will cost 20 credits per request. Option render=true for these domains will charge additional 5 credits.

Rendering Javascript

If you are crawling a page that requires you to render the javascript on the page in order to obtain the data you need, then we can fetch such pages using a headless browser. To render javascript, simply set render=true and we will use a headless Google Chrome instance to fetch the page. This feature is only available on the Basic, Pro, Ultra and Enterprise plans.

https://api.rocketscrape.com/?apiKey={YOUR_API_KEY}&url=http://httpbin.org/ip&render=true

Custom Headers

If you would like to use your own custom headers (user agents, cookies, etc.) when making a request to the website, simply set keep_headers=true and send the API the headers you want to use. Thus, the API will use these headers while sending requests to the website.

Note: Use this feature only if you need to send custom headers to retrieve specific results from the website. We have a sophisticated header management system within the API, designed to increase success rates and performance on difficult sites. By sending your own custom headers you override our header system, which oftentimes lowers your success rates. Unless you absolutely need to send custom headers to get the data you need, we advise that you don’t use this functionality.

If you need to get results for mobile devices, use the device_type parameter to set the user-agent header for you, instead of setting your own.

Note: Property device_type only available with the option render=true .

curl --header "X-MyHeader: 123" \
"https://api.rocketscrape.com/?apiKey={YOUR_API_KEY}&url=http://httpbin.org/anything&keep_headers=true"

Geographic Location

Certain websites (typically e-commerce stores and search engines) display different data to different users based on the geolocation of the IP used to make the request to the website. In such cases, you can use the APIs geotargeting functionality to use proxies from the specified country to retrieve the correct data from the website with ease.

To control the geolocation of the IP used to make the request, simply set the country_code parameter to the country you want the proxy to be from and the API will automatically use the correct IP for that request.

For example: to ensure your requests come from the United States, set the country_code parameter to country_code=us.

Pro, Ultra and Enterprise Plan users can geotarget their requests to the following 19 countries (Free and Basic Plan can only use US geotargeting) by using the country_code in their request:

Device Type

If your project requires you to use desktop or mobile user agents exclusively in the headers it sends to the website, then you can use the device_type parameter.

  • Set device_type=desktop to have the API set a desktop (e.g. iOS, Windows, or Linux) user agent. Note: This is the default behavior. Not setting the parameter will result in the same effect.

  • Set device_type=mobile to have the API replicate a mobile (e.g. iPhone or Android) user agent.

Note: The device type you set will be overridden if you use keep_headers=true and send your own user agent in the requests header.

https://api.rocketscrape.com/?apiKey={YOUR_API_KEY}&url=http://httpbin.org/ip&render=true&device_type=mobile

Note: Property device_type is only available with the option render=true

Last updated