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

# Build a LinkedIn search URL

> **Read-only.** It changes nothing.

Turn an audience description into a LinkedIn or Sales Navigator people-search URL, so a campaign source can be described rather than pasted. Returns the url plus what it managed to express — hand it to `campaign_set_source`.

What it can build: job titles (included and excluded) and free-text keywords with boolean operators. What it CANNOT build: geography, industry, company size, seniority and years-in-role. Sales Navigator only accepts those as numeric ids from its own typeahead (`id:103644278` is United States), they cannot be derived from a name, and a wrong id silently searches the wrong audience. For those, either ask the user to paste a Sales Navigator URL with the filters already set, or pass the ids through `extraFilters` if the user supplies them. Never guess one.

Recruiter (`/talent/`) URLs cannot be built at all — ask the user for one.



## OpenAPI

````yaml /api-v2/openapi.json post /search_url_build
openapi: 3.1.0
info:
  title: LinkedCamp API
  version: 2.0.0
  description: >-
    Version 2 of the LinkedCamp API. Every endpoint is a POST to `/{endpoint}`
    with its arguments as a JSON object, and returns JSON.
servers:
  - url: https://api.linkedcamp.com/v2
security:
  - ApiKey: []
  - Bearer: []
tags:
  - name: Account
  - name: Notifications
  - name: Reference
  - name: Campaigns
  - name: Campaign audience
  - name: Sequences
  - name: Blocked dates
  - name: Leads
  - name: Lead notes
  - name: Activities
  - name: Tags
  - name: Blacklist
  - name: Conversations
  - name: Messages
  - name: Saved replies
  - name: Templates
  - name: Merge fields
  - name: Personalised images
  - name: LinkedIn accounts
  - name: Email accounts
  - name: AI agents
  - name: Knowledge base
  - name: Personas
  - name: Analytics
  - name: Posts
  - name: Posting schedule
  - name: Tasks
  - name: Appointments
  - name: Reminders
  - name: Automations
paths:
  /search_url_build:
    post:
      tags:
        - Campaign audience
      summary: Build a LinkedIn search URL
      description: >-
        **Read-only.** It changes nothing.


        Turn an audience description into a LinkedIn or Sales Navigator
        people-search URL, so a campaign source can be described rather than
        pasted. Returns the url plus what it managed to express — hand it to
        `campaign_set_source`.


        What it can build: job titles (included and excluded) and free-text
        keywords with boolean operators. What it CANNOT build: geography,
        industry, company size, seniority and years-in-role. Sales Navigator
        only accepts those as numeric ids from its own typeahead (`id:103644278`
        is United States), they cannot be derived from a name, and a wrong id
        silently searches the wrong audience. For those, either ask the user to
        paste a Sales Navigator URL with the filters already set, or pass the
        ids through `extraFilters` if the user supplies them. Never guess one.


        Recruiter (`/talent/`) URLs cannot be built at all — ask the user for
        one.
      operationId: search_url_build
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                surface:
                  type: string
                  enum:
                    - basic
                    - sales-navigator
                  description: >-
                    "basic" is ordinary LinkedIn search; "sales-navigator" needs
                    a Sales Navigator seat.
                keywords:
                  type: string
                  description: >-
                    Free text. Supports boolean operators, e.g. '"chatbot" OR
                    "AI agent"'.
                titles:
                  type: array
                  items:
                    type: string
                  description: Job titles to include, as plain text.
                excludeTitles:
                  type: array
                  items:
                    type: string
                  description: >-
                    Job titles to exclude. Sales Navigator only — basic search
                    cannot express an exclusion.
                company:
                  type: string
                  description: 'Basic search only: current company, free text.'
                school:
                  type: string
                  description: 'Basic search only: school, free text.'
                firstName:
                  type: string
                  description: Basic search only.
                lastName:
                  type: string
                  description: Basic search only.
                extraFilters:
                  type: array
                  items:
                    type: object
                    properties:
                      type:
                        type: string
                        description: >-
                          Sales Navigator filter type, e.g. REGION, INDUSTRY,
                          COMPANY_HEADCOUNT.
                      values:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                              description: >-
                                LinkedIn's own id for the value. Required for
                                these filters.
                            text:
                              type: string
                              description: The human label, as LinkedIn shows it.
                            exclude:
                              type: boolean
                              description: Exclude this value instead of including it.
                          required:
                            - text
                          additionalProperties: false
                        minItems: 1
                        description: >-
                          Values for this filter, each with the id LinkedIn
                          assigns it.
                    required:
                      - type
                      - values
                    additionalProperties: false
                  description: >-
                    Id-based filters, only when the USER supplied the ids or
                    they came from a URL they pasted. Do not populate this from
                    memory.
              required:
                - surface
              additionalProperties: false
      responses:
        '200':
          description: >-
            The result, as JSON. Writes answer `{ "ok": true, "message": ...,
            "data": ... }`.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        '400':
          description: >-
            The body is not valid JSON, an argument is invalid, or the request
            was refused.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: No API key, or the key was rejected.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: >-
            Your plan, permissions or access tier don't include this, or a
            record belongs to another account.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: A record named in the arguments does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: >-
            The request was valid but the operation was refused, such as
            launching a campaign that is not ready.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '502':
          description: The service failed or could not be reached. Reads are safe to retry.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '504':
          description: >-
            The operation timed out. A write may still complete; read it back
            before retrying.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
              enum:
                - UNAUTHENTICATED
                - FORBIDDEN
                - PLAN_REQUIRED
                - VALIDATION
                - INVALID_JSON
                - NOT_FOUND
                - METHOD_NOT_ALLOWED
                - UPSTREAM
                - TOOL_ERROR
            message:
              type: string
            hint:
              type: string
              description: What to do about it, when there is something to do.
  securitySchemes:
    ApiKey:
      type: apiKey
      in: header
      name: X-Api-Key
      description: Your LinkedCamp API key.
    Bearer:
      type: http
      scheme: bearer
      description: Your LinkedCamp API key as a bearer token.

````

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