WebScraping.AI HTML API

Get full HTML content of pages using proxies and Chromium JS rendering

Operations 1

GET /html Page HTML by URL #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/webscraping-ai-html-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

webscraping-ai-html-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: WebScraping.AI HTML API
  contact:
    name: WebScraping.AI Support
    url: https://webscraping.ai
    email: support@webscraping.ai
  version: 3.2.1
  description: WebScraping.AI scraping API provides LLM-powered tools with Chromium JavaScript rendering, rotating proxies, and built-in HTML parsing.
servers:
- url: https://api.webscraping.ai
security:
- api_key: []
tags:
- name: HTML
  description: Get full HTML content of pages using proxies and Chromium JS rendering
paths:
  /html:
    get:
      summary: Page HTML by URL
      description: Returns the full HTML content of a webpage specified by the URL. The response is in plain text. Proxies and Chromium JavaScript rendering are used for page retrieval and processing.
      operationId: getHTML
      tags:
      - HTML
      parameters:
      - $ref: '#/components/parameters/url'
      - $ref: '#/components/parameters/headers'
      - $ref: '#/components/parameters/timeout'
      - $ref: '#/components/parameters/js'
      - $ref: '#/components/parameters/js_timeout'
      - $ref: '#/components/parameters/wait_for'
      - $ref: '#/components/parameters/proxy'
      - $ref: '#/components/parameters/country'
      - $ref: '#/components/parameters/custom_proxy'
      - $ref: '#/components/parameters/device'
      - $ref: '#/components/parameters/error_on_404'
      - $ref: '#/components/parameters/error_on_redirect'
      - $ref: '#/components/parameters/js_script'
      - $ref: '#/components/parameters/return_script_result'
      - $ref: '#/components/parameters/format'
      responses:
        400:
          $ref: '#/components/responses/400'
        402:
          $ref: '#/components/responses/402'
        403:
          $ref: '#/components/responses/403'
        429:
          $ref: '#/components/responses/429'
        500:
          $ref: '#/components/responses/500'
        504:
          $ref: '#/components/responses/504'
        200:
          description: Success
          content:
            text/html:
              schema:
                type: string
              example: "<html><head>\n    <title>Example Domain</title>\n</head>\n\n<body>\n<div>\n    <h1>Example Domain</h1>\n</body></html>"
components:
  parameters:
    js_script:
      in: query
      name: js_script
      description: Custom JavaScript code to execute on the target page.
      example: document.querySelector('button').click();
      schema:
        type: string
    url:
      in: query
      name: url
      description: URL of the target page.
      required: true
      example: https://example.com
      schema:
        type: string
    error_on_404:
      in: query
      name: error_on_404
      description: Return error on 404 HTTP status on the target page (false by default).
      example: false
      schema:
        type: boolean
        default: false
    js:
      in: query
      name: js
      description: Execute on-page JavaScript using a headless browser (true by default).
      example: true
      schema:
        type: boolean
        default: true
    wait_for:
      in: query
      name: wait_for
      description: CSS selector to wait for before returning the page content. Useful for pages with dynamic content loading. Overrides js_timeout. If the element doesn't appear within the request timeout, the request fails with a 500 error naming the selector and including the target page's HTTP status code and a preview of the page body.
      schema:
        type: string
    timeout:
      in: query
      name: timeout
      description: Maximum web page retrieval time in ms. Increase it in case of timeout errors (10000 by default, maximum is 30000).
      example: 10000
      schema:
        type: integer
        default: 10000
        minimum: 1
        maximum: 30000
    return_script_result:
      in: query
      name: return_script_result
      description: Return result of the custom JavaScript code (js_script parameter) execution on the target page (false by default, page HTML will be returned).
      example: false
      schema:
        type: boolean
        default: false
    proxy:
      in: query
      name: proxy
      description: Type of proxy. Use `residential` if your site restricts traffic from datacenters, or `stealth` for the most heavily protected sites with advanced anti-bot detection (`datacenter` by default). Residential and stealth proxy requests are more expensive than datacenter, see the pricing page for details.
      example: datacenter
      schema:
        type: string
        default: datacenter
        enum:
        - datacenter
        - residential
        - stealth
    error_on_redirect:
      in: query
      name: error_on_redirect
      description: Return error on redirect on the target page (false by default).
      example: false
      schema:
        type: boolean
        default: false
    device:
      in: query
      name: device
      description: Type of device emulation.
      example: desktop
      schema:
        type: string
        default: desktop
        enum:
        - desktop
        - mobile
        - tablet
    custom_proxy:
      in: query
      name: custom_proxy
      description: Your own proxy URL to use instead of our built-in proxy pool in "http://user:password@host:port" format (<a target="_blank" href="https://webscraping.ai/proxies/smartproxy">Smartproxy</a> for example).
      example: null
      schema:
        type: string
    country:
      in: query
      name: country
      description: Country of the proxy to use (US by default).
      example: us
      schema:
        type: string
        default: us
        enum:
        - us
        - gb
        - de
        - it
        - fr
        - ca
        - es
        - ru
        - jp
        - kr
        - in
        - hk
        - tr
    headers:
      in: query
      name: headers
      description: 'HTTP headers to pass to the target page. Can be specified either via a nested query parameter (...&headers[One]=value1&headers=[Another]=value2) or as a JSON encoded object (...&headers={"One": "value1", "Another": "value2"}).'
      example: '{"Cookie":"session=some_id"}'
      schema:
        type: object
        additionalProperties:
          type: string
      style: deepObject
      explode: true
    format:
      in: query
      name: format
      description: Format of the response (text by default). "json" will return a JSON object with the response, "text" will return a plain text/HTML response.
      example: json
      schema:
        type: string
        default: json
        enum:
        - json
        - text
    js_timeout:
      in: query
      name: js_timeout
      description: Maximum JavaScript rendering time in ms. Increase it in case if you see a loading indicator instead of data on the target page.
      example: 2000
      schema:
        type: integer
        default: 2000
        minimum: 1
        maximum: 20000
  securitySchemes:
    api_key:
      type: apiKey
      name: api_key
      in: query