openapi: 3.2.0
info:
title: Scrapingant General API
description: 'The only 2 things needed to start working with ScrapingAnt API: URL you''d like to scrape, and the API key. Provide them to /v2/general GET endpoint, and you''ll get the scraped content.
To send a POST / PUT / DELETE / PATCH request to the target url, send the POST / PUT / DELETE / PAST request to the main endpoint with your x-api-key and url parameters.'
version: v2
x-logo:
url: https://fastapi.tiangolo.com/img/logo-margin/logo-teal.png
servers:
- url: https://api.scrapingant.com
description: Production ScrapingAnt API
tags:
- name: General
paths:
/v2/general:
post:
summary: Scrapingant General Request
operationId: scrapingant_general_request_v2_general_post
responses:
'200':
description: Successful response. ScrapingAnt web scraping API endpoint returns plain html content of the scraped web page
content:
application/json:
schema:
type: string
example:
ExampleHello, World!
'422':
description: Invalid value provided. Please, look into detail for more info.
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
type: object
properties:
detail:
type: string
'400':
description: Wrong request format. Make sure that you're using a proper JSON input.
content:
application/json:
schema:
type: object
properties:
detail:
type: string
'403':
description: The API token is wrong or you have exceeded the API credits limit.
content:
application/json:
schema:
type: object
properties:
detail:
type: string
'404':
description: The requested URL is not reachable. Please, check it in your browser or try again.
content:
application/json:
schema:
type: object
properties:
detail:
type: string
'405':
description: 'The API endpoint can only be accessed using the following HTTP methods: GET, POST, PUT, DELETE.'
content:
application/json:
schema:
type: object
properties:
detail:
type: string
'409':
description: Concurrent requests limit exceeded. Please, try again or upgrade to the paid plan
content:
application/json:
schema:
type: object
properties:
detail:
type: string
'423':
description: The anti-bot detection system has detected the request. Please, retry or change the request settings.
content:
application/json:
schema:
type: object
properties:
detail:
type: string
'500':
description: Something went wrong with the server side code. Rare case. We're recommending to contact us in this case.
content:
application/json:
schema:
type: object
properties:
detail:
type: string
parameters:
- in: query
name: x-api-key
required: true
schema:
type: string
description: API token, required for authentication. You can find your API token on the dashboard page in the user's admin panel.
- in: query
name: url
required: true
schema:
type: string
description: URL to scrape
- in: query
name: browser
required: false
schema:
type: boolean
description: 'Enables using headless browser for scraping. Default: true'
example: true
- in: query
name: return_page_source
required: false
schema:
type: boolean
description: 'Enables returning data returned by the server and unaltered by the browser. Default: false. When true - JS won''t be rendered. This feature works only with browser=true'
example: false
- in: query
name: cookies
required: false
schema:
type: string
description: Cookies to pass with a scraping request to the target site.
example: cookie_name1=cookie_value1;cookie_name2=cookie_value2
- in: query
name: js_snippet
required: false
schema:
type: string
description: Base64 encoded JS snippet to run once page being loaded in the ScrapingAnt browser. This feature works only with browser=true.
example: d2luZG93LnNjcm9sbFRvKDAsZG9jdW1lbnQuYm9keS5zY3JvbGxIZWlnaHQpOwphd2FpdCBuZXcgUHJvbWlzZShyID0+IHNldFRpbWVvdXQociwgMjAwMCkpOw==
- in: query
name: proxy_type
required: false
schema:
type: string
description: 'Specifies proxy type to make request from. Default: datacenter. one of: datacenter, residential'
example: datacenter
- in: query
name: proxy_country
required: false
schema:
type: string
description: Specifies proxy country to make request from. If not specified, the request will be made from a random country.
example: US
- in: query
name: wait_for_selector
required: false
schema:
type: string
description: The CSS selector of the element our service will wait for before returning result. This feature works only with browser=true
example: .my-element
- in: query
name: block_resource
required: false
schema:
type: string
description: 'Block resource types. Prevents cloud browser from loading specified resource types. Can be repeated in case several resource types should be blocked. This feature works only with browser=true. Available resource types: document, stylesheet, image, media, font, script, texttrack, xhr, fetch, eventsource, websocket, manifest, other'
example: document
tags:
- General
get:
summary: Scrapingant General Request
operationId: getV2General
responses:
'200':
description: Successful response. ScrapingAnt web scraping API endpoint returns plain html content of the scraped web page
content:
application/json:
schema:
type: string
example: ExampleHello, World!
'422':
description: Invalid value provided. Please, look into detail for more info.
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
type: object
properties:
detail:
type: string
'400':
description: Wrong request format. Make sure that you're using a proper JSON input.
content:
application/json:
schema:
type: object
properties:
detail:
type: string
'403':
description: The API token is wrong or you have exceeded the API credits limit.
content:
application/json:
schema:
type: object
properties:
detail:
type: string
'404':
description: The requested URL is not reachable. Please, check it in your browser or try again.
content:
application/json:
schema:
type: object
properties:
detail:
type: string
'405':
description: 'The API endpoint can only be accessed using the following HTTP methods: GET, POST, PUT, DELETE.'
content:
application/json:
schema:
type: object
properties:
detail:
type: string
'409':
description: Concurrent requests limit exceeded. Please, try again or upgrade to the paid plan
content:
application/json:
schema:
type: object
properties:
detail:
type: string
'423':
description: The anti-bot detection system has detected the request. Please, retry or change the request settings.
content:
application/json:
schema:
type: object
properties:
detail:
type: string
'500':
description: Something went wrong with the server side code. Rare case. We're recommending to contact us in this case.
content:
application/json:
schema:
type: object
properties:
detail:
type: string
parameters:
- in: query
name: x-api-key
required: true
schema:
type: string
description: API token, required for authentication. You can find your API token on the dashboard page in the user's admin panel.
- in: query
name: url
required: true
schema:
type: string
description: URL to scrape
- in: query
name: browser
required: false
schema:
type: boolean
description: 'Enables using headless browser for scraping. Default: true'
example: true
- in: query
name: return_page_source
required: false
schema:
type: boolean
description: 'Enables returning data returned by the server and unaltered by the browser. Default: false. When true - JS won''t be rendered. This feature works only with browser=true'
example: false
- in: query
name: cookies
required: false
schema:
type: string
description: Cookies to pass with a scraping request to the target site.
example: cookie_name1=cookie_value1;cookie_name2=cookie_value2
- in: query
name: js_snippet
required: false
schema:
type: string
description: Base64 encoded JS snippet to run once page being loaded in the ScrapingAnt browser. This feature works only with browser=true.
example: d2luZG93LnNjcm9sbFRvKDAsZG9jdW1lbnQuYm9keS5zY3JvbGxIZWlnaHQpOwphd2FpdCBuZXcgUHJvbWlzZShyID0+IHNldFRpbWVvdXQociwgMjAwMCkpOw==
- in: query
name: proxy_type
required: false
schema:
type: string
description: 'Specifies proxy type to make request from. Default: datacenter. one of: datacenter, residential'
example: datacenter
- in: query
name: proxy_country
required: false
schema:
type: string
description: Specifies proxy country to make request from. If not specified, the request will be made from a random country.
example: US
- in: query
name: wait_for_selector
required: false
schema:
type: string
description: The CSS selector of the element our service will wait for before returning result. This feature works only with browser=true
example: .my-element
- in: query
name: block_resource
required: false
schema:
type: string
description: 'Block resource types. Prevents cloud browser from loading specified resource types. Can be repeated in case several resource types should be blocked. This feature works only with browser=true. Available resource types: document, stylesheet, image, media, font, script, texttrack, xhr, fetch, eventsource, websocket, manifest, other'
example: document
tags:
- General
x-operation-id-source: normalized
x-operation-id-original: scrapingant_general_request_v2_general_post
put:
summary: Scrapingant General Request
operationId: putV2General
responses:
'200':
description: Successful response. ScrapingAnt web scraping API endpoint returns plain html content of the scraped web page
content:
application/json:
schema:
type: string
example: ExampleHello, World!
'422':
description: Invalid value provided. Please, look into detail for more info.
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
type: object
properties:
detail:
type: string
'400':
description: Wrong request format. Make sure that you're using a proper JSON input.
content:
application/json:
schema:
type: object
properties:
detail:
type: string
'403':
description: The API token is wrong or you have exceeded the API credits limit.
content:
application/json:
schema:
type: object
properties:
detail:
type: string
'404':
description: The requested URL is not reachable. Please, check it in your browser or try again.
content:
application/json:
schema:
type: object
properties:
detail:
type: string
'405':
description: 'The API endpoint can only be accessed using the following HTTP methods: GET, POST, PUT, DELETE.'
content:
application/json:
schema:
type: object
properties:
detail:
type: string
'409':
description: Concurrent requests limit exceeded. Please, try again or upgrade to the paid plan
content:
application/json:
schema:
type: object
properties:
detail:
type: string
'423':
description: The anti-bot detection system has detected the request. Please, retry or change the request settings.
content:
application/json:
schema:
type: object
properties:
detail:
type: string
'500':
description: Something went wrong with the server side code. Rare case. We're recommending to contact us in this case.
content:
application/json:
schema:
type: object
properties:
detail:
type: string
parameters:
- in: query
name: x-api-key
required: true
schema:
type: string
description: API token, required for authentication. You can find your API token on the dashboard page in the user's admin panel.
- in: query
name: url
required: true
schema:
type: string
description: URL to scrape
- in: query
name: browser
required: false
schema:
type: boolean
description: 'Enables using headless browser for scraping. Default: true'
example: true
- in: query
name: return_page_source
required: false
schema:
type: boolean
description: 'Enables returning data returned by the server and unaltered by the browser. Default: false. When true - JS won''t be rendered. This feature works only with browser=true'
example: false
- in: query
name: cookies
required: false
schema:
type: string
description: Cookies to pass with a scraping request to the target site.
example: cookie_name1=cookie_value1;cookie_name2=cookie_value2
- in: query
name: js_snippet
required: false
schema:
type: string
description: Base64 encoded JS snippet to run once page being loaded in the ScrapingAnt browser. This feature works only with browser=true.
example: d2luZG93LnNjcm9sbFRvKDAsZG9jdW1lbnQuYm9keS5zY3JvbGxIZWlnaHQpOwphd2FpdCBuZXcgUHJvbWlzZShyID0+IHNldFRpbWVvdXQociwgMjAwMCkpOw==
- in: query
name: proxy_type
required: false
schema:
type: string
description: 'Specifies proxy type to make request from. Default: datacenter. one of: datacenter, residential'
example: datacenter
- in: query
name: proxy_country
required: false
schema:
type: string
description: Specifies proxy country to make request from. If not specified, the request will be made from a random country.
example: US
- in: query
name: wait_for_selector
required: false
schema:
type: string
description: The CSS selector of the element our service will wait for before returning result. This feature works only with browser=true
example: .my-element
- in: query
name: block_resource
required: false
schema:
type: string
description: 'Block resource types. Prevents cloud browser from loading specified resource types. Can be repeated in case several resource types should be blocked. This feature works only with browser=true. Available resource types: document, stylesheet, image, media, font, script, texttrack, xhr, fetch, eventsource, websocket, manifest, other'
example: document
tags:
- General
x-operation-id-source: normalized
x-operation-id-original: scrapingant_general_request_v2_general_post
patch:
summary: Scrapingant General Request
operationId: patchV2General
responses:
'200':
description: Successful response. ScrapingAnt web scraping API endpoint returns plain html content of the scraped web page
content:
application/json:
schema:
type: string
example: ExampleHello, World!
'422':
description: Invalid value provided. Please, look into detail for more info.
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
type: object
properties:
detail:
type: string
'400':
description: Wrong request format. Make sure that you're using a proper JSON input.
content:
application/json:
schema:
type: object
properties:
detail:
type: string
'403':
description: The API token is wrong or you have exceeded the API credits limit.
content:
application/json:
schema:
type: object
properties:
detail:
type: string
'404':
description: The requested URL is not reachable. Please, check it in your browser or try again.
content:
application/json:
schema:
type: object
properties:
detail:
type: string
'405':
description: 'The API endpoint can only be accessed using the following HTTP methods: GET, POST, PUT, DELETE.'
content:
application/json:
schema:
type: object
properties:
detail:
type: string
'409':
description: Concurrent requests limit exceeded. Please, try again or upgrade to the paid plan
content:
application/json:
schema:
type: object
properties:
detail:
type: string
'423':
description: The anti-bot detection system has detected the request. Please, retry or change the request settings.
content:
application/json:
schema:
type: object
properties:
detail:
type: string
'500':
description: Something went wrong with the server side code. Rare case. We're recommending to contact us in this case.
content:
application/json:
schema:
type: object
properties:
detail:
type: string
parameters:
- in: query
name: x-api-key
required: true
schema:
type: string
description: API token, required for authentication. You can find your API token on the dashboard page in the user's admin panel.
- in: query
name: url
required: true
schema:
type: string
description: URL to scrape
- in: query
name: browser
required: false
schema:
type: boolean
description: 'Enables using headless browser for scraping. Default: true'
example: true
- in: query
name: return_page_source
required: false
schema:
type: boolean
description: 'Enables returning data returned by the server and unaltered by the browser. Default: false. When true - JS won''t be rendered. This feature works only with browser=true'
example: false
- in: query
name: cookies
required: false
schema:
type: string
description: Cookies to pass with a scraping request to the target site.
example: cookie_name1=cookie_value1;cookie_name2=cookie_value2
- in: query
name: js_snippet
required: false
schema:
type: string
description: Base64 encoded JS snippet to run once page being loaded in the ScrapingAnt browser. This feature works only with browser=true.
example: d2luZG93LnNjcm9sbFRvKDAsZG9jdW1lbnQuYm9keS5zY3JvbGxIZWlnaHQpOwphd2FpdCBuZXcgUHJvbWlzZShyID0+IHNldFRpbWVvdXQociwgMjAwMCkpOw==
- in: query
name: proxy_type
required: false
schema:
type: string
description: 'Specifies proxy type to make request from. Default: datacenter. one of: datacenter, residential'
example: datacenter
- in: query
name: proxy_country
required: false
schema:
type: string
description: Specifies proxy country to make request from. If not specified, the request will be made from a random country.
example: US
- in: query
name: wait_for_selector
required: false
schema:
type: string
description: The CSS selector of the element our service will wait for before returning result. This feature works only with browser=true
example: .my-element
- in: query
name: block_resource
required: false
schema:
type: string
description: 'Block resource types. Prevents cloud browser from loading specified resource types. Can be repeated in case several resource types should be blocked. This feature works only with browser=true. Available resource types: document, stylesheet, image, media, font, script, texttrack, xhr, fetch, eventsource, websocket, manifest, other'
example: document
tags:
- General
x-operation-id-source: normalized
x-operation-id-original: scrapingant_general_request_v2_general_post
delete:
summary: Scrapingant General Request
operationId: deleteV2General
responses:
'200':
description: Successful response. ScrapingAnt web scraping API endpoint returns plain html content of the scraped web page
content:
application/json:
schema:
type: string
example: ExampleHello, World!
'422':
description: Invalid value provided. Please, look into detail for more info.
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
type: object
properties:
detail:
type: string
'400':
description: Wrong request format. Make sure that you're using a proper JSON input.
content:
application/json:
schema:
type: object
properties:
detail:
type: string
'403':
description: The API token is wrong or you have exceeded the API credits limit.
content:
application/json:
schema:
type: object
properties:
detail:
type: string
'404':
description: The requested URL is not reachable. Please, check it in your browser or try again.
content:
application/json:
schema:
type: object
properties:
detail:
type: string
'405':
description: 'The API endpoint can only be accessed using the following HTTP methods: GET, POST, PUT, DELETE.'
content:
application/json:
schema:
type: object
properties:
detail:
type: string
'409':
description: Concurrent requests limit exceeded. Please, try again or upgrade to the paid plan
content:
application/json:
schema:
type: object
properties:
detail:
type: string
'423':
description: The anti-bot detection system has detected the request. Please, retry or change the request settings.
content:
application/json:
schema:
type: object
properties:
detail:
type: string
'500':
description: Something went wrong with the server side code. Rare case. We're recommending to contact us in this case.
content:
application/json:
schema:
type: object
properties:
detail:
type: string
parameters:
- in: query
name: x-api-key
required: true
schema:
type: string
description: API token, required for authentication. You can find your API token on the dashboard page in the user's admin panel.
- in: query
name: url
required: true
schema:
type: string
description: URL to scrape
- in: query
name: browser
required: false
schema:
type: boolean
description: 'Enables using headless browser for scraping. Default: true'
example: true
- in: query
name: return_page_source
required: false
schema:
type: boolean
description: 'Enables returning data returned by the server and unaltered by the browser. Default: false. When true - JS won''t be rendered. This feature works only with browser=true'
example: false
- in: query
name: cookies
required: false
schema:
type: string
description: Cookies to pass with a scraping request to the target site.
example: cookie_name1=cookie_value1;cookie_name2=cookie_value2
- in: query
name: js_snippet
required: false
schema:
type: string
description: Base64 encoded JS snippet to run once page being loaded in the ScrapingAnt browser. This feature works only with browser=true.
example: d2luZG93LnNjcm9sbFRvKDAsZG9jdW1lbnQuYm9keS5zY3JvbGxIZWlnaHQpOwphd2FpdCBuZXcgUHJvbWlzZShyID0+IHNldFRpbWVvdXQociwgMjAwMCkpOw==
- in: query
name: proxy_type
required: false
schema:
type: string
description: 'Specifies proxy type to make request from. Default: datacenter. one of: datacenter, residential'
example: datacenter
- in: query
name: proxy_country
required: false
schema:
type: string
description: Specifies proxy country to make request from. If not specified, the request will be made from a random country.
example: US
- in: query
name: wait_for_selector
required: false
schema:
type: string
description: The CSS selector of the element our service will wait for before returning result. This feature works only with browser=true
example: .my-element
- in: query
name: block_resource
required: false
schema:
type: string
description: 'Block resource types. Prevents cloud browser from loading specified resource types. Can be repeated in case several resource types should be blocked. This feature works only with browser=true. Available resource types: document, stylesheet, image, media, font, script, texttrack, xhr, fetch, eventsource, websocket, manifest, other'
example: document
tags:
- General
x-operation-id-source: normalized
x-operation-id-original: scrapingant_general_request_v2_general_post
components:
schemas:
HTTPValidationError:
properties:
detail:
items:
$ref: '#/components/schemas/ValidationError'
type: array
title: Detail
type: object
title: HTTPValidationError
ValidationError:
properties:
loc:
items:
anyOf:
- type: string
- type: integer
type: array
title: Location
msg:
type: string
title: Message
type:
type: string
title: Error Type
type: object
required:
- loc
- msg
- type
title: ValidationError