{"openapi":"3.1.0","info":{"title":"Scrapingant 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. \nTo 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"}],"paths":{"/v2/general":{"delete":{"summary":"Scrapingant General Request","operationId":"scrapingant_general_request_v2_general_delete","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":"<html><head><title>Example</title></head><body><h1>Hello, World!</h1></body></html>"}}}},"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"}]},"post":{"summary":"Scrapingant General Request","operationId":"scrapingant_general_request_v2_general_delete","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":"<html><head><title>Example</title></head><body><h1>Hello, World!</h1></body></html>"}}}},"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"}]},"put":{"summary":"Scrapingant General Request","operationId":"scrapingant_general_request_v2_general_delete","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":"<html><head><title>Example</title></head><body><h1>Hello, World!</h1></body></html>"}}}},"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"}]},"patch":{"summary":"Scrapingant General Request","operationId":"scrapingant_general_request_v2_general_delete","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":"<html><head><title>Example</title></head><body><h1>Hello, World!</h1></body></html>"}}}},"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"}]},"get":{"summary":"Scrapingant General Request","operationId":"scrapingant_general_request_v2_general_delete","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":"<html><head><title>Example</title></head><body><h1>Hello, World!</h1></body></html>"}}}},"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"}]}},"/v2/usage":{"get":{"summary":"Scrapingant Usage","operationId":"scrapingant_usage_v2_usage_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiGeneralUsageResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"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."}],"description":"Get current status of API credits usage"}}},"components":{"schemas":{"ApiGeneralUsageResponse":{"properties":{"plan_name":{"type":"string","title":"Plan Name"},"start_date":{"type":"string","format":"date-time","title":"Start Date"},"end_date":{"type":"string","format":"date-time","title":"End Date"},"plan_total_credits":{"type":"integer","title":"Plan Total Credits"},"remained_credits":{"type":"integer","title":"Remained Credits"}},"type":"object","required":["plan_name","start_date","end_date","plan_total_credits","remained_credits"],"title":"ApiGeneralUsageResponse"},"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"}}}}