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

# Build LinkedIn search URL

> Build the LinkedIn URL of a people or company search, regular or Sales Navigator, from that search's filters: send exactly ONE of people / sales_nav_people / companies / sales_nav_companies. Facet values take an id or plain text; each text is resolved by the search's own typeahead (the option labelled exactly so, else the first; a multi-word miss is retried by its first word), at most 10 lookups per call, each a paced scraping read (Sales Navigator ones need an SN seat). A text nothing matches is a 422 naming the closest options, except on Sales Navigator titles and companies, where it stays free text. Returns url (Sales Navigator in its ?query= form, the one imports read), filters in the exact shape the matching search tool takes, and resolved: per text, the id picked and the alternatives. All ids given: no LinkedIn call at all. Recruiter has no build: its URL comes from running scrape_linkedin_search_recruiter_people.

Contract:
- MCP tool `scrape_linkedin_build_search_url`, registry package `mcp.linkedin/linkedin_scraping`, mount `linkedin.scraping`.
- Operation `action`, response envelope `action`.
- Flags: paced: a call spends the `scraping` smart-limit bucket of the account it runs on, and calls of one bucket are spaced per account. A short wait is slept by the server; a longer one answers 429 `rate_limited` with `context.retry_after`, and the same call succeeds from that moment. Parallel calls on one account queue behind each other.



## OpenAPI

````yaml /api-reference/linkedin/openapi.yaml post /api/linkedin-scraping/build-search-url
openapi: 3.0.3
info:
  title: 'GTM API public contract: gtm.service.linkedin'
  description: >-
    Connected LinkedIn accounts and everything driven through them: account
    health and smart limits, conversations and messages, the connection graph,
    outbound posting, scraping, profile and company enrichment, and the
    antidetect browsers that execute it all.


    GENERATED. This document is projected from the Zod MCP tool registry in
    `product/mcp/gtm.mcp` (one tool per public endpoint, 1:1). Do not edit it by
    hand; edit the tool definition and regenerate with `pnpm openapi:public`.


    Surface: the public `/api` contract of `gtm.service.linkedin`, 191
    operations. This is the only OpenAPI document the platform publishes.
    Internal (`/internal`) and health endpoints are deliberately absent: they
    are not part of any contract, they can change without notice, and the
    service source is their only description.


    Conventions:

    - Auth is a bearer JWT, optionally narrowed by the `Team-SID` header.

    - Every success body is an MCP envelope: `success: true` plus one typed
    `operation` shape (`search`, `get`, `create`, `update`, `delete`, `metrics`,
    `group_by`, `action`), and a `meta` block with `trace_id` for support.

    - Every failure is the same `McpError` envelope with a code from a fixed
    16-code taxonomy, so a client maps errors once.

    - Lists page with `page_size` (0 to 500, default 50) plus an opaque forward
    `cursor`; `page_size: 0` returns counts only.

    - On `GET` and `DELETE`, object-valued query parameters (`filter`, `sort`)
    travel as JSON text and array-valued ones repeat as `name[]=value`.

    - The MCP-only `_meta` field (usage analytics) never reaches the backend and
    is not part of this contract.
  version: '1.0'
  contact:
    name: GTM API
    url: https://gtm-api.com
    email: support@gtm-api.com
  license:
    name: Proprietary
    url: https://gtm-api.com/license
servers:
  - url: https://app.gtm-api.com/linkedin/v4
    description: Production, through the app.gtm-api.com gateway
security:
  - BearerJwt: []
    TeamSid: []
tags:
  - name: antidetect_browser_logs
    description: >-
      Registry package `mcp.linkedin/antidetect_browser_logs`, served on MCP
      mount `linkedin.browsers`.
  - name: antidetect_browser_proxies
    description: >-
      Registry package `mcp.linkedin/antidetect_browser_proxies`, served on MCP
      mount `linkedin.browsers`.
  - name: antidetect_browsers
    description: >-
      Registry package `mcp.linkedin/antidetect_browsers`, served on MCP mount
      `linkedin.browsers`.
  - name: cloud_browser_sessions
    description: >-
      Registry package `mcp.linkedin/cloud_browser_sessions`, served on MCP
      mount `linkedin.browsers`.
  - name: cloud_browsers
    description: >-
      Registry package `mcp.linkedin/cloud_browsers`, served on MCP mount
      `linkedin.browsers`.
  - name: data_requests
    description: >-
      Registry package `mcp.linkedin/data_requests`, served on MCP mount
      `linkedin.data`.
  - name: linkedin_account_activity_log
    description: >-
      Registry package `mcp.linkedin/linkedin_account_activity_log`, served on
      MCP mount `linkedin.account-monitor`.
  - name: linkedin_account_block_log
    description: >-
      Registry package `mcp.linkedin/linkedin_account_block_log`, served on MCP
      mount `linkedin.account-monitor`.
  - name: linkedin_account_quota_hits
    description: >-
      Registry package `mcp.linkedin/linkedin_account_quota_hits`, served on MCP
      mount `linkedin.account-monitor`.
  - name: linkedin_account_smart_limits
    description: >-
      Registry package `mcp.linkedin/linkedin_account_smart_limits`, served on
      MCP mount `linkedin.accounts`.
  - name: linkedin_account_snapshots
    description: >-
      Registry package `mcp.linkedin/linkedin_account_snapshots`, served on MCP
      mount `linkedin.account-monitor`.
  - name: linkedin_account_sync_runs
    description: >-
      Registry package `mcp.linkedin/linkedin_account_sync_runs`, served on MCP
      mount `linkedin.account-monitor`.
  - name: linkedin_accounts
    description: >-
      Registry package `mcp.linkedin/linkedin_accounts`, served on MCP mount
      `linkedin.accounts`.
  - name: linkedin_auto_scrape_results
    description: >-
      Registry package `mcp.linkedin/linkedin_auto_scrape_results`, served on
      MCP mount `linkedin.auto-scrapes`.
  - name: linkedin_auto_scrape_runs
    description: >-
      Registry package `mcp.linkedin/linkedin_auto_scrape_runs`, served on MCP
      mount `linkedin.auto-scrapes`.
  - name: linkedin_auto_scrapes
    description: >-
      Registry package `mcp.linkedin/linkedin_auto_scrapes`, served on MCP mount
      `linkedin.auto-scrapes`.
  - name: linkedin_benchmarks
    description: >-
      Registry package `mcp.linkedin/linkedin_benchmarks`, served on MCP mount
      `linkedin.account-monitor`.
  - name: linkedin_connection_invitations
    description: >-
      Registry package `mcp.linkedin/linkedin_connection_invitations`, served on
      MCP mount `linkedin.network`.
  - name: linkedin_connection_requests
    description: >-
      Registry package `mcp.linkedin/linkedin_connection_requests`, served on
      MCP mount `linkedin.network`.
  - name: linkedin_connections
    description: >-
      Registry package `mcp.linkedin/linkedin_connections`, served on MCP mount
      `linkedin.network`.
  - name: linkedin_conversations
    description: >-
      Registry package `mcp.linkedin/linkedin_conversations`, served on MCP
      mount `linkedin.messaging`.
  - name: linkedin_custom_requests
    description: >-
      Registry package `mcp.linkedin/linkedin_custom_requests`, served on MCP
      mount `linkedin.platform`.
  - name: linkedin_enrichment
    description: >-
      Registry package `mcp.linkedin/linkedin_enrichment`, served on MCP mount
      `linkedin.enrichment`.
  - name: linkedin_followers
    description: >-
      Registry package `mcp.linkedin/linkedin_followers`, served on MCP mount
      `linkedin.network`.
  - name: linkedin_messages
    description: >-
      Registry package `mcp.linkedin/linkedin_messages`, served on MCP mount
      `linkedin.messaging`.
  - name: linkedin_posting
    description: >-
      Registry package `mcp.linkedin/linkedin_posting`, served on MCP mount
      `linkedin.content`.
  - name: linkedin_scraping
    description: >-
      Registry package `mcp.linkedin/linkedin_scraping`, served on MCP mount
      `linkedin.scraping`.
