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, olxare considered as "premium" resources and will cost 20 credits per request. Option
render=truefor these domains will charge additional 5 credits.
render=trueand 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.
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=trueand 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_typeparameter to set the user-agent header for you, instead of setting your own.
device_typeonly available with the option
curl --header "X-MyHeader: 123" \
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_codeparameter 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
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_codein their request:
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=desktopto 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.
device_type=mobileto 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=trueand send your own user agent in the requests header.
device_typeis only available with the option