Information about supported parameters and format of API request.
You can find your API token on the dashboard page in the user's admin panel.
The API request can be authenticated using the
The other authentication option is to use the
x-api-key API parameter:
The web scraping endpoint is available at the following URL:
It supports both
GET method should be passed as a query string parameters in urlencoded format.
Example below shows how will look URL with scraping request to
- Go: url.QueryEscape
- Java: URLEncoder.encode
- NodeJS: encodeURIComponent
- PHP: urlencode
- Python: urllib.parse.quote
- Ruby: URI::escape
To pass parameters via POST method you just have to place them into JSON body, like the following:
Below you can find the full list of the available parameters:
|required||String||URL to scrape|
|optional||String||Your ScrapingAnt API key. The field is optional only when the |
|optional||Boolean||Enables using headless browser for scraping. Default: |
|optional||String||Cookies to pass with a scraping request to the target site. See Custom cookies for more info.|
|optional||String||Base64 encoded JS snippet to run once page being loaded in the ScrapingAnt browser. This feature works only with |
|optional||String||Specifies proxy type to make request from. Default: |
|optional||String||Specifies proxy country to make request from. See Proxy settings for more info.|
|optional||String||The CSS selector of the element our service will wait for before returning result. This feature works only with |
|optional||Boolean||Enables returning text only content from the page instead of full HTML. Default: |
ScrapingAnt web scraping API endpoint returns a JSON object with the
|String||Content from the scraped web page|
|String||Response cookies from the scraped web page|
|Number||Status code received from the scraped page|
In case of an error, the response has the HTTP status code in the range of
5xx and the response properties will be replaced with
See Errors for more details.