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

# Search Companies

> Returns companies matching at least one filter. Filters can be combined.

**At least one filter is required** (website, employees/employees_min/employees_max, industry, social URLs) or the API returns 422.

- `website` is normalized to a domain (strips scheme, www) and matched against `companies.domain_root` OR `company_profile_observations.website_url` (substring match).
- `employees` is an exact match. Otherwise `employees_min`/`employees_max` apply as range filters.
- `industry` is provided as an array in the docs UI. Your API can still accept a single value; users can just enter one item.
- Social inputs are combined into a single list and matched exactly against observed social profile URLs for the latest run.

Results are returned with latest observed profile fields plus enriched industries and social links.



## OpenAPI

````yaml GET /companies/lookup
openapi: 3.1.0
info:
  title: TargetSmarter API
  version: 1.0.0
  description: API v1 endpoints for company lookup and supported industries.
servers:
  - url: https://api.targetsmarter.com/api/v1
security:
  - ApiKeyBearer: []
paths:
  /companies/lookup:
    get:
      summary: Lookup companies by filters (website, employees, industry, social URLs)
      description: >-
        Returns companies matching at least one filter. Filters can be combined.


        **At least one filter is required** (website,
        employees/employees_min/employees_max, industry, social URLs) or the API
        returns 422.


        - `website` is normalized to a domain (strips scheme, www) and matched
        against `companies.domain_root` OR
        `company_profile_observations.website_url` (substring match).

        - `employees` is an exact match. Otherwise
        `employees_min`/`employees_max` apply as range filters.

        - `industry` is provided as an array in the docs UI. Your API can still
        accept a single value; users can just enter one item.

        - Social inputs are combined into a single list and matched exactly
        against observed social profile URLs for the latest run.


        Results are returned with latest observed profile fields plus enriched
        industries and social links.
      operationId: companyLookup
      parameters:
        - name: page
          in: query
          description: Page number (min 1).
          schema:
            type: integer
            minimum: 1
            default: 1
          required: false
          example: 1
        - name: per_page
          in: query
          description: Results per page (min 1, max 200). Default is 50.
          schema:
            type: integer
            minimum: 1
            maximum: 200
            default: 50
          required: false
          example: 25
        - name: website
          in: query
          description: >-
            Website or domain to match. Normalized to a host (scheme optional).
            Example: `https://example.com` or `example.com`.
          schema:
            type: string
            maxLength: 2048
          required: false
          examples:
            domain:
              value: stripe.com
            full_url:
              value: https://www.notion.so
        - name: employees
          in: query
          description: >-
            Exact employee count match (integer >= 0). If provided,
            employees_min/max are ignored.
          schema:
            type: integer
            minimum: 0
          required: false
          example: 500
        - name: employees_min
          in: query
          description: >-
            Minimum employee count (integer >= 0). Used when `employees` not
            provided.
          schema:
            type: integer
            minimum: 0
          required: false
          example: 50
        - name: employees_max
          in: query
          description: >-
            Maximum employee count (integer >= 0). Used when `employees` not
            provided.
          schema:
            type: integer
            minimum: 0
          required: false
          example: 500
        - name: industry
          in: query
          description: >-
            Industry filter (repeatable). Enter one or more industry names.
            Match is substring on industry name.


            Examples in querystring:

            - `?industry=FinTech&industry=Cybersecurity` (explode=true)


            Note: The backend may also accept a single industry value; in the
            docs UI you can just enter one item.
          schema:
            type: array
            items:
              type: string
              maxLength: 160
            minItems: 1
          required: false
          style: form
          explode: true
          examples:
            one:
              value:
                - FinTech
            multiple:
              value:
                - FinTech
                - Cybersecurity
        - name: social_urls
          in: query
          description: >-
            Array of social profile URLs to match exactly. Example:
            `social_urls=https://linkedin.com/company/acme&social_urls=https://x.com/acme`
          schema:
            type: array
            items:
              type: string
              maxLength: 2048
          required: false
          style: form
          explode: true
          examples:
            linkedin_only:
              value:
                - https://www.linkedin.com/company/stripe/
            multiple:
              value:
                - https://www.linkedin.com/company/stripe/
                - https://x.com/stripe
        - name: linkedin_url
          in: query
          description: >-
            Single LinkedIn profile URL to match exactly (added to the social
            URLs list).
          schema:
            type: string
            maxLength: 2048
          required: false
          example: https://www.linkedin.com/company/stripe/
        - name: facebook_url
          in: query
          description: >-
            Single Facebook profile URL to match exactly (added to the social
            URLs list).
          schema:
            type: string
            maxLength: 2048
          required: false
          example: https://www.facebook.com/Meta/
        - name: x_url
          in: query
          description: >-
            Single X (Twitter) profile URL to match exactly (added to the social
            URLs list).
          schema:
            type: string
            maxLength: 2048
          required: false
          example: https://x.com/stripe
      responses:
        '200':
          description: Company lookup results (paginated).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CompanyLookupResponse'
              examples:
                sample:
                  value:
                    count: 2
                    results:
                      - id: 123
                        name: Example Corp
                        website: https://example.com
                        domain_root: example.com
                        industry:
                          - FinTech
                          - Payments
                        num_employees: 250
                        location: New York, NY
                        social:
                          linkedin: https://www.linkedin.com/company/example/
                        observed_at: '2026-01-15T12:34:56Z'
                      - id: 456
                        name: Acme Security
                        website: https://acmesec.com
                        domain_root: acmesec.com
                        industry:
                          - Cybersecurity
                        num_employees: 90
                        location: Austin, TX
                        social:
                          x: https://x.com/acmesec
                        observed_at: '2026-01-12T09:00:00Z'
                    page: 1
                    per_page: 50
                    last_page: 1
                    next_page_url: null
                    prev_page_url: null
        '401':
          description: Unauthorized (missing or invalid API key).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthError'
              examples:
                missing:
                  value:
                    error: missing_api_key
                format:
                  value:
                    error: invalid_api_key_format
                invalid:
                  value:
                    error: invalid_api_key
        '422':
          description: >-
            Validation error (e.g., no filters provided, invalid parameter
            types/ranges).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LaravelValidationError'
              examples:
                no_filters:
                  value:
                    message: The given data was invalid.
                    errors:
                      filters:
                        - At least one filter is required.
