> ## 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.

# AMQP consumer relay (SSE)

> Connect to an AMQP/RabbitMQ broker through an agent and stream messages as Server-Sent Events. The agent creates a temporary auto-delete queue, binds it to the specified exchange, and streams messages back as SSE events (connected, message, error).



## OpenAPI

````yaml /zh/scraping-api/openapi.json post /amqp
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:
  /amqp:
    post:
      tags:
        - AMQP
      summary: AMQP consumer relay (SSE)
      description: >-
        Connect to an AMQP/RabbitMQ broker through an agent and stream messages
        as Server-Sent Events. The agent creates a temporary auto-delete queue,
        binds it to the specified exchange, and streams messages back as SSE
        events (connected, message, error).
      operationId: amqp_consume
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AmqpConsumeBody'
      responses:
        '200':
          description: 'SSE stream of AMQP messages. Events: connected, message, error.'
          content:
            text/event-stream:
              schema:
                type: string
        '401':
          description: Missing API key.
        '403':
          description: Invalid API key.
        '429':
          description: Rate limit exceeded.
        '502':
          description: No healthy agent available.
components:
  schemas:
    AmqpConsumeBody:
      type: object
      required:
        - apiKey
        - host
      properties:
        apiKey:
          type: string
          description: API key for authentication.
        host:
          type: string
          description: AMQP broker hostname.
        port:
          type: integer
          default: 5672
          description: Broker port. Use 5671 for SSL.
        virtual_host:
          type: string
          default: /
          description: AMQP virtual host.
        username:
          type: string
          default: ''
          description: AMQP username.
        password:
          type: string
          default: ''
          description: AMQP password.
        exchange:
          type: string
          default: ''
          description: Exchange to bind to.
        routing_key:
          type: string
          default: '#'
          description: Routing key pattern (# = all messages).
        queue_prefix:
          type: string
          default: scrape
          description: Prefix for the auto-delete queue name.
        ssl:
          type: boolean
          default: false
          description: Use AMQPS (TLS) connection.
        heartbeat:
          type: integer
          default: 60
          description: AMQP heartbeat interval in seconds.
        geo:
          type: string
          description: Country filter for agent selection (e.g. DE).
        agent:
          type: string
          description: Pin to specific agent by slug (e.g. de1).
  securitySchemes:
    ApiKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key
      description: API key passed in the X-API-Key header.

````