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

# Fetch a web page

> Read a public page as Markdown.

Read a public HTTP or HTTPS URL as Markdown in `page.content`. Use `page.final_url` as the resolved source address.

Content is capped at 200,000 characters, with `truncated: true` when shortened. `page.links` contains up to 200 deduplicated absolute links. Publication dates appear only when available.

Fetching a page is a separate request from [web search](https://docs.sanfoundation.com/api-reference/web-search.md).


## OpenAPI

````yaml https://api.sanfoundation.com/openapi.json GET /v1/web/fetch
openapi: 3.0.0
info:
  title: SAN API
  description: >-
    Web data and context for agents, served by a network of miners running real
    browsers on residential connections. One resource per thing an agent asks
    for: search the web, read the news, find places, hotels and flights, and
    quote a symbol. Present an API key as `Authorization: Bearer san_...`. Every
    response is snake_case JSON and every error is `{ error: { code, message,
    param } }`.
  version: 0.0.1
  contact: {}
servers: []
security: []
tags:
  - name: web
    description: Web search
  - name: news
    description: News search
  - name: places
    description: Places search
  - name: hotels
    description: Stays search
  - name: flights
    description: Flight search
  - name: finance
    description: Quotes and charts
  - name: shopping
    description: Products and sellers
  - name: account
    description: Plan and remaining budget
paths:
  /v1/web/fetch:
    get:
      tags:
        - web
      summary: Read one page
      description: >-
        Opens a URL in a real browser on a residential connection and returns
        what a reader would see: the page as markdown, its title, its language,
        its publication date where it states one, and the links it carries.
        Pages that refuse a plain HTTP client usually answer this one.
      operationId: WebController_fetch
      parameters:
        - name: url
          required: true
          in: query
          description: >-
            The page to read. Must be a public http(s) URL: private, loopback
            and link local addresses are refused.
          schema:
            example: https://example.com/articles/coffee
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebFetchResponseDto'
        '400':
          description: A parameter is missing, invalid or not recognized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicErrorDto'
        '401':
          description: Invalid API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicErrorDto'
        '429':
          description: Monthly quota exhausted. Hard stop, no overage.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicErrorDto'
        '503':
          description: No miner and no fallback could serve the request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicErrorDto'
      security:
        - api_key: []
        - x-api-key: []
components:
  schemas:
    WebFetchResponseDto:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Id of this request. Quote it when reporting a problem.
        took_ms:
          type: number
          example: 1420
          description: How long the request took, in milliseconds.
        request:
          type: object
          additionalProperties: true
          description: >-
            The parameters as accepted, after defaults and normalization. What
            the request actually ran with.
          example:
            query: coffee
            country: us
            page: 1
        page:
          $ref: '#/components/schemas/FetchedPageDto'
      required:
        - id
        - took_ms
        - request
        - page
    PublicErrorDto:
      type: object
      properties:
        error:
          $ref: '#/components/schemas/PublicErrorBodyDto'
      required:
        - error
    FetchedPageDto:
      type: object
      properties:
        url:
          type: string
          example: https://example.com/articles/coffee
          description: The URL as it was asked for.
        final_url:
          type: string
          example: https://example.com/articles/coffee?ref=home
          description: Where the browser ended up, redirects followed.
        title:
          type: string
          example: How to brew better coffee
        content:
          type: string
          example: |-
            # How to brew better coffee

            Start with fresh beans.
          description: >-
            The readable content of the page as markdown: headings, paragraphs,
            lists, quotes, code, tables and links. Navigation, adverts and other
            furniture are left out. Capped at 200,000 characters.
        content_type:
          type: string
          enum:
            - markdown
          example: markdown
        language:
          type: string
          example: en
          description: BCP 47, as the page declares it.
        published:
          type: string
          example: '2026-09-10T15:38:56.973Z'
          description: >-
            Publication date, present only when the page states one in ISO 8601.
            A date written in prose is not guessed at.
        links:
          description: >-
            Outbound links inside the content, in page order, deduplicated. Up
            to 200.
          type: array
          items:
            $ref: '#/components/schemas/PageLinkDto'
        fetched_at:
          type: string
          example: '2026-09-10T21:39:24.045Z'
          description: When the page was read.
        truncated:
          type: boolean
          example: true
          description: Present only when the page was longer than the cap.
      required:
        - url
        - final_url
        - title
        - content
        - content_type
        - links
        - fetched_at
    PublicErrorBodyDto:
      type: object
      properties:
        code:
          type: string
          enum:
            - unauthorized
            - missing_parameter
            - invalid_parameter
            - not_found
            - quota_exceeded
            - rate_limited
            - unavailable
            - expired
            - internal_error
          example: missing_parameter
        message:
          type: string
          example: Missing parameter `query`.
        param:
          type: string
          example: query
          description: The parameter at fault, when one parameter is at fault.
      required:
        - code
        - message
    PageLinkDto:
      type: object
      properties:
        text:
          type: string
          example: Brewing guide
          description: The link text as the page prints it. May be empty.
        href:
          type: string
          example: https://example.com/brewing-guide
          description: Absolute, resolved against the page.
      required:
        - text
        - href
  securitySchemes:
    api_key:
      scheme: bearer
      bearerFormat: JWT
      type: http
      description: 'Public API key: `Authorization: Bearer san_...`.'
    x-api-key:
      type: apiKey
      in: header
      name: X-Api-Key
      description: The same public API key, as a header.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.