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

# Fetch a URL (POST)

> Send a request to the target URL through the agent network. Pass the target URL via the X-Target-URL header. Optionally include a JSON body with method, headers, body, timeout, and allow_redirects fields.



## OpenAPI

````yaml /zh/scraping-api/openapi.json post /fetch
openapi: 3.1.0
info:
  title: 55 Tech Scraping API
  description: >-
    Distributed fetch network. Route HTTP, browser, WebSocket, and AMQP requests
    through 80+ geo-distributed agents with health-aware routing and block
    detection.
  version: 2.2.0
  contact:
    name: 55 Tech Support
    email: contact@55-tech.com
servers:
  - url: https://scraping-api.55-tech.com
    description: Production
security:
  - ApiKeyHeader: []
tags:
  - name: Fetch
    description: Proxy HTTP requests through the agent network.
  - name: Browser
    description: Fetch with full JavaScript rendering, cookies, and screenshots.
  - name: Network
    description: Agent registry, network status, and domain health.
  - name: AMQP
    description: AMQP/RabbitMQ consumer relay via SSE.
  - name: Usage
    description: Per-key usage metrics.
  - name: Debug
    description: Debug and diagnostic endpoints.
  - name: System
    description: Health checks and system endpoints.
paths:
  /fetch:
    post:
      tags:
        - Fetch
      summary: Fetch a URL (POST)
      description: >-
        Send a request to the target URL through the agent network. Pass the
        target URL via the X-Target-URL header. Optionally include a JSON body
        with method, headers, body, timeout, and allow_redirects fields.
      operationId: fetch_post
      parameters:
        - $ref: '#/components/parameters/XTargetURL'
        - $ref: '#/components/parameters/XGeo'
        - $ref: '#/components/parameters/XExpectJSON'
        - $ref: '#/components/parameters/XAgent'
        - $ref: '#/components/parameters/XTimeout'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FetchPostBody'
      responses:
        '200':
          description: Proxied response from origin.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FetchResponse'
        '401':
          description: Missing API key.
        '403':
          description: Invalid API key.
        '429':
          description: Rate limit exceeded.
        '502':
          description: No healthy agent available.
        '504':
          description: Agent timeout.
components:
  parameters:
    XTargetURL:
      name: X-Target-URL
      in: header
      description: >-
        Target URL (no encoding needed). Recommended for URLs with query
        parameters.
      schema:
        type: string
    XGeo:
      name: X-Geo
      in: header
      description: >-
        Target countries as comma-separated ISO codes (e.g. US,DE,AT). Aliases:
        X-Geo-CC, X-CC, X-Country, X-Geo-Strict.
      schema:
        type: string
    XExpectJSON:
      name: X-Expect-JSON
      in: header
      description: Set to 1 if expecting a JSON response from the origin.
      schema:
        type: string
    XAgent:
      name: X-Agent
      in: header
      description: >-
        Route through specific agent(s) by slug (e.g. de1) or comma-separated
        list for random pick (e.g. de1,at5,us3).
      schema:
        type: string
    XTimeout:
      name: X-Timeout
      in: header
      description: 'Override request timeout in seconds (default: 30).'
      schema:
        type: string
  schemas:
    FetchPostBody:
      type: object
      properties:
        method:
          type: string
          description: >-
            Override HTTP method (e.g. POST, PUT). Defaults to the request's own
            method.
        headers:
          type: object
          additionalProperties:
            type: string
          description: Custom headers to send to the target origin.
        body:
          type: string
          description: Request body to send to the target origin.
        timeout:
          type: number
          description: 'Request timeout in seconds. Default: 30.'
        allow_redirects:
          type: boolean
          description: 'Follow redirects. Default: true.'
    FetchResponse:
      type: object
      properties:
        meta:
          $ref: '#/components/schemas/MetaInfo'
        raw:
          type: string
          nullable: true
          description: Response body as text (when not JSON).
        raw_json:
          nullable: true
          description: Parsed JSON body (when response is valid JSON, otherwise null).
    MetaInfo:
      type: object
      properties:
        status:
          type: integer
          description: HTTP status code from the origin.
        final_url:
          type: string
          description: Final URL after any redirects.
        http_version:
          type: string
          description: HTTP version used (e.g. HTTP/2).
        elapsed_ms:
          type: integer
          description: Round-trip time in milliseconds.
        blocked:
          type: boolean
          description: true if bot detection patterns were found in the response.
        headers:
          type: object
          additionalProperties:
            type: string
          description: Response headers from the origin.
        agent:
          type: object
          properties:
            id:
              type: string
              description: Node ID that served the request, e.g. scraping-de1.
        bytes:
          type: integer
          description: Response body size in bytes.
  securitySchemes:
    ApiKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key
      description: API key passed in the X-API-Key header.

````