components:
  schemas:
    CompanyLookupResponse:
      type: object
      additionalProperties: false
      required:
        - count
        - results
        - page
        - per_page
        - last_page
        - next_page_url
        - prev_page_url
      properties:
        count:
          type: integer
          description: Total matches across all pages.
        results:
          type: array
          items:
            $ref: '#/components/schemas/CompanyResult'
        page:
          type: integer
        per_page:
          type: integer
        last_page:
          type: integer
        next_page_url:
          type:
            - string
            - 'null'
        prev_page_url:
          type:
            - string
            - 'null'
    AuthError:
      type: object
      additionalProperties: false
      required:
        - error
      properties:
        error:
          type: string
          enum:
            - missing_api_key
            - invalid_api_key_format
            - invalid_api_key
    LaravelValidationError:
      type: object
      additionalProperties: true
      required:
        - message
        - errors
      properties:
        message:
          type: string
        errors:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
    CompanyResult:
      type: object
      additionalProperties: false
      required:
        - id
        - name
        - website
        - domain_root
        - industry
        - num_employees
        - location
        - social
        - observed_at
      properties:
        id:
          type: integer
          description: Company ID.
        name:
          type:
            - string
            - 'null'
          description: Legal name.
        website:
          type:
            - string
            - 'null'
          maxLength: 4096
        domain_root:
          type:
            - string
            - 'null'
        industry:
          type: array
          items:
            type: string
        num_employees:
          type:
            - integer
            - 'null'
        location:
          type:
            - string
            - 'null'
        social:
          oneOf:
            - type: object
              additionalProperties:
                type: string
            - type: object
        observed_at:
          type:
            - string
            - 'null'
          format: date-time
  securitySchemes:
    ApiKeyBearer:
      type: http
      scheme: bearer
      bearerFormat: APIKey
      description: 'Use `Authorization: Bearer <prefix>.<secret>`.'

````