> ## 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 search result

> Check the status of a search and retrieve the result once it completes.

# GET /api/v1/search/:id

> Poll for search results.

Poll for results of a search submitted via `POST /api/v1/search`.

## Example

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


## OpenAPI

````yaml api-reference/openapi.json GET /api/v1/search/{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/v1/search/{id}:
    get:
      tags:
        - Search
      summary: Get search result
      description: Check the status of a search and retrieve the result once it completes.
      operationId: getSearchResult
      parameters:
        - name: id
          required: true
          in: path
          description: Search ID.
          schema:
            type: string
      responses:
        '200':
          description: Current search status, progress, result, or error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SearchResultDto'
        '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:
    SearchResultDto:
      type: object
      properties:
        id:
          type: string
          description: Unique search result ID
        status:
          type: string
          description: Current status
          enum:
            - queued
            - processing
            - succeeded
            - failed
        type:
          type: string
          description: Search type
          enum:
            - web_search
            - site_search
            - linkedin_keyword
            - x_keyword
            - reddit_search
            - tiktok_keyword
            - tiktok_hashtag
        query:
          type: string
          description: Original query
        poll_url:
          type: string
          description: URL to poll for result
        results:
          description: Search results array
          nullable: true
          type: array
          items:
            $ref: '#/components/schemas/SearchResultItemDto'
        total_results:
          type: number
          description: Total results found
          nullable: true
        error:
          description: Error details when failed
          nullable: true
          type: object
          allOf:
            - $ref: '#/components/schemas/SearchErrorDto'
        created_at:
          type: string
          description: ISO timestamp of creation
        completed_at:
          type: string
          description: ISO timestamp of completion
          nullable: true
      required:
        - id
        - status
        - type
        - query
        - created_at
    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
    SearchResultItemDto:
      type: object
      properties:
        url:
          type: string
          description: Result URL
        title:
          type: string
          description: Result title
        content:
          type: string
          description: Content snippet or post text
          nullable: true
        published_at:
          type: string
          description: Published date (ISO)
          nullable: true
        author_name:
          type: string
          description: Author name (LinkedIn)
          nullable: true
        author_headline:
          type: string
          description: Author headline (LinkedIn)
          nullable: true
        id:
          type: string
          description: Source-native stable entity ID, when available
          nullable: true
        platform_video_id:
          type: string
          description: Source-native stable post/video/activity ID, when available
          nullable: true
        post_url:
          type: string
          description: Source-native canonical post URL, when available
          nullable: true
        author_username:
          type: string
          description: Author handle or username, when available
          nullable: true
      required:
        - url
        - title
    SearchErrorDto:
      type: object
      properties:
        message:
          type: string
          description: Safe error message
        retryable:
          type: boolean
          description: Whether retrying the search may succeed
      required:
        - message
        - retryable
    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.

````