paths:
  /api/linkedin-scraping/build-search-url:
    post:
      tags:
        - linkedin_scraping
      summary: Build LinkedIn search URL
      description: >-
        Build the LinkedIn URL of a people or company search, regular or Sales
        Navigator, from that search's filters: send exactly ONE of people /
        sales_nav_people / companies / sales_nav_companies. Facet values take an
        id or plain text; each text is resolved by the search's own typeahead
        (the option labelled exactly so, else the first; a multi-word miss is
        retried by its first word), at most 10 lookups per call, each a paced
        scraping read (Sales Navigator ones need an SN seat). A text nothing
        matches is a 422 naming the closest options, except on Sales Navigator
        titles and companies, where it stays free text. Returns url (Sales
        Navigator in its ?query= form, the one imports read), filters in the
        exact shape the matching search tool takes, and resolved: per text, the
        id picked and the alternatives. All ids given: no LinkedIn call at all.
        Recruiter has no build: its URL comes from running
        scrape_linkedin_search_recruiter_people.


        Contract:

        - MCP tool `scrape_linkedin_build_search_url`, registry package
        `mcp.linkedin/linkedin_scraping`, mount `linkedin.scraping`.

        - Operation `action`, response envelope `action`.

        - Flags: paced: a call spends the `scraping` smart-limit bucket of the
        account it runs on, and calls of one bucket are spaced per account. A
        short wait is slept by the server; a longer one answers 429
        `rate_limited` with `context.retry_after`, and the same call succeeds
        from that moment. Parallel calls on one account queue behind each other.
      operationId: scrape_linkedin_build_search_url
      requestBody:
        required: false
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ScrapeLinkedinBuildSearchUrlRequest'
      responses:
        '200':
          description: '`action` success envelope.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScrapeLinkedinBuildSearchUrlResponse'
        4XX:
          $ref: '#/components/responses/McpClientError'
        5XX:
          $ref: '#/components/responses/McpServerError'
