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

# Get operation

> Check the status of a background operation and retrieve its result once it completes.

# GET /api/operations/:id

> Poll the status of any async operation.

Poll the status of any async operation (enrichment, deep research, search, etc.).

## Example

```bash theme={null} theme={"theme":{"light":"github-light","dark":"github-dark"}}
curl https://developer.thehog.ai/api/operations/op_01HZXYZ \
  -H "X-Access-Key: ak_xxxxxxxxxxxxxxxx" \
  -H "X-Secret-Key: sk_xxxxxxxxxxxxxxxx"
```


## OpenAPI

````yaml api-reference/openapi.json GET /api/operations/{id}
openapi: 3.0.0
info:
  title: The Hog API
  description: Public API reference for The Hog.
  version: '1.0'
  contact: {}
servers:
  - url: https://developer.thehog.ai
security: []
tags: []
paths:
  /api/operations/{id}:
    get:
      tags:
        - Operations
      summary: Get operation
      description: >-
        Check the status of a background operation and retrieve its result once
        it completes.
      operationId: getOperation
      parameters:
        - name: id
          required: true
          in: path
          description: Operation ID.
          schema:
            type: string
      responses:
        '200':
          description: Current operation status, progress, result, or error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OperationResponseDto'
        '401':
          description: Authentication is required.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicErrorResponseDto'
              example:
                statusCode: 401
                error: Unauthorized
                message: Authentication is required.
                path: /api/v1/search
                timestamp: '2026-05-21T09:08:10.000Z'
                requestId: 506af9b3-01a9-43be-9eb4-8458fe3e4f5b
        '404':
          description: The requested resource was not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicErrorResponseDto'
              example:
                statusCode: 404
                error: Not Found
                message: Resource not found.
                path: /api/v1/search
                timestamp: '2026-05-21T09:08:10.000Z'
                requestId: 506af9b3-01a9-43be-9eb4-8458fe3e4f5b
        '429':
          description: Too many requests. Slow down before retrying.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicErrorResponseDto'
              example:
                statusCode: 429
                error: Too Many Requests
                message: Too many requests.
                path: /api/v1/search
                timestamp: '2026-05-21T09:08:10.000Z'
                requestId: 506af9b3-01a9-43be-9eb4-8458fe3e4f5b
        '500':
          description: An unexpected error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicErrorResponseDto'
              example:
                statusCode: 500
                error: Internal Server Error
                message: An unexpected error occurred.
                path: /api/v1/search
                timestamp: '2026-05-21T09:08:10.000Z'
                requestId: 506af9b3-01a9-43be-9eb4-8458fe3e4f5b
      security:
        - AccessKey: []
          SecretKey: []
components:
  schemas:
    OperationResponseDto:
      type: object
      properties:
        id:
          type: string
        status:
          type: string
          enum:
            - queued
            - processing
            - succeeded
            - failed
            - partial_success
            - cancelled
        progress:
          type: number
          nullable: true
        result:
          type: object
          nullable: true
          additionalProperties: true
        error:
          type: object
          nullable: true
          additionalProperties: true
      required:
        - id
        - status
    PublicErrorResponseDto:
      type: object
      properties:
        statusCode:
          type: number
          example: 400
        error:
          type: string
          example: Bad Request
        message:
          type: string
          example: Validation failed
        path:
          type: string
          example: /api/v1/search
        requestId:
          type: string
          example: 506af9b3-01a9-43be-9eb4-8458fe3e4f5b
        timestamp:
          type: string
          example: '2026-05-21T09:08:10.000Z'
        errors:
          type: array
          items:
            $ref: '#/components/schemas/PublicValidationErrorItemDto'
      required:
        - statusCode
        - error
        - message
        - path
        - timestamp
    PublicValidationErrorItemDto:
      type: object
      properties:
        property:
          type: string
          example: body.query
        message:
          type: string
          example: query must be a string
        constraints:
          type: object
          additionalProperties:
            type: string
          example:
            isString: query must be a string
      required:
        - property
        - message
  securitySchemes:
    AccessKey:
      type: apiKey
      in: header
      name: X-Access-Key
      description: The public API key from the Credentials page.
    SecretKey:
      type: apiKey
      in: header
      name: X-Secret-Key
      description: The API secret shown when the credential is created.

````