ScrapingAnt Scraping API

The Scraping API from ScrapingAnt — 1 operation(s) for scraping.

OpenAPI Specification

scrapingant-scraping-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: ScrapingAnt Scraping API
  description: 'ScrapingAnt is a web scraping API service that handles proxy rotation,

    headless browsers, and CAPTCHA solving for reliable web data extraction.

    Source: https://docs.scrapingant.com/

    '
  version: '2.0'
servers:
- url: https://api.scrapingant.com/v2
  description: ScrapingAnt v2
security:
- ApiKeyAuth: []
tags:
- name: Scraping
paths:
  /general:
    get:
      summary: Scrape a URL
      operationId: scrape
      tags:
      - Scraping
      parameters:
      - $ref: '#/components/parameters/ApiKey'
      - name: url
        in: query
        required: true
        description: URL to scrape (must be URL-encoded).
        schema:
          type: string
          format: uri
      - name: browser
        in: query
        description: Enable a headless browser. Defaults to true.
        schema:
          type: boolean
      - name: return_page_source
        in: query
        description: Return the unaltered server response without JS rendering.
        schema:
          type: boolean
      - name: timeout
        in: query
        description: Request duration limit in seconds (5-60).
        schema:
          type: integer
          minimum: 5
          maximum: 60
      - name: cookies
        in: query
        description: Custom cookies for the request.
        schema:
          type: string
      - name: js_snippet
        in: query
        description: Base64-encoded JavaScript to execute after page load.
        schema:
          type: string
      - name: proxy_type
        in: query
        description: Proxy pool selection.
        schema:
          type: string
          enum:
          - datacenter
          - residential
      - name: proxy_country
        in: query
        description: ISO country code for geo-targeted proxy.
        schema:
          type: string
      - name: wait_for_selector
        in: query
        description: CSS selector to wait for before returning.
        schema:
          type: string
      - name: block_resource
        in: query
        description: Resource types to block (repeatable).
        schema:
          type: array
          items:
            type: string
            enum:
            - document
            - stylesheet
            - image
            - media
            - font
            - script
            - texttrack
            - xhr
            - fetch
            - eventsource
            - websocket
            - manifest
            - other
        style: form
        explode: true
      responses:
        '200':
          description: HTML body of the target page.
          content:
            text/html:
              schema:
                type: string
        4XX:
          description: Client error
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
components:
  parameters:
    ApiKey:
      name: x-api-key
      in: query
      required: true
      description: ScrapingAnt API key.
      schema:
        type: string
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: query
      name: x-api-key
      description: ScrapingAnt API key (also accepted as header x-api-key).