> ## Documentation Index
> Fetch the complete documentation index at: https://docs.anysite.io/llms.txt
> Use this file to discover all available pages before exploring further.

# /webparser/parse

> Parse and clean HTML from web page

**Price:** 1 credit

**⚠️ Common errors:** 412: Failed to fetch URL or page not found.



## OpenAPI

````yaml /openapi/utility.json post /api/webparser/parse
openapi: 3.1.0
info:
  title: Any Site API
  description: >+
    Any Site API provides programmatic access to data from LinkedIn, Instagram,
    Twitter, and other platforms.


    ## Authentication


    All API endpoints require an `access-token` header with a valid API token.
    Tokens can be created in the [dashboard](https://app.anysite.io/).


    ## Pricing


    Each endpoint has a credit cost listed in its description. Credits are
    deducted from your token balance per request.

  version: 0.0.1
servers: []
security:
  - AccessToken: []
paths:
  /api/webparser/parse:
    post:
      tags:
        - Webparser
      summary: /webparser/parse
      description: |-
        Parse and clean HTML from web page

        **Price:** 1 credit

        **⚠️ Common errors:** 412: Failed to fetch URL or page not found.
      operationId: __api_webparser_parse_post
      parameters:
        - name: access-token
          in: header
          required: true
          schema:
            anyOf:
              - type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebParserPayload'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/WebParserResult'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    WebParserPayload:
      properties:
        timeout:
          type: integer
          maximum: 1500
          minimum: 20
          default: 300
        url:
          type: string
          maxLength: 2083
          minLength: 10
          format: uri
        include_tags:
          anyOf:
            - items:
                type: string
              type: array
              uniqueItems: true
            - type: 'null'
        exclude_tags:
          anyOf:
            - items:
                type: string
              type: array
              uniqueItems: true
            - type: 'null'
        only_main_content:
          type: boolean
          default: false
        remove_comments:
          type: boolean
          default: true
        resolve_srcset:
          type: boolean
          default: true
        return_full_html:
          type: boolean
          default: false
        min_text_block:
          type: integer
          minimum: 0
          default: 200
        remove_base64_images:
          type: boolean
          default: true
        strip_all_tags:
          type: boolean
          default: false
        extract_contacts:
          type: boolean
          default: false
        same_origin_links:
          type: boolean
          default: false
        social_links_only:
          type: boolean
          default: false
        extract_minimal:
          type: boolean
          default: false
      type: object
      required:
        - url
    WebParserResult:
      properties:
        '@type':
          type: string
          default: WebParserResult
        cleaned_html:
          type: string
        url:
          type: string
        meta_description:
          anyOf:
            - type: string
            - type: 'null'
        metadata:
          additionalProperties: true
          type: object
        links:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
        emails:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
        phones:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
      type: object
      required:
        - cleaned_html
        - url
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
      type: object
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
        msg:
          type: string
        type:
          type: string
        input: {}
        ctx:
          type: object
      type: object
      required:
        - loc
        - msg
        - type
  securitySchemes:
    AccessToken:
      type: apiKey
      in: header
      name: access-token
      description: API token from the dashboard

````