API Basics
All you need to know for start using ScrapingAnt API.
#
Start using APIThe only 2 things needed to start working with ScrapingAnt API: URL you'd like to scrape, and the API key. The second one can be found at the user's dashboard.
#
API infoScrapingAnt Web Scraping API is available at the following endpoint:
It supports both GET
and POST
methods, so every consumer is available to choose the most preferable one, as both methods do the same.
caution
POST method is only added for more comfortable API usage. It acts the same as GET endpoint, so only format is different.
The web scraping endpoint requires 2 parameters: x-api-key
header with API key and url
with the target URL to scrape.
url
parameter should be passed as a query parameter when using GET
method, and as a part of body JSON when using POST
.
Below you can find example.com
scraping requests with using of CURL as an executor.
GET
request:
POST
request:
Both requests will return the JSON result:
To know more about optional parameters, and the response format, please, follow the Request and Response Format page.
#
Execution timeMaximum page load time is restricted to 30 seconds, so each URL that failed will be tried as many times as possible for 30 seconds.
#
Generate API request via request generatorThe simplest way to generate required code snippet for starting consuming API is to use ScrapingAnt's request generator. You can find it at the user dashboard and just fill the form with required parameters to get code samples for CURL, Python and NodeJS. Also, the direct execution function is available, so you will be able to execute request right from the user's admin panel.