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

# Lookup by Custom Field

> Searches for companies that contain a specific value in a specific custom field. Returns up to 100 matching companies.



## OpenAPI

````yaml GET /public/v2/companies/lookup-by-custom-field
openapi: 3.0.3
info:
  title: RevyOps API
  version: 1.0.0
servers: []
security: []
paths:
  /public/v2/companies/lookup-by-custom-field:
    get:
      tags:
        - public
      description: >-
        Searches for companies that contain a specific value in a specific
        custom field. Returns up to 100 matching companies.
      operationId: Search companies by custom field (v2)
      parameters:
        - in: query
          name: field_name
          schema:
            type: string
          description: Name of the custom field to search for
          required: true
        - in: query
          name: field_value
          schema:
            type: string
          description: Value of the custom field to search for
          required: true
        - in: query
          name: page
          schema:
            type: integer
          description: Page number (1-based)
        - in: query
          name: page_size
          schema:
            type: integer
          description: Number of companies per page (max 100)
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedCompanyResponse'
          description: Paginated list of companies
        '400':
          description: Bad Request. Missing required parameters.
        '401':
          description: >-
            Unauthorized. The company does not belong to the authenticated
            client's API key.
        '403':
          description: Forbidden. Missing authentication credentials or invalid API key.
        '500':
          description: Internal Server Error. An unexpected error occurred on the server.
components:
  schemas:
    PaginatedCompanyResponse:
      type: object
      properties:
        count:
          type: integer
        total_pages:
          type: integer
        current_page:
          type: integer
        page_size:
          type: integer
        results:
          type: array
          items:
            $ref: '#/components/schemas/Company'
      required:
        - count
        - current_page
        - page_size
        - results
        - total_pages
    Company:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        updated_time:
          type: string
          format: date-time
          readOnly: true
        domain:
          type: string
        name:
          type: string
        company_status:
          type: string
        company_custom_fields:
          type: array
          items:
            $ref: '#/components/schemas/CompanyCustomFields'
        previous_status:
          type: string
          readOnly: true
          nullable: true
        status_changed_at:
          type: string
          format: date-time
          readOnly: true
          nullable: true
      required:
        - domain
        - id
        - previous_status
        - status_changed_at
        - updated_time
    CompanyCustomFields:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        updated_time:
          type: string
          format: date-time
          readOnly: true
        field_name:
          type: string
        field_value:
          type: string
          maxLength: 2500
      required:
        - field_name
        - field_value
        - id
        - updated_time

````