components:
  schemas:
    ScrapeLinkedinBuildSearchUrlRequest:
      type: object
      description: Request body of `scrape_linkedin_build_search_url`.
      properties:
        linkedin_account_sid:
          type: string
          nullable: true
          minLength: 18
          maxLength: 18
          pattern: ^ln_ac_
          description: >-
            Executor account (ln_ac_...). OPTIONAL everywhere on this surface.
            Given: the call runs on that account ONLY; a saturated or held
            scraping bucket refuses 429 bucket_saturated (with retry_after).
            Omitted: the service auto-picks one of your connected accounts with
            remaining capacity (SN verbs pick only Sales-Navigator seats; 422
            no_connected_accounts when none is ready, 429 when all are at
            capacity).
        idempotency_key:
          type: string
          nullable: true
          maxLength: 128
          description: >-
            Ledger replay guard: a repeat call with the same (team, key) returns
            the stored outcome; no re-execution. Recommended on every search
            run. The KEY ALONE decides: the probe does not compare arguments, so
            reusing one key after changing the arguments hands back the FIRST
            result. On the twelve search verbs that matters twice over, because
            switching a call from filters to url (or back) under one key replays
            instead of running the new search. New search, new key.
        people:
          type: object
          nullable: true
          properties:
            keywords:
              type: string
              nullable: true
              maxLength: 256
              description: Free-text query.
            first_name:
              type: string
              nullable: true
              maxLength: 100
            last_name:
              type: string
              nullable: true
              maxLength: 100
            title:
              type: string
              nullable: true
              maxLength: 256
              description: Current-title keywords.
            company:
              type: string
              nullable: true
              maxLength: 256
              description: Current-company keywords (free text; prefer current_companies).
            school:
              type: string
              nullable: true
              maxLength: 256
              description: >-
                School free-text: this engine has no school-id facet, so
                lookup(type: "school") ids fit nowhere here.
            network:
              type: array
              nullable: true
              items:
                type: string
                enum:
                  - 1st
                  - 2nd
                  - 3rd_plus
              maxItems: 3
              description: >-
                Relationship-degree facet; the node maps each degree onto the
                LinkedIn wire code (F/S/O) itself.
            locations:
              type: array
              nullable: true
              items:
                type: object
                properties:
                  id:
                    type: string
                    nullable: true
                    maxLength: 64
                    pattern: ^\d+$
                    description: A numeric id, as the search takes it; rides as it is.
                  text:
                    type: string
                    nullable: true
                    maxLength: 100
                    description: >-
                      Human text to resolve ("Berlin", "Acme"): typed into the
                      typeahead, which picks the option labelled exactly so,
                      else LinkedIn's first.
                description: >-
                  One value: an id, or a text to resolve (at least one of the
                  two).
              maxItems: 10
              description: Geography (location typeahead).
            industries:
              type: array
              nullable: true
              items:
                type: object
                properties:
                  id:
                    type: string
                    nullable: true
                    maxLength: 64
                    pattern: ^\d+$
                    description: A numeric id, as the search takes it; rides as it is.
                  text:
                    type: string
                    nullable: true
                    maxLength: 100
                    description: >-
                      Human text to resolve ("Berlin", "Acme"): typed into the
                      typeahead, which picks the option labelled exactly so,
                      else LinkedIn's first.
                description: >-
                  One value: an id, or a text to resolve (at least one of the
                  two).
              maxItems: 10
              description: Industries (industry typeahead).
            current_companies:
              type: array
              nullable: true
              items:
                type: object
                properties:
                  id:
                    type: string
                    nullable: true
                    maxLength: 64
                    pattern: ^\d+$
                    description: A numeric id, as the search takes it; rides as it is.
                  text:
                    type: string
                    nullable: true
                    maxLength: 100
                    description: >-
                      Human text to resolve ("Berlin", "Acme"): typed into the
                      typeahead, which picks the option labelled exactly so,
                      else LinkedIn's first.
                description: >-
                  One value: an id, or a text to resolve (at least one of the
                  two).
              maxItems: 10
              description: Current employer (company typeahead).
            past_companies:
              type: array
              nullable: true
              items:
                type: object
                properties:
                  id:
                    type: string
                    nullable: true
                    maxLength: 64
                    pattern: ^\d+$
                    description: A numeric id, as the search takes it; rides as it is.
                  text:
                    type: string
                    nullable: true
                    maxLength: 100
                    description: >-
                      Human text to resolve ("Berlin", "Acme"): typed into the
                      typeahead, which picks the option labelled exactly so,
                      else LinkedIn's first.
                description: >-
                  One value: an id, or a text to resolve (at least one of the
                  two).
              maxItems: 10
              description: Past employer (company typeahead).
            service_categories:
              type: array
              nullable: true
              items:
                type: object
                properties:
                  id:
                    type: string
                    nullable: true
                    maxLength: 64
                    pattern: ^\d+$
                    description: A numeric id, as the search takes it; rides as it is.
                  text:
                    type: string
                    nullable: true
                    maxLength: 100
                    description: >-
                      Human text to resolve ("Berlin", "Acme"): typed into the
                      typeahead, which picks the option labelled exactly so,
                      else LinkedIn's first.
                description: >-
                  One value: an id, or a text to resolve (at least one of the
                  two).
              maxItems: 10
              description: Service categories (service_category typeahead).
            connections_of:
              type: array
              nullable: true
              items:
                type: object
                properties:
                  id:
                    type: string
                    nullable: true
                    maxLength: 128
                    pattern: ^[\w-]+$
                    description: >-
                      A profile id (ACoA…), as the search takes it; rides as it
                      is.
                  text:
                    type: string
                    nullable: true
                    maxLength: 100
                    description: >-
                      Human text to resolve ("Berlin", "Acme"): typed into the
                      typeahead, which picks the option labelled exactly so,
                      else LinkedIn's first.
                description: >-
                  One value: an id, or a text to resolve (at least one of the
                  two).
              maxItems: 10
              description: >-
                People connected to these members: a name resolves through the
                connections typeahead.
            followers_of:
              type: array
              nullable: true
              items:
                type: object
                properties:
                  id:
                    type: string
                    nullable: true
                    maxLength: 128
                    pattern: ^[\w-]+$
                    description: >-
                      A profile id (ACoA…), as the search takes it; rides as it
                      is.
                  text:
                    type: string
                    nullable: true
                    maxLength: 100
                    description: >-
                      Human text to resolve ("Berlin", "Acme"): typed into the
                      typeahead, which picks the option labelled exactly so,
                      else LinkedIn's first.
                description: >-
                  One value: an id, or a text to resolve (at least one of the
                  two).
              maxItems: 10
              description: >-
                People following these members: a name resolves through the
                people typeahead.
            profile_languages:
              type: array
              nullable: true
              items:
                type: string
              maxItems: 10
              description: ISO 639-1 language codes.
            open_to_volunteer:
              type: boolean
              nullable: true
          description: >-
            The scrape_linkedin_search_people filters. A text the typeahead
            offers nothing for is a 422 naming it: these members take ids only.
        sales_nav_people:
          type: object
          nullable: true
          properties:
            keywords:
              type: string
              nullable: true
              maxLength: 256
            first_name:
              type: string
              nullable: true
              maxLength: 100
              description: Text-only wire facet (no id space).
            last_name:
              type: string
              nullable: true
              maxLength: 100
              description: Text-only wire facet (no id space).
            current_titles:
              type: array
              nullable: true
              items:
                type: object
                properties:
                  id:
                    type: string
                    nullable: true
                    maxLength: 128
                    description: >-
                      Opaque SN facet id, VERBATIM from
                      scrape_linkedin_sales_nav_param_id_lookup.
                  text:
                    type: string
                    nullable: true
                    maxLength: 256
                    description: >-
                      Text to resolve into an id plus LinkedIn's label; one the
                      typeahead offers nothing for stays a free-text chip, which
                      SN matches on this facet.
                  exclude:
                    type: boolean
                    nullable: true
                    description: >-
                      true → EXCLUDED (negative filter); omitted/false →
                      INCLUDED.
                  free_text:
                    type: boolean
                    nullable: true
                    description: true → send the text as a free-text chip, unresolved.
                description: 'One chip: an id, or a text (at least one of the two).'
              maxItems: 10
              description: Current job titles (TITLE).
            past_titles:
              type: array
              nullable: true
              items:
                type: object
                properties:
                  id:
                    type: string
                    nullable: true
                    maxLength: 128
                    description: >-
                      Opaque SN facet id, VERBATIM from
                      scrape_linkedin_sales_nav_param_id_lookup.
                  text:
                    type: string
                    nullable: true
                    maxLength: 256
                    description: >-
                      Text to resolve into an id plus LinkedIn's label; one the
                      typeahead offers nothing for stays a free-text chip, which
                      SN matches on this facet.
                  exclude:
                    type: boolean
                    nullable: true
                    description: >-
                      true → EXCLUDED (negative filter); omitted/false →
                      INCLUDED.
                  free_text:
                    type: boolean
                    nullable: true
                    description: true → send the text as a free-text chip, unresolved.
                description: 'One chip: an id, or a text (at least one of the two).'
              maxItems: 10
              description: Past job titles (TITLE).
            locations:
              type: array
              nullable: true
              items:
                type: object
                properties:
                  id:
                    type: string
                    nullable: true
                    maxLength: 128
                    description: >-
                      Opaque SN facet id, VERBATIM from
                      scrape_linkedin_sales_nav_param_id_lookup.
                  text:
                    type: string
                    nullable: true
                    maxLength: 256
                    description: >-
                      Text to resolve into an id plus LinkedIn's label; one the
                      typeahead offers nothing for is a 422 naming the closest
                      options.
                  exclude:
                    type: boolean
                    nullable: true
                    description: >-
                      true → EXCLUDED (negative filter); omitted/false →
                      INCLUDED.
                description: 'One chip: an id, or a text (at least one of the two).'
              maxItems: 10
              description: Person geography (BING_GEO).
            company_headquarters:
              type: array
              nullable: true
              items:
                type: object
                properties:
                  id:
                    type: string
                    nullable: true
                    maxLength: 128
                    description: >-
                      Opaque SN facet id, VERBATIM from
                      scrape_linkedin_sales_nav_param_id_lookup.
                  text:
                    type: string
                    nullable: true
                    maxLength: 256
                    description: >-
                      Text to resolve into an id plus LinkedIn's label; one the
                      typeahead offers nothing for is a 422 naming the closest
                      options.
                  exclude:
                    type: boolean
                    nullable: true
                    description: >-
                      true → EXCLUDED (negative filter); omitted/false →
                      INCLUDED.
                description: 'One chip: an id, or a text (at least one of the two).'
              maxItems: 10
              description: Current company HQ region (BING_GEO).
            industries:
              type: array
              nullable: true
              items:
                type: object
                properties:
                  id:
                    type: string
                    nullable: true
                    maxLength: 128
                    description: >-
                      Opaque SN facet id, VERBATIM from
                      scrape_linkedin_sales_nav_param_id_lookup.
                  text:
                    type: string
                    nullable: true
                    maxLength: 256
                    description: >-
                      Text to resolve into an id plus LinkedIn's label; one the
                      typeahead offers nothing for is a 422 naming the closest
                      options.
                  exclude:
                    type: boolean
                    nullable: true
                    description: >-
                      true → EXCLUDED (negative filter); omitted/false →
                      INCLUDED.
                description: 'One chip: an id, or a text (at least one of the two).'
              maxItems: 10
              description: Industries (INDUSTRY).
            current_companies:
              type: array
              nullable: true
              items:
                type: object
                properties:
                  id:
                    type: string
                    nullable: true
                    maxLength: 128
                    description: >-
                      Opaque SN facet id, VERBATIM from
                      scrape_linkedin_sales_nav_param_id_lookup.
                  text:
                    type: string
                    nullable: true
                    maxLength: 256
                    description: >-
                      Text to resolve into an id plus LinkedIn's label; one the
                      typeahead offers nothing for stays a free-text chip, which
                      SN matches on this facet.
                  exclude:
                    type: boolean
                    nullable: true
                    description: >-
                      true → EXCLUDED (negative filter); omitted/false →
                      INCLUDED.
                  free_text:
                    type: boolean
                    nullable: true
                    description: true → send the text as a free-text chip, unresolved.
                description: 'One chip: an id, or a text (at least one of the two).'
              maxItems: 10
              description: Current employer (COMPANY_WITH_LIST).
            past_companies:
              type: array
              nullable: true
              items:
                type: object
                properties:
                  id:
                    type: string
                    nullable: true
                    maxLength: 128
                    description: >-
                      Opaque SN facet id, VERBATIM from
                      scrape_linkedin_sales_nav_param_id_lookup.
                  text:
                    type: string
                    nullable: true
                    maxLength: 256
                    description: >-
                      Text to resolve into an id plus LinkedIn's label; one the
                      typeahead offers nothing for stays a free-text chip, which
                      SN matches on this facet.
                  exclude:
                    type: boolean
                    nullable: true
                    description: >-
                      true → EXCLUDED (negative filter); omitted/false →
                      INCLUDED.
                  free_text:
                    type: boolean
                    nullable: true
                    description: true → send the text as a free-text chip, unresolved.
                description: 'One chip: an id, or a text (at least one of the two).'
              maxItems: 10
              description: Past employer (COMPANY_WITH_LIST).
            groups:
              type: array
              nullable: true
              items:
                type: object
                properties:
                  id:
                    type: string
                    nullable: true
                    maxLength: 128
                    description: >-
                      Opaque SN facet id, VERBATIM from
                      scrape_linkedin_sales_nav_param_id_lookup.
                  text:
                    type: string
                    nullable: true
                    maxLength: 256
                    description: >-
                      Text to resolve into an id plus LinkedIn's label; one the
                      typeahead offers nothing for is a 422 naming the closest
                      options.
                  exclude:
                    type: boolean
                    nullable: true
                    description: >-
                      true → EXCLUDED (negative filter); omitted/false →
                      INCLUDED.
                description: 'One chip: an id, or a text (at least one of the two).'
              maxItems: 10
              description: Group membership (GROUP).
            schools:
              type: array
              nullable: true
              items:
                type: object
                properties:
                  id:
                    type: string
                    nullable: true
                    maxLength: 128
                    description: >-
                      Opaque SN facet id, VERBATIM from
                      scrape_linkedin_sales_nav_param_id_lookup.
                  text:
                    type: string
                    nullable: true
                    maxLength: 256
                    description: >-
                      Text to resolve into an id plus LinkedIn's label; one the
                      typeahead offers nothing for is a 422 naming the closest
                      options.
                  exclude:
                    type: boolean
                    nullable: true
                    description: >-
                      true → EXCLUDED (negative filter); omitted/false →
                      INCLUDED.
                description: 'One chip: an id, or a text (at least one of the two).'
              maxItems: 10
              description: Schools (SCHOOL).
            seniority_levels:
              type: array
              nullable: true
              items:
                type: string
                enum:
                  - '100'
                  - '110'
                  - '120'
                  - '130'
                  - '200'
                  - '210'
                  - '220'
                  - '300'
                  - '310'
                  - '320'
              maxItems: 10
              description: >-
                SENIORITY_V2: '100' In Training, '110' Entry Level, '120'
                Senior, '130' Strategic, '200' Entry Level Manager, '210'
                Experienced Manager, '220' Director, '300' Vice President, '310'
                CXO, '320' Owner/Partner.
            functions:
              type: array
              nullable: true
              items:
                type: string
                enum:
                  - '1'
                  - '2'
                  - '3'
                  - '4'
                  - '5'
                  - '6'
                  - '7'
                  - '8'
                  - '9'
                  - '10'
                  - '11'
                  - '12'
                  - '13'
                  - '14'
                  - '15'
                  - '16'
                  - '17'
                  - '18'
                  - '19'
                  - '20'
                  - '21'
                  - '22'
                  - '23'
                  - '24'
                  - '25'
                  - '26'
              maxItems: 10
              description: >-
                Job function: '1' Accounting, '2' Administrative, '3' Arts and
                Design, '4' Business Development, '5' Community and Social
                Services, '6' Consulting, '7' Education, '8' Engineering, '9'
                Entrepreneurship, '10' Finance, '11' Healthcare Services, '12'
                Human Resources, '13' Information Technology, '14' Legal, '15'
                Marketing, '16' Media and Communication, '17' Military and
                Protective Services, '18' Operations, '19' Product Management,
                '20' Program and Project Management, '21' Purchasing, '22'
                Quality Assurance, '23' Real Estate, '24' Research, '25' Sales,
                '26' Customer Success and Support.
            years_in_current_company:
              type: array
              nullable: true
              items:
                type: string
                enum:
                  - '1'
                  - '2'
                  - '3'
                  - '4'
                  - '5'
              maxItems: 5
              description: >-
                Tenure at current company: '1' <1 year, '2' 1-2, '3' 3-5, '4'
                6-10, '5' 10+ years.
            years_in_current_position:
              type: array
              nullable: true
              items:
                type: string
                enum:
                  - '1'
                  - '2'
                  - '3'
                  - '4'
                  - '5'
              maxItems: 5
              description: >-
                Tenure in current position: '1' <1 year, '2' 1-2, '3' 3-5, '4'
                6-10, '5' 10+ years.
            years_of_experience:
              type: array
              nullable: true
              items:
                type: string
                enum:
                  - '1'
                  - '2'
                  - '3'
                  - '4'
                  - '5'
              maxItems: 5
              description: >-
                Total career length: '1' <1 year, '2' 1-2, '3' 3-5, '4' 6-10,
                '5' 10+ years.
            company_headcounts:
              type: array
              nullable: true
              items:
                type: string
                enum:
                  - A
                  - B
                  - C
                  - D
                  - E
                  - F
                  - G
                  - H
                  - I
              maxItems: 10
              description: >-
                Company size: 'A' Self-employed, 'B' 1-10, 'C' 11-50, 'D'
                51-200, 'E' 201-500, 'F' 501-1000, 'G' 1001-5000, 'H'
                5001-10000, 'I' 10001+.
            company_types:
              type: array
              nullable: true
              items:
                type: string
                enum:
                  - C
                  - P
                  - 'N'
                  - D
                  - S
                  - E
                  - O
                  - G
              maxItems: 10
              description: >-
                Company type: 'C' Public, 'P' Privately Held, 'N' Non-profit,
                'D' Educational, 'S' Partnership, 'E' Self-Employed, 'O'
                Self-Owned, 'G' Government.
            profile_languages:
              type: array
              nullable: true
              items:
                type: string
                enum:
                  - ar
                  - en
                  - es
                  - pt
                  - zh
                  - fr
                  - it
                  - ru
                  - de
                  - nl
                  - tr
                  - tl
                  - pl
                  - ko
                  - ja
                  - ms
                  - 'no'
                  - da
                  - ro
                  - sv
                  - in
                  - cs
              maxItems: 10
              description: Profile language, ISO 639-1.
            network:
              type: array
              nullable: true
              items:
                type: string
                enum:
                  - F
                  - S
                  - A
                  - O
              maxItems: 4
              description: >-
                Relationship degree: 'F' 1st, 'S' 2nd, 'A' group members, 'O'
                3rd+.
            connections_of:
              type: array
              nullable: true
              items:
                type: object
                properties:
                  id:
                    type: string
                    nullable: true
                    maxLength: 64
                    description: A member token (ACwA…), as the search takes it.
                  text:
                    type: string
                    nullable: true
                    maxLength: 100
                    description: >-
                      Human text to resolve ("Berlin", "Acme"): typed into the
                      typeahead, which picks the option labelled exactly so,
                      else LinkedIn's first.
                description: >-
                  One value: an id, or a text to resolve (at least one of the
                  two).
              maxItems: 10
              description: >-
                People connected to these members: a name resolves through
                CONNECTION_OF; a miss is a 422.
          description: >-
            The scrape_linkedin_search_sales_nav_people filters; resolution
            through the Sales Navigator typeahead, which needs an SN seat.
        companies:
          type: object
          nullable: true
          properties:
            keywords:
              type: string
              nullable: true
              maxLength: 256
            geo_ids:
              type: array
              nullable: true
              items:
                type: object
                properties:
                  id:
                    type: string
                    nullable: true
                    maxLength: 64
                    pattern: ^\d+$
                    description: A numeric id, as the search takes it; rides as it is.
                  text:
                    type: string
                    nullable: true
                    maxLength: 100
                    description: >-
                      Human text to resolve ("Berlin", "Acme"): typed into the
                      typeahead, which picks the option labelled exactly so,
                      else LinkedIn's first.
                description: >-
                  One value: an id, or a text to resolve (at least one of the
                  two).
              maxItems: 10
              description: HQ geography (location typeahead).
            industry_ids:
              type: array
              nullable: true
              items:
                type: object
                properties:
                  id:
                    type: string
                    nullable: true
                    maxLength: 64
                    pattern: ^\d+$
                    description: A numeric id, as the search takes it; rides as it is.
                  text:
                    type: string
                    nullable: true
                    maxLength: 100
                    description: >-
                      Human text to resolve ("Berlin", "Acme"): typed into the
                      typeahead, which picks the option labelled exactly so,
                      else LinkedIn's first.
                description: >-
                  One value: an id, or a text to resolve (at least one of the
                  two).
              maxItems: 10
              description: Industries (industry typeahead).
            company_sizes:
              type: array
              nullable: true
              items:
                type: string
                enum:
                  - 1_to_10
                  - 11_to_50
                  - 51_to_200
                  - 201_to_500
                  - 501_to_1000
                  - 1001_to_5000
                  - 5001_to_10000
                  - 10001_plus
              maxItems: 8
              description: >-
                Headcount ranges; the node maps each range onto the LinkedIn
                size-bucket id itself.
            network:
              type: array
              nullable: true
              items:
                type: string
                enum:
                  - 1st
              maxItems: 1
              description: >-
                Companies where you have 1st-degree connections; the company
                search takes the first degree only.
            has_jobs:
              type: boolean
              nullable: true
              description: >-
                true → only companies hiring on LinkedIn right now; false sends
                nothing.
          description: >-
            The scrape_linkedin_search_companies filters. A text the typeahead
            offers nothing for is a 422 naming it.
        sales_nav_companies:
          type: object
          nullable: true
          properties:
            keywords:
              type: string
              nullable: true
              maxLength: 256
            company_headquarters:
              type: array
              nullable: true
              items:
                type: object
                properties:
                  id:
                    type: string
                    nullable: true
                    maxLength: 128
                    description: >-
                      Opaque SN facet id, VERBATIM from
                      scrape_linkedin_sales_nav_param_id_lookup.
                  text:
                    type: string
                    nullable: true
                    maxLength: 256
                    description: >-
                      Text to resolve into an id plus LinkedIn's label; one the
                      typeahead offers nothing for is a 422 naming the closest
                      options.
                  exclude:
                    type: boolean
                    nullable: true
                    description: >-
                      true → EXCLUDED (negative filter); omitted/false →
                      INCLUDED.
                description: 'One chip: an id, or a text (at least one of the two).'
              maxItems: 10
              description: HQ region (BING_GEO).
            industries:
              type: array
              nullable: true
              items:
                type: object
                properties:
                  id:
                    type: string
                    nullable: true
                    maxLength: 128
                    description: >-
                      Opaque SN facet id, VERBATIM from
                      scrape_linkedin_sales_nav_param_id_lookup.
                  text:
                    type: string
                    nullable: true
                    maxLength: 256
                    description: >-
                      Text to resolve into an id plus LinkedIn's label; one the
                      typeahead offers nothing for is a 422 naming the closest
                      options.
                  exclude:
                    type: boolean
                    nullable: true
                    description: >-
                      true → EXCLUDED (negative filter); omitted/false →
                      INCLUDED.
                description: 'One chip: an id, or a text (at least one of the two).'
              maxItems: 10
              description: Industries (INDUSTRY).
            account_lists:
              type: array
              nullable: true
              items:
                type: object
                properties:
                  id:
                    type: string
                    nullable: true
                    maxLength: 128
                    description: >-
                      Opaque SN facet id, VERBATIM from
                      scrape_linkedin_sales_nav_param_id_lookup.
                  text:
                    type: string
                    nullable: true
                    maxLength: 256
                    description: >-
                      A list NAME: matched against the seat's own lists, exactly
                      or as the one name containing it; no match is a 422.
                  exclude:
                    type: boolean
                    nullable: true
                    description: >-
                      true → EXCLUDED (negative filter); omitted/false →
                      INCLUDED.
                description: 'One facet value: at least one of id / text.'
              maxItems: 10
              description: Your SN account lists, by id or by name (ACCOUNT_LIST).
            company_headcounts:
              type: array
              nullable: true
              items:
                type: string
                enum:
                  - B
                  - C
                  - D
                  - E
                  - F
                  - G
                  - H
                  - I
              maxItems: 10
              description: >-
                Company size: 'B' 1-10, 'C' 11-50, 'D' 51-200, 'E' 201-500, 'F'
                501-1000, 'G' 1001-5000, 'H' 5001-10000, 'I' 10001+ (account
                search has no 'A').
            num_of_followers:
              type: array
              nullable: true
              items:
                type: string
                enum:
                  - NFR1
                  - NFR2
                  - NFR3
                  - NFR4
                  - NFR5
              maxItems: 5
              description: >-
                LinkedIn page followers: NFR1 1-50, NFR2 51-100, NFR3 101-1000,
                NFR4 1001-5000, NFR5 5001+.
            fortune:
              type: array
              nullable: true
              items:
                type: string
                enum:
                  - '1'
                  - '2'
                  - '3'
                  - '4'
              maxItems: 4
              description: >-
                Fortune 500 tier: '1' Fortune 50, '2' 51-100, '3' 101-250, '4'
                251-500.
            account_activities:
              type: array
              nullable: true
              items:
                type: string
                enum:
                  - SLC
                  - RFE
              maxItems: 2
              description: >-
                Buying signals: 'SLC' senior-leadership changes in the last 3
                months, 'RFE' funding event in the past 12 months.
            annual_revenue:
              type: object
              nullable: true
              properties:
                min:
                  type: integer
                  minimum: 0
                  maximum: 100000000
                max:
                  type: integer
                  minimum: 0
                  maximum: 100000000
                currency:
                  type: string
                  nullable: true
                  pattern: ^[A-Z]{3}$
                  description: ISO-4217 code; default USD.
              required:
                - min
                - max
              description: >-
                Annual revenue range in MILLIONS (e.g. {min: 10, max: 100} =
                $10M-$100M).
            company_headcount_growth:
              type: object
              nullable: true
              properties:
                min:
                  type: integer
                  minimum: -100
                  maximum: 1000
                max:
                  type: integer
                  minimum: -100
                  maximum: 1000
              required:
                - min
                - max
              description: >-
                Company-wide headcount growth range, percent (negative =
                shrinking).
            department_headcount:
              type: object
              nullable: true
              properties:
                department:
                  type: string
                  enum:
                    - '1'
                    - '2'
                    - '3'
                    - '4'
                    - '5'
                    - '6'
                    - '7'
                    - '8'
                    - '9'
                    - '10'
                    - '11'
                    - '12'
                    - '13'
                    - '14'
                    - '15'
                    - '16'
                    - '17'
                    - '18'
                    - '19'
                    - '20'
                    - '21'
                    - '22'
                    - '23'
                    - '24'
                    - '25'
                    - '26'
                  description: >-
                    Numeric SN department id - the same taxonomy as the
                    people-search functions facet (see its legend, or
                    lookup(type: "FUNCTION")).
                min:
                  type: integer
                  minimum: 0
                  maximum: 1000000
                max:
                  type: integer
                  minimum: 0
                  maximum: 1000000
              required:
                - department
                - min
                - max
              description: >-
                Headcount of ONE department (e.g. department "25" Sales, {min:
                20, max: 99999}).
            department_headcount_growth:
              type: object
              nullable: true
              properties:
                department:
                  type: string
                  enum:
                    - '1'
                    - '2'
                    - '3'
                    - '4'
                    - '5'
                    - '6'
                    - '7'
                    - '8'
                    - '9'
                    - '10'
                    - '11'
                    - '12'
                    - '13'
                    - '14'
                    - '15'
                    - '16'
                    - '17'
                    - '18'
                    - '19'
                    - '20'
                    - '21'
                    - '22'
                    - '23'
                    - '24'
                    - '25'
                    - '26'
                  description: >-
                    Numeric SN department id - the same taxonomy as the
                    people-search functions facet (see its legend, or
                    lookup(type: "FUNCTION")).
                min:
                  type: integer
                  minimum: -100
                  maximum: 1000
                max:
                  type: integer
                  minimum: -100
                  maximum: 1000
              required:
                - department
                - min
                - max
              description: >-
                Growth of ONE department, percent - e.g. engineering team
                growing 10%+.
            hiring_on_linkedin:
              type: boolean
              nullable: true
              description: true → only accounts currently hiring on LinkedIn.
            first_degree_connection:
              type: boolean
              nullable: true
              description: true → only accounts where you have a 1st-degree connection.
            saved_accounts_only:
              type: boolean
              nullable: true
              description: true → only your saved SN accounts.
          description: >-
            The scrape_linkedin_search_sales_nav_companies filters; resolution
            through the Sales Navigator typeahead, which needs an SN seat.
    ScrapeLinkedinBuildSearchUrlResponse:
      type: object
      properties:
        success:
          type: boolean
          enum:
            - true
        operation:
          type: string
          enum:
            - action
        action:
          type: string
          description: kebab-case verb; matches the route segment.
        item: {}
        result:
          type: object
          properties:
            url:
              type: string
              description: >-
                The search URL: open it, paste it into the matching search
                tool's url, or hand it to an import.
            filters:
              type: object
              properties: {}
              description: >-
                The filters in the exact shape the matching search tool takes as
                `filters`: texts replaced by the ids they resolved to.
            resolved:
              type: array
              items:
                type: object
                properties:
                  member:
                    type: string
                    description: The filter member the value sits in.
                  query:
                    type: string
                    description: The text as given (trimmed).
                  lookup_type:
                    type: string
                    description: >-
                      The typeahead type it went through (location, company,
                      TITLE, BING_GEO, ACCOUNT_LIST, ...).
                  id:
                    type: string
                    nullable: true
                    description: >-
                      The id picked; null when the typeahead offered nothing and
                      the text rides as a Sales Navigator free-text chip.
                  display_name:
                    type: string
                    nullable: true
                    description: >-
                      LinkedIn's label of the picked option, also the chip text
                      on Sales Navigator.
                  alternatives:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        display_name:
                          type: string
                          nullable: true
                      required:
                        - id
                        - display_name
                    description: >-
                      The other options LinkedIn offered, best first: resend the
                      value with one of these ids to choose another.
                required:
                  - member
                  - query
                  - lookup_type
                  - id
                  - display_name
                  - alternatives
              description: >-
                One entry per text value that went through a typeahead, in
                filter order; empty when every value carried an id.
            data_requests:
              type: array
              items:
                type: object
                properties: {}
                description: >-
                  The kind="scrape" DataRequest journal row for this call
                  (terminal completed), embedded as result.data_request;
                  served_from_cache always false. A receipt: its result_ref is
                  null here, the page is result.rows next to it;
                  get_data_request by sid reads the stored payload back. Full
                  DataRequestDomain shape owned by ./data_requests.md, so it is
                  left passthrough here.
              description: >-
                The kind="scrape" ledger rows of the typeahead lookups this call
                ran, one per distinct text; empty when nothing was resolved.
          required:
            - url
            - filters
            - resolved
            - data_requests
        meta:
          type: object
          properties:
            trace_id:
              type: string
              description: UUID v7; same 128-bit value as the X-Trace-Id header.
            span_id:
              type: string
              pattern: ^[0-9a-f]{16}$
              description: 16 hex chars, root span of this request.
            timestamp:
              type: string
              description: ISO 8601 UTC (Y-m-dTH:i:sZ), response time.
            duration_ms:
              type: integer
              minimum: 0
              description: Server-side wall clock.
            team_sid:
              type: string
              nullable: true
              description: >-
                The team this call ran in (the token team, or the team_sid
                override). Null when unauthenticated; absent from pre-2026-08-20
                backends.
            actor_type:
              type: string
              nullable: true
              description: >-
                user | agent | api_key | system. Null when unauthenticated;
                absent from pre-2026-08-20 backends.
          required:
            - trace_id
            - span_id
            - timestamp
            - duration_ms
        pacing:
          type: object
          properties:
            linkedin_account_sid:
              type: string
              description: The account whose bucket the call spent.
            limit_type:
              type: string
              description: The smart-limit bucket the call spent, e.g. send_messages.
            next_call_after:
              type: string
              description: >-
                ISO 8601, the same form as retry_after: the moment this same
                call goes through again without waiting. The next pacing slot
                while the day has budget left, the daily reset when it has none,
                the end of a LinkedIn lock while one stands.
            remaining_today:
              type: integer
              minimum: 0
              description: >-
                daily_limit minus done_today_count of that bucket, after this
                call.
          required:
            - linkedin_account_sid
            - limit_type
            - next_call_after
            - remaining_today
      required:
        - success
        - operation
        - action
        - item
        - result
        - meta
    McpError:
      type: object
      properties:
        success:
          type: boolean
          enum:
            - false
        error:
          type: object
          properties:
            code:
              type: string
              enum:
                - validation_failed
                - nothing_to_update
                - not_found
                - relation_not_found
                - invalid_transition
                - limit_exceeded
                - payment_required
                - duplicate_rejected
                - conflict
                - delete_blocked
                - unauthorized
                - forbidden
                - rate_limited
                - internal_error
                - service_unavailable
                - not_implemented
            message:
              type: string
            recoverable:
              type: boolean
            suggestion:
              type: string
            field_errors:
              type: object
              additionalProperties:
                type: array
                items:
                  type: object
                  properties:
                    rule:
                      type: string
                    message:
                      type: string
                  required:
                    - rule
                    - message
            blockers:
              type: array
              items:
                type: object
                properties:
                  type:
                    type: string
                    description: >-
                      Machine-readable blocker type (active_flow, pending_tasks,
                      …).
                  severity:
                    type: string
                    enum:
                      - hard
                      - soft
                    description: >-
                      hard = external action required; soft = acknowledge is
                      enough.
                  description:
                    type: string
                  entity_sid:
                    type: string
                    nullable: true
                  count:
                    type: integer
                  resolution:
                    type: string
                    description: 'Hard: tool name to call. Soft: code for acknowledge[].'
                  resolution_hint:
                    type: string
                required:
                  - type
                  - severity
                  - description
                  - entity_sid
                  - resolution
                  - resolution_hint
            context:
              type: object
              additionalProperties: {}
          required:
            - code
            - message
            - recoverable
        meta:
          type: object
          properties:
            trace_id:
              type: string
              description: UUID v7; same 128-bit value as the X-Trace-Id header.
            span_id:
              type: string
              pattern: ^[0-9a-f]{16}$
              description: 16 hex chars, root span of this request.
            timestamp:
              type: string
              description: ISO 8601 UTC (Y-m-dTH:i:sZ), response time.
            duration_ms:
              type: integer
              minimum: 0
              description: Server-side wall clock.
            team_sid:
              type: string
              nullable: true
              description: >-
                The team this call ran in (the token team, or the team_sid
                override). Null when unauthenticated; absent from pre-2026-08-20
                backends.
            actor_type:
              type: string
              nullable: true
              description: >-
                user | agent | api_key | system. Null when unauthenticated;
                absent from pre-2026-08-20 backends.
          required:
            - trace_id
            - span_id
            - timestamp
            - duration_ms
      required:
        - success
        - error
  responses:
    McpClientError:
      description: >-
        MCP error envelope. `error.code` is one of validation_failed,
        nothing_to_update, not_found, relation_not_found, invalid_transition,
        limit_exceeded, payment_required, duplicate_rejected, conflict,
        delete_blocked, unauthorized, forbidden, rate_limited, not_implemented.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/McpError'
    McpServerError:
      description: >-
        MCP error envelope with `error.code` internal_error or
        service_unavailable.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/McpError'
  securitySchemes:
    BearerJwt:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Access token issued by gtm.service.id. Its `access_identity` claim
        carries `team_sid`, `actor_sid` and `actor_type`, and that team scope is
        authoritative.
    TeamSid:
      type: apiKey
      in: header
      name: Team-SID
      description: >-
        Team scope for tokens that do not carry one. Ignored when the token
        already names a team.

````

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