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

# Search identified companies with nested AND/OR filters and saved segments



## OpenAPI

````yaml /api-reference/openapi.json post /v1/trackers/{tracker_code}/companies
openapi: 3.1.0
info:
  title: Leadinfo Data API
  version: 0.1.0
  x-logo:
    url: https://asset.leadinfo.com/assets/email_logo.png
servers:
  - url: https://data.leadinfo.com
    description: Production
security: []
paths:
  /v1/trackers/{tracker_code}/companies:
    post:
      tags:
        - traffic
      summary: >-
        Search identified companies with nested AND/OR filters and saved
        segments
      operationId: search_companies_v1_trackers__tracker_code__companies_post
      parameters:
        - name: tracker_code
          in: path
          required: true
          schema:
            type: string
            title: Tracker Code
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CompaniesSearchBody'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CompaniesResponse'
        '401':
          description: Invalid credentials.
        '403':
          description: Tracker not owned by this client.
        '404':
          description: Segment not found.
        '422':
          description: Invalid filters, or segment has no applicable rules.
      security:
        - HTTPBearer: []
components:
  schemas:
    CompaniesSearchBody:
      properties:
        start_date:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Start Date
          description: >-
            Inclusive start of the window. Defaults to end_date, so omitting
            both dates returns today. Widen explicitly for multi-day analytics
            and expect higher latency on long ranges with high-traffic trackers.
        end_date:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: End Date
          description: Inclusive end of the window. Defaults to today.
        sort:
          type: string
          enum:
            - last_seen
            - first_seen
            - sessions
            - pages
            - duration
            - unique_visitors
            - visitors
            - persona_visitors
            - form_submissions
            - sessions_total
            - lead_score
            - engagement_score
            - icp_score
            - intent_score
            - score
            - name
          title: Sort
          default: last_seen
        order:
          type: string
          enum:
            - asc
            - desc
          title: Order
          default: desc
        limit:
          type: integer
          maximum: 500
          minimum: 1
          title: Limit
          default: 50
        offset:
          type: integer
          maximum: 50000
          minimum: 0
          title: Offset
          default: 0
        include_total:
          type: boolean
          title: Include Total
          default: false
        segment_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: Segment Id
        relationship:
          type: string
          enum:
            - all
            - prospects
            - existing
          title: Relationship
          description: >-
            prospects: not in a connected CRM, not tagged customer, competitor
            or not-interesting, not an AI assistant and not shared-network
            traffic. existing: in a CRM or tagged customer. all: no relationship
            filter.
          default: all
        filters:
          anyOf:
            - $ref: '#/components/schemas/CompanyFilterGroup'
            - type: 'null'
      type: object
      title: CompaniesSearchBody
    CompaniesResponse:
      properties:
        data:
          items:
            $ref: '#/components/schemas/CompanyListRow'
          type: array
          title: Data
        meta:
          $ref: '#/components/schemas/CompaniesPageMeta'
      type: object
      required:
        - data
        - meta
      title: CompaniesResponse
    CompanyFilterGroup:
      properties:
        operator:
          type: string
          enum:
            - and
            - or
          title: Operator
          default: and
        conditions:
          items:
            anyOf:
              - $ref: '#/components/schemas/CompanyFilterRule'
              - $ref: '#/components/schemas/CompanyFilterGroup'
          type: array
          title: Conditions
      type: object
      title: CompanyFilterGroup
    CompanyListRow:
      properties:
        company_id:
          type: integer
          title: Company Id
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        domain:
          anyOf:
            - type: string
            - type: 'null'
          title: Domain
        website_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Website Url
        country:
          anyOf:
            - type: string
            - type: 'null'
          title: Country
        city:
          anyOf:
            - type: string
            - type: 'null'
          title: City
        province:
          anyOf:
            - type: string
            - type: 'null'
          title: Province
        postal_code:
          anyOf:
            - type: string
            - type: 'null'
          title: Postal Code
        employee_range:
          anyOf:
            - type: string
            - type: 'null'
          title: Employee Range
        employees:
          anyOf:
            - type: integer
            - type: 'null'
          title: Employees
        branch_code:
          anyOf:
            - type: integer
            - type: 'null'
          title: Branch Code
        branch_local:
          anyOf:
            - type: string
            - type: 'null'
          title: Branch Local
        branch_international:
          anyOf:
            - type: string
            - type: 'null'
          title: Branch International
        legal_form:
          anyOf:
            - type: string
            - type: 'null'
          title: Legal Form
        sales_volume:
          anyOf:
            - type: integer
            - type: 'null'
          title: Sales Volume
        founding_date:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Founding Date
        linkedin:
          anyOf:
            - type: string
            - type: 'null'
          title: Linkedin
        logo:
          anyOf:
            - type: string
            - type: 'null'
          title: Logo
        sessions:
          type: integer
          title: Sessions
        pages:
          type: integer
          title: Pages
        duration:
          type: integer
          title: Duration
        unique_visitors:
          type: integer
          title: Unique Visitors
          description: >-
            Distinct IP addresses seen for the company in the window; an
            approximation of distinct people.
        active_days:
          type: integer
          title: Active Days
        first_seen:
          type: string
          format: date-time
          title: First Seen
        last_seen:
          type: string
          format: date-time
          title: Last Seen
        last_source:
          anyOf:
            - type: string
            - type: 'null'
          title: Last Source
        last_medium:
          anyOf:
            - type: string
            - type: 'null'
          title: Last Medium
        visitors:
          type: integer
          title: Visitors
          default: 0
        persona_visitors:
          type: integer
          title: Persona Visitors
          description: >-
            Identified visitors in the window whose job title and country match
            one of your personas.
          default: 0
        form_submissions:
          type: integer
          title: Form Submissions
          default: 0
        leadbot_submissions:
          type: integer
          title: Leadbot Submissions
          default: 0
        sessions_total:
          type: integer
          title: Sessions Total
          description: >-
            Sessions in the last two years (the retention window), not bounded
            by the date window.
        pages_total:
          type: integer
          title: Pages Total
        duration_total:
          type: integer
          title: Duration Total
        is_new:
          type: boolean
          title: Is New
          description: No sessions before the date window.
        is_returning:
          type: boolean
          title: Is Returning
          description: Had sessions before the date window.
        lead_score:
          type: integer
          title: Lead Score
          description: >-
            Leadinfo lead score, 0-100, based on the company's visit days,
            sessions and pages on this tracker.
        is_ai_agent:
          type: boolean
          title: Is Ai Agent
          description: >-
            An AI assistant (Claude, ChatGPT, Perplexity, Meta AI or Gemini)
            fetching pages on a user's behalf or crawling. Useful for GEO; never
            a sales target and excluded from opportunities.
          default: false
        in_crm:
          type: boolean
          title: In Crm
          description: >-
            Linked to a record in one of the account's connected CRMs: an
            existing relationship Sales already knows about.
          default: false
        crm_integrations:
          items:
            type: string
          type: array
          title: Crm Integrations
          description: The connected CRMs holding this company, e.g. ['hubspot'].
        engagement_sessions:
          type: integer
          title: Engagement Sessions
          description: Sessions over the 90 days up to end_date.
          default: 0
        engagement_pages:
          type: integer
          title: Engagement Pages
          description: Pages over the 90 days up to end_date.
          default: 0
        engagement_unique_visitors:
          type: integer
          title: Engagement Unique Visitors
          description: Distinct IP addresses over the 90 days up to end_date.
          default: 0
        is_shared_network:
          type: boolean
          title: Is Shared Network
          description: >-
            Many distinct visitors with about one page per session over the 90
            days up to end_date: the signature of an ISP or shared office
            network rather than buying interest. Excluded from opportunities and
            from relationship=prospects.
          default: false
        engagement_score:
          type: integer
          title: Engagement Score
          description: >-
            0-100 engagement over the 90 days up to end_date, independent of
            start_date: the company's sessions and their extra pages, decayed
            with a 14-day half-life. Forms, Leadbot and identified visitors
            count in people_score instead.
        engagement_tier:
          type: string
          enum:
            - cold
            - warm
            - hot
          title: Engagement Tier
        icp_score:
          anyOf:
            - type: integer
            - type: 'null'
          title: Icp Score
          description: >-
            100 when the company matches every rule of an active ICP Builder
            profile, 0 otherwise; null when the account has no active ICP
            profile (the fit pillar then drops out of score).
        intent_score:
          anyOf:
            - type: integer
            - type: 'null'
          title: Intent Score
          description: >-
            0-100 from the page rules of the best-matching active Intent Builder
            profile the company triggered in the 90 days up to end_date: one
            rule about 50, two about 75, three about 85; null without a profile.
        score:
          type: integer
          title: Score
          description: >-
            Unified 0-100 score: fit (active ICP profiles), intent, engagement
            and people, weighted as in meta.scoring.weights; a pillar without an
            active profile drops out.
          default: 0
        score_tier:
          anyOf:
            - type: string
              enum:
                - hot
                - warm
                - cool
                - cold
            - type: 'null'
          title: Score Tier
          description: >-
            Tier of the unified score: hot 70 and up, warm 50 to 69, cool 30 to
            49, cold below 30.
        people_score:
          anyOf:
            - type: integer
            - type: 'null'
          title: People Score
          description: >-
            The people pillar, 0-100: contacts' actions, fading over time, in
            full for the best-matching persona's contacts and at half for anyone
            else; stored scores also count 30 when the contact database has
            persona matches at the company.
        score_as_of:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Score As Of
          description: >-
            Stored scores only: the date the stored score was last recomputed
            with a change.
        tags:
          items:
            $ref: '#/components/schemas/TagRef'
          type: array
          title: Tags
      type: object
      required:
        - company_id
        - sessions
        - pages
        - duration
        - unique_visitors
        - active_days
        - first_seen
        - last_seen
        - sessions_total
        - pages_total
        - duration_total
        - is_new
        - is_returning
        - lead_score
        - engagement_score
        - engagement_tier
      title: CompanyListRow
      description: |-
        A row of the companies list: the score as one number with its tier and
        pillar values; the breakdown per pillar and per profile is on
        GET .../companies/{company_id}/score.
    CompaniesPageMeta:
      properties:
        total:
          anyOf:
            - type: integer
            - type: 'null'
          title: Total
        has_more:
          type: boolean
          title: Has More
        returned:
          type: integer
          title: Returned
        limit:
          anyOf:
            - type: integer
            - type: 'null'
          title: Limit
        offset:
          type: integer
          title: Offset
          default: 0
        next_offset:
          anyOf:
            - type: integer
            - type: 'null'
          title: Next Offset
          description: The offset of the next page; null on the last page.
        segment_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: Segment Id
        unsupported_rules:
          items:
            $ref: '#/components/schemas/UnsupportedRule'
          type: array
          title: Unsupported Rules
        scoring:
          anyOf:
            - $ref: '#/components/schemas/ScoringMeta'
            - type: 'null'
      type: object
      required:
        - has_more
        - returned
      title: CompaniesPageMeta
    CompanyFilterRule:
      properties:
        field:
          type: string
          enum:
            - name
            - domain
            - country
            - city
            - province
            - postal_code
            - employee_range
            - branch_local
            - branch_international
            - legal_form
            - description
            - region
            - employees
            - branch_code
            - sales_volume
            - founded_year
            - sessions
            - pages
            - duration
            - unique_visitors
            - active_days
            - visitors
            - persona_visitors
            - form_submissions
            - leadbot_submissions
            - sessions_total
            - pages_total
            - duration_total
            - is_new
            - is_returning
            - lead_score
            - is_ai_agent
            - in_crm
            - is_shared_network
            - engagement_score
            - icp_score
            - intent_score
            - score
            - first_seen
            - last_seen
            - source
            - medium
            - campaign
            - term
            - content
            - referrer
            - referrer_host
            - click_provider
            - paid_source
            - organic_source
            - social_source
            - ai_source
            - url
            - page_title
            - tag
          title: Field
        operator:
          type: string
          enum:
            - equals
            - not_equals
            - contains
            - not_contains
            - starts_with
            - not_starts_with
            - ends_with
            - not_ends_with
            - in
            - not_in
            - all
            - greater_than
            - greater_than_or_equal
            - less_than
            - less_than_or_equal
            - between
            - not_between
            - is_known
            - is_unknown
            - less_than_x_units_ago
            - more_than_x_units_ago
          title: Operator
        value:
          anyOf:
            - {}
            - type: 'null'
          title: Value
        unit:
          anyOf:
            - type: string
              enum:
                - hours
                - days
                - weeks
                - months
            - type: 'null'
          title: Unit
      type: object
      required:
        - field
        - operator
      title: CompanyFilterRule
    TagRef:
      properties:
        id:
          type: integer
          title: Id
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
      type: object
      required:
        - id
      title: TagRef
    UnsupportedRule:
      properties:
        field:
          anyOf:
            - type: string
            - type: 'null'
          title: Field
        operator:
          anyOf:
            - type: string
            - type: 'null'
          title: Operator
        reason:
          type: string
          title: Reason
      type: object
      required:
        - reason
      title: UnsupportedRule
    ScoringMeta:
      properties:
        icp_profiles:
          items:
            $ref: '#/components/schemas/ProfileName'
          type: array
          title: Icp Profiles
          description: Every active ICP Builder profile; fit is the best match among them.
        intent_profiles:
          items:
            $ref: '#/components/schemas/ProfileName'
          type: array
          title: Intent Profiles
          description: >-
            Every active Intent Builder profile; intent is the best match among
            them.
        weights:
          additionalProperties:
            type: integer
          type: object
          title: Weights
          description: >-
            Effective pillar weights in percent; pillars without a profile, and
            the persona pillar when inactive, are dropped and the rest
            renormalised.
        source:
          type: string
          enum:
            - live
            - stored
          title: Source
          description: >-
            stored: scores come from the scoring job, refreshed every 15 minutes
            and nightly, with history and an event feed; live: computed per
            request.
          default: live
        scored_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Scored At
          description: When the scoring job last ran for this account (stored only).
        scoring_version:
          anyOf:
            - type: string
            - type: 'null'
          title: Scoring Version
          description: Version of the scoring formula (stored only).
      type: object
      required:
        - weights
      title: ScoringMeta
    ProfileName:
      properties:
        id:
          type: integer
          title: Id
        name:
          type: string
          title: Name
      type: object
      required:
        - id
        - name
      title: ProfileName
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.