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

# [BETA] Unified semantic search

> Semantic search across the data PG:AI holds for your accounts — public filings and news, your uploaded materials, web pages, jobs, technologies, contacts, conversations, insights and more. Use `scope=organisation` to search every account tracked for your workspace, or `scope=companies` to restrict to a comma-separated list of `company_ids`. Returns a ranked `{ items, total, page, per_page }` envelope (organisation scope additionally includes `resolved_company_count`).



## OpenAPI

````yaml https://api.getpg.ai/docs/v1/openapi.json get /search
openapi: 3.0.0
info:
  title: PG:AI Public API
  version: 1.0.0
  description: >-
    Public API for accessing PG:AI account intelligence, contacts, territories,
    and more. All endpoints require API key authentication via the x-api-key
    header.
  contact:
    name: PG:AI Support
    url: https://www.getpg.ai
servers:
  - url: https://api.getpg.ai/public-api/v1
    description: Production
security:
  - ApiKeyAuth: []
paths:
  /search:
    get:
      tags:
        - search
      summary: '[BETA] Unified semantic search'
      description: >-
        Semantic search across the data PG:AI holds for your accounts — public
        filings and news, your uploaded materials, web pages, jobs,
        technologies, contacts, conversations, insights and more. Use
        `scope=organisation` to search every account tracked for your workspace,
        or `scope=companies` to restrict to a comma-separated list of
        `company_ids`. Returns a ranked `{ items, total, page, per_page }`
        envelope (organisation scope additionally includes
        `resolved_company_count`).
      parameters:
        - name: scope
          in: query
          required: true
          schema:
            type: string
            enum:
              - organisation
              - companies
          description: >-
            Search scope: `organisation` (all tracked accounts for the org) or
            `companies` (explicit `company_ids`).
        - name: q
          in: query
          required: true
          schema:
            type: string
          description: Search query (minimum 1 character).
          example: Tesco
        - name: company_ids
          in: query
          required: false
          schema:
            type: string
          description: 'Required when scope=companies: comma-separated company UUIDs.'
        - name: page
          in: query
          required: false
          schema:
            type: integer
            default: 1
          description: Page index for the response envelope.
        - name: per_source
          in: query
          required: false
          schema:
            type: integer
            default: 25
          description: >-
            Page size. Default 25, maximum 50 on all list endpoints. Omit to use
            the default; increase up to 50 only if you need larger pages.
            Applied per vector source.
          example: 25
        - name: date_from
          in: query
          required: false
          schema:
            type: string
          description: ISO 8601 lower bound on result date.
        - name: date_to
          in: query
          required: false
          schema:
            type: string
          description: ISO 8601 upper bound on result date.
      responses:
        '200':
          description: >-
            Success — `{ items, total, page, per_page }` (and optionally
            `resolved_company_count` for organisation scope)
          content:
            application/json:
              schema:
                type: object
                description: Response data
        '400':
          description: Missing or invalid query parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Access denied
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      deprecated: false
      security:
        - ApiKeyAuth: []
components:
  schemas:
    Error:
      type: object
      description: Error response
      properties:
        error:
          type: string
          description: Error type or code
        message:
          type: string
          description: Human-readable error message
        details:
          type: object
          description: Additional error details
          additionalProperties: true
      required:
        - error
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        Your API key for authentication. Get your API key from the PG:AI
        dashboard under Settings > API Keys.

````