---
title: "Run a historical search"
method: POST
path: "/linkedin/searches"
tags: ["LinkedIn — Searches"]
---

# Run a historical search

`POST /linkedin/searches`

## Request

- Base URL: `https://anjal.app`
- URL: `https://anjal.app/linkedin/searches`
- Auth: API key in header `X-API-Key`

Synchronous keyword search across the past 24 hours, week, or month.
Returns the full hit list inline. Use this for one-shot lookups; for
continuous monitoring use POST /v1/linkedin/signals.

## Request body

- object
  - `sessionId` string, nullable: Omit or send null to auto-distribute. Pass a session id to pin.
  - `query` string, required
  - `lookback` 'past-24h' | 'past-week' | 'past-month'
  - `minIntent` 'low' | 'medium' | 'high', nullable: Filter results below this intent level. Omit for unfiltered.
  - `intentDescription` string, required: Plain-English firing rule the LLM classifier treats as the authoritative definition of what should fire (same semantics as on signals). The keyword is a coarse pre-filter; this rule decides engage and the cited reason on every result.
  - `limit` integer

## Response `200`

Search ran successfully. results may be empty.

- object
  - `search` LinkedInSearch
    - `id` string, required
    - `sessionId` string, nullable: The LinkedIn session that actually ran the search (the router's pick when the caller didn't pin).
    - `query` string, required
    - `lookback` 'past-24h' | 'past-week' | 'past-month', required
    - `minIntent` 'low' | 'medium' | 'high', nullable
    - `intentDescription` string, required: Plain-English firing rule used by the classifier (same semantics as on signals).
    - `resultCount` integer, required
    - `tookMs` integer, nullable
    - `errorCode` string, nullable: Set on partial failure (e.g. LINKEDIN_RATE_LIMITED). Search row is still persisted.
    - `errorMessage` string, nullable
    - `createdAt` string, date-time, required
  - `results` LinkedInSearchResult[]
    - `postUrl` string
    - `postExcerpt` string
    - `postedAt` string, date-time, nullable
    - `author` object
      - `name` string
      - `profileUrl` string
      - `headline` string, nullable
      - `role` string, nullable
      - `company` string, nullable
    - `classification` object
      - `engage` boolean
      - `intent` 'low' | 'medium' | 'high'
      - `reason` string
    - `triageScore` integer, nullable
    - `rank` integer: Original position in LinkedIn's ranked result list (0 = top).

## Other responses

- `404`: LinkedIn session not found or inactive.
- `429`: LinkedIn rate-limited this session. The search row is persisted with errorCode=LINKEDIN_RATE_LIMITED.
- `502`: LinkedIn returned an unexpected error. The search row is persisted with the error captured.

---

[API](https://skmtc.dev/anjal/apis/anjal-api.md) · [All operations](https://skmtc.dev/anjal/apis/anjal-api/llms.txt) · [OpenAPI document](https://skmtc.dev/anjal/apis/anjal-api/revisions/a4044778e294?raw)
