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

# [ALPHA] Search documents about a company

> Semantic search across the documents PG:AI holds for this company — public sources (earnings call transcripts, news articles and other public filings) and any files your team has uploaded and tagged to the same company. Each result includes a `source_type` of either `public_doc` or `uploaded_doc`. The response carries a single top-level `company` object (`{ id, name, domain }`) for the path company; individual items do not repeat it. Use `GET /companies/{company_id}/relevance` for a wider relevance feed that also includes web pages, jobs and technologies.



## OpenAPI

````yaml https://api.getpg.ai/docs/v1/openapi.json get /companies/{company_id}/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:
  /companies/{company_id}/search:
    get:
      tags:
        - companies
      summary: '[ALPHA] Search documents about a company'
      description: >-
        Semantic search across the documents PG:AI holds for this company —
        public sources (earnings call transcripts, news articles and other
        public filings) and any files your team has uploaded and tagged to the
        same company. Each result includes a `source_type` of either
        `public_doc` or `uploaded_doc`. The response carries a single top-level
        `company` object (`{ id, name, domain }`) for the path company;
        individual items do not repeat it. Use `GET
        /companies/{company_id}/relevance` for a wider relevance feed that also
        includes web pages, jobs and technologies.
      parameters:
        - name: company_id
          in: path
          required: true
          schema:
            type: string
          description: Company UUID
        - name: q
          in: query
          required: true
          schema:
            type: string
          description: Search query.
        - name: page
          in: query
          required: false
          schema:
            type: integer
            default: 1
          description: Page number.
        - 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 source.
        - 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, company }`. Top-level
            `company` is `{ id, name, domain }` for the path company (items omit
            per-row `company`). Each item has `source_type` (`public_doc` |
            `uploaded_doc`), `id`, `title`, `text`, optional `event` / `file`
            blocks as for other search responses.
          content:
            application/json:
              schema:
                type: object
                description: Response data
        '400':
          description: Validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '503':
          description: Search / data service unavailable
          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.

````