desearch-mcp-server 0.5.0 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +45 -1
- package/README.md +191 -4
- package/build/companies.d.ts +133 -0
- package/build/companies.d.ts.map +1 -0
- package/build/companies.js +433 -0
- package/build/desearch-api.d.ts +31 -0
- package/build/desearch-api.d.ts.map +1 -0
- package/build/desearch-api.js +67 -0
- package/build/people.d.ts +69 -5
- package/build/people.d.ts.map +1 -1
- package/build/people.js +157 -65
- package/build/server.d.ts +9 -4
- package/build/server.d.ts.map +1 -1
- package/build/server.js +400 -14
- package/build/social.d.ts +188 -0
- package/build/social.d.ts.map +1 -0
- package/build/social.js +258 -0
- package/package.json +8 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,9 +1,53 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## 0.7.0
|
|
4
|
+
|
|
5
|
+
Full Desearch API coverage: five new tools (36 in total: the 31 tools of 0.6.0 plus these five) for the routes `desearch-js` 1.5 does not cover. They call the API directly through `desearch-api.ts`, the request helper `people.ts` and `companies.ts` used, now in its own module, with the same `Authorization: <key>` header and `HTTP <status>: <detail>` errors. The network stats routes stay out of MCP.
|
|
6
|
+
|
|
7
|
+
- `tiktok`: public TikTok data. `action` picks one of 7 routes: `search` (`POST /desearch/tiktok/search`), `post`, `profile`, `profile_posts`, `comments`, `hashtag`, and `trending`.
|
|
8
|
+
- `facebook`: public Facebook data, 6 routes: `search` and `hashtag` (Meta Ad Library ads, not organic posts), `post`, `profile`, `profile_posts`, and `comments`.
|
|
9
|
+
- `instagram`: public Instagram data, 6 routes: `search` (profiles, one page), `media`, `profile`, `profile_posts`, `comments` (by shortcode), and `hashtag`.
|
|
10
|
+
- Each social action needs and accepts its own arguments (`query`, `id`, `username`, `profile_id`, `post_id`, `video_id`, `shortcode`, `tag`, `region`, `sort`, `count` 1–100, `cursor`). A missing argument, or one the action does not take (for example a `cursor` on TikTok `trending` or Instagram `search`), is refused before any request with a message that lists what the action takes. Path arguments are URL-encoded; a leading `@` on a username and `#` on a tag are removed.
|
|
11
|
+
- Social paging: list actions return `{ results, next_cursor, next }`. `next_cursor` is the API's `x-desearch-next-cursor` header, `null` on the last page; send it back unchanged as `cursor` with the same action and target. Single items (`post`, `profile`, `media`) come back as the API sends them.
|
|
12
|
+
- `search-api`: `POST /search`, ranked pages with the passage that best matches the query. Arguments: `query`, `mode` (`fast` or `balanced`), `count` (10, 15, or 20), `start_date`, `end_date`, `highlights`, `page_text`. Unset fields are not sent.
|
|
13
|
+
- `people-search-export`: `GET /desearch/people/tasks/{task_id}/export` (with `task_id`) or `GET /desearch/people/profiles/export` (with `platform`), as CSV or JSON Lines text with the `people-profiles` filters. The reply is a note (rows in the file, rows shown, rows cut and why, and the API URL for the whole file), then the file text cut at a row boundary to `max_rows` rows (1–1000, default 100) and 50,000 characters. CSV keeps its header, and a quoted field with a line break stays one row. Free.
|
|
14
|
+
- All five are lookups: `readOnlyHint: true`, `destructiveHint: false`, `openWorldHint: true`. The server instructions, README, parity doc, `llms-install.md`, `GEMINI.md`, the plugin skill, and the manifest descriptions name them.
|
|
15
|
+
- `scripts/e2e-full-coverage.mjs` calls each new tool action once against the live API over stdio (`DESEARCH_API_KEY` required; `--with-people` to also start one small paid People Search job and export it).
|
|
16
|
+
- The Company Search export route (`GET /desearch/companies/tasks/{task_id}/export`) is still not a tool.
|
|
17
|
+
- Every version (package, `server.json`, the Gemini extension, the plugin manifests, and the server's `SERVER_VERSION`) is 0.7.0, and the docs and manifest descriptions say the server exposes 36 tools.
|
|
18
|
+
|
|
19
|
+
## 0.6.0
|
|
20
|
+
|
|
21
|
+
Company Search and Company Enrich tools. Company Search is live on `api.desearch.ai` since 2026-10-29.
|
|
22
|
+
|
|
23
|
+
Company Search finds companies on the web from a plain-language description; Company Enrich starts from the domains you send. Both collect each company's public emails, phones, and social profiles, and its leaders (CEO, founders, CTO, and CFO by default) with their LinkedIn profiles and emails, and every contact keeps the page it came from. They run as background tasks on the People Search engine. desearch-js 1.5 has no Company Search methods, so `companies.ts` calls the `/desearch/companies/*` routes directly with the same key header and error text as `people.ts` (the request helper is now shared).
|
|
24
|
+
|
|
25
|
+
| Tool | Route | Billed |
|
|
26
|
+
| --- | --- | --- |
|
|
27
|
+
| `company-search` | `POST /desearch/companies/search` | Yes. Reserves `count` companies at the Company Search per-company price and settles to the companies delivered (a minimum of 2 when it delivers any; nothing when it delivers none). |
|
|
28
|
+
| `company-enrich` | `POST /desearch/companies/enrich` | Yes. Reserves one company per domain sent at the Company Enrich per-company price and settles to the companies delivered (a minimum of 1); duplicate domains are returned. |
|
|
29
|
+
| `company-search-status` | `GET /desearch/companies/tasks/{id}` and `GET /desearch/companies/tasks/{id}/results` | No |
|
|
30
|
+
| `company-search-pause` | `POST /desearch/companies/tasks/{id}/pause` | No |
|
|
31
|
+
| `company-search-resume` | `POST /desearch/companies/tasks/{id}/resume` | No |
|
|
32
|
+
| `company-search-cancel` | `POST /desearch/companies/tasks/{id}/cancel` | No |
|
|
33
|
+
| `company-search-tasks` | `GET /desearch/companies/tasks` | No |
|
|
34
|
+
|
|
35
|
+
- `company-search` takes `query`, `count`, `min_score`, `exclude` (domains or URLs), `countries` and `require` (sent as `filters.countries` and `filters.require`), `roles`, `infer_emails`, `verify_emails`, `metadata`, and `idempotency_key`. `company-enrich` takes `domains` (1-200), `roles`, `infer_emails`, `verify_emails`, `metadata`, and `idempotency_key`. Only the arguments the caller set are sent. `idempotency_key` is sent as `Idempotency-Key`; a replay is returned with `existing_task: true` and is not charged again. Metadata labels follow the People Search rules and are checked before the billed call.
|
|
36
|
+
- `company-search-status` returns compact companies: domain, name, url, industry, location, a short description, `score` (always present; `null` for Company Enrich), `why`, up to three `reasons`, `fully_verified` and `unverified_criteria` (Company Search), `primary_email`, `primary_contact`, `contact_coverage`, emails, phones, and socials with their `source_url`, leaders with `roles`, `title`, `verified`, LinkedIn profile, and emails (each email with its `verification` status, and inferred ones with `confidence` and `pattern`), and `enrichment` (`status` and `stages`). Its page size defaults to 10 (max 100).
|
|
37
|
+
- The `next` hint understands results that fill in place: it says to read again without `cursor` while the task is `enriching`, to read once more without `cursor` after the task ends when companies were read while it ran, and how many companies on the page stayed `partial` when a task ended before every stage ran. Completed tasks name `all_domains_processed`, a budget stop, `no_candidates`, and `zero_qualified`.
|
|
38
|
+
- `company-search-tasks` filters by `type` (`search` or `enrich`), `status`, and up to 3 `metadata` pairs. Task summaries keep `search_type` (`company_search` or `company_enrich`), `completion_reason`, `coverage_limited: true` when a budget stopped the task before `count`, and `warnings` with their `code` and `message`.
|
|
39
|
+
- Pause, resume, and cancel take only `task_id`; a 409 is returned as a tool error with the API detail and the task's status. Errors are titled `Company Search error`, `Company Enrich error`, `Company Search Status error`, `Company Search Pause error`, `Company Search Resume error`, `Company Search Cancel error`, and `Company Search Tasks error`.
|
|
40
|
+
- Company tools reject unknown arguments, so a nested `filters` object or a misspelled argument is not dropped from a billed task.
|
|
41
|
+
- The `GET /desearch/companies/tasks/{id}/export` CSV and JSON Lines route is not a tool, like People Search's export routes.
|
|
42
|
+
- Annotations follow People Search: `company-search` and `company-enrich` set `readOnlyHint: false`, `destructiveHint: false`, `idempotentHint: false`; `company-search-status` and `company-search-tasks` set `readOnlyHint: true`, `destructiveHint: false`; `company-search-pause` and `company-search-resume` set `destructiveHint: false`, `idempotentHint: true`; `company-search-cancel` sets `destructiveHint: true`, `idempotentHint: true`. `openWorldHint` is `true` on every tool.
|
|
43
|
+
- The server instructions, README, `docs/API_MCP_PARITY.md`, `llms-install.md`, `GEMINI.md`, the plugin skill, and the manifest descriptions mention Company Search. The server lists 31 tools.
|
|
44
|
+
|
|
45
|
+
## 0.5.0
|
|
4
46
|
|
|
5
47
|
- `extract` and `web-crawl` accept `format: "markdown"` (headings, lists, tables and code). `full_page` is described as `text`-only.
|
|
6
48
|
|
|
49
|
+
## 0.4.0
|
|
50
|
+
|
|
7
51
|
- `extract` and `web-crawl` take `full_page` (boolean). With `format: "text"` it returns all visible text of the page, every section, table and notice, instead of only the main content. The `extract` description says what the `js_required` and `blocked` errors mean.
|
|
8
52
|
|
|
9
53
|
- Server icon for connector UIs such as the ChatGPT mention chip. The `initialize` result `serverInfo` now has `title` ("Desearch"), `websiteUrl` (https://www.desearch.ai), and `icons`: `https://mcp.desearch.ai/icon-512.png` (512x512) and `https://mcp.desearch.ai/icon-64.png` (64x64), both `image/png`. The `MCP_PUBLIC_BASE_URL` environment variable changes the icon origin. `/icon-512.png`, `/icon-64.png`, `/favicon.png` (64x64), and `/favicon.ico` (16, 32, 48, 64) are served with no auth, `Cache-Control: public, max-age=86400`, `Access-Control-Allow-Origin: *`, and `Cross-Origin-Resource-Policy: cross-origin`. On Vercel they are static files in `public/`, served before any rewrite, with those headers and an explicit `Content-Type` set in `vercel.json`. The Node HTTP server (`npm run start:http`) serves the same bytes from `icons-data.ts` on GET and HEAD; other methods return 405. The icon matches the logo in the www.desearch.ai site header: the official Desearch glyph in black (`#000000`) centered on an opaque white (`#FFFFFF`) square, as the header renders it with CSS `brightness-0` on its white bar. Only the square glyph is used, since the header wordmark is wide. `scripts/gen-icons.py` composes each size separately with Pillow from `assets/desearch-mark-white.png` (byte-identical to https://www.desearch.ai/logo.png), recolors the glyph to black from its alpha channel, and only ever downscales it, writes them to `public/`, and embeds the same bytes in `icons-data.ts`.
|
package/README.md
CHANGED
|
@@ -51,19 +51,20 @@ Example output:
|
|
|
51
51
|
|
|
52
52
|
The tool returns that JSON as pretty-printed text: `{ "content": [{ "type": "text", "text": "<json above>" }] }`.
|
|
53
53
|
|
|
54
|
-
AI search, X search and web search for AI agents, plus page extraction, X data tools, and People Search (find people and creators on X, YouTube, LinkedIn, and TikTok). Bring your own Desearch API key.
|
|
54
|
+
AI search, X search and web search for AI agents, plus the Search API (ranked pages with the best-matching passage), page extraction, X data tools, public TikTok, Facebook, and Instagram data, People Search (find people and creators on X, YouTube, LinkedIn, and TikTok), and Company Search (find companies on the web, or enrich domains you have, with their public contacts and leaders). Bring your own Desearch API key. Version 0.7.0 exposes 36 tools.
|
|
55
55
|
|
|
56
56
|
## Tools
|
|
57
57
|
|
|
58
58
|
The Desearch MCP server includes the following tools.
|
|
59
59
|
|
|
60
|
-
Lookup tools, including `search` and `fetch`, set `readOnlyHint: true`, `destructiveHint: false`, and `openWorldHint: true`. `people-search-status`, `people-search-tasks`, and `people-
|
|
60
|
+
Lookup tools, including `search` and `fetch`, set `readOnlyHint: true`, `destructiveHint: false`, and `openWorldHint: true`. `search-api`, `tiktok`, `facebook`, `instagram`, `people-search-status`, `people-search-tasks`, `people-profiles`, and `people-search-export` are lookups too. `people-search` starts a paid job billed to the user's Desearch balance, so `readOnlyHint` is false; it creates a new task and does not delete or overwrite anything, so `destructiveHint` is false. `people-search-pause` and `people-search-resume` change a task's state and undo each other, so `readOnlyHint` and `destructiveHint` are false and `idempotentHint` is true. Pausing loses no data (people found so far stay readable and the search keeps its progress) and changes no billing (nothing is charged or refunded; the reservation stays until the search ends), and resume continues from where the search stopped with no new charge. The caveat: the API cancels a search paused for more than 7 days, and a cancelled search cannot be resumed, so a pause is reversible only within those 7 days. `people-search-cancel` cannot be undone, so `readOnlyHint` is false and `destructiveHint` and `idempotentHint` are true. The Company Search tools follow the same rules: `company-search` and `company-enrich` start paid jobs (`readOnlyHint: false`, `destructiveHint: false`, `idempotentHint: false`), `company-search-status` and `company-search-tasks` are lookups, `company-search-pause` and `company-search-resume` set `destructiveHint: false` and `idempotentHint: true` (with the same 7-day caveat), and `company-search-cancel` sets `destructiveHint: true` and `idempotentHint: true`. `openWorldHint` is true on every tool because the call reaches a live external source.
|
|
61
61
|
|
|
62
62
|
- **AI Search** (`ai-search`): Performs AI Twitter and web searches with relevant links and summary. `tools` uses short source ids (`web`, `twitter`, `arxiv`, `wikipedia`, `hackernews`, `reddit`). Older labels such as `Web Search`, `ArXiv Search`, `Wikipedia Search`, `Hacker News Search`, and `Reddit Search` are still accepted and sent as the short id. `youtube` is not accepted. Default is `["web", "twitter"]`.
|
|
63
63
|
- **X Search** (`x-search`): Tweet search on X. Arguments: `query` (required), `count` (optional, default 20). Sort stays Top. Optional filters: `user`, `start_date`, `end_date` (YYYY-MM-DD), `lang`, `verified`, `blue_verified`, `is_quote`, `is_video`, `is_image`, `min_retweets`, `min_replies`, `min_likes`.
|
|
64
64
|
- **Search** (`search`): Web search that returns `{ results: [{ id, title, url }] }`. Argument: `query` (required). `id` is the result URL.
|
|
65
65
|
- **Fetch Page** (`fetch`): Read a public page as text. Argument: `id` (required, an `http` or `https` URL from `search`).
|
|
66
66
|
- **Web Search** (`web-search`): SERP-style web search. Arguments: `query` (required), `start` (optional pagination offset).
|
|
67
|
+
- **Search API** (`search-api`): Ranked web pages, each with its title, URL, publication date when known, and the passage that best matches the query (`POST /search`). Arguments: `query` (required, 1–2000 characters), `mode` (optional, `fast` or `balanced`, API default `balanced`), `count` (optional, 10, 15, or 20), `start_date` and `end_date` (optional, YYYY-MM-DD), `highlights` (optional, default `true`), `page_text` (optional, default `false`; adds each page's full text). Returns `results` plus `cost_usd`, `usage_count`, `service`, and `currency`.
|
|
67
68
|
- **Web Links Search** (`web-links-search`): Web link search. Arguments: `prompt` (required), `tools` (optional, only `web`, default `["web"]`; `Web Search` is accepted and rewritten to `web`), `count` (optional, 10–200). The links/web API rejects other sources, so they are not in the enum.
|
|
68
69
|
- **Extract** (`extract`): Read a public URL as text or HTML. Preferred over crawl. Arguments: `url` (required), `format` (optional, `text`, `markdown` or `html`), `js` (optional), `wait` (optional milliseconds), `full_page` (optional, `text` only: every visible section of the page instead of its main content). Errors carry an `error_code`: `js_required` (retry with `js: true`), `blocked` (the site refused or showed a bot check), `page_not_found`.
|
|
69
70
|
- **Web Crawl** (`web-crawl`): Same arguments as `extract`, on the legacy `/web/crawl` route. The SDK marks `webCrawl` deprecated in favor of `extract`; this tool stays so that route remains reachable. Prefer `extract` for new integrations.
|
|
@@ -76,6 +77,9 @@ Lookup tools, including `search` and `fetch`, set `readOnlyHint: true`, `destruc
|
|
|
76
77
|
- **X User Replies** (`x-user-replies`): Posts and replies by a user. Arguments: `user` (required), `count` (optional, 1–100), `query` (optional).
|
|
77
78
|
- **X Post Replies** (`x-post-replies`): Replies to a post. Arguments: `post_id` (required), `count` (optional, 1–100), `query` (optional).
|
|
78
79
|
- **X Trends** (`x-trends`): Trending topics for a location. Arguments: `woeid` (required), `count` (optional, 30–100).
|
|
80
|
+
- **TikTok** (`tiktok`): Public TikTok data. `action` (required) picks the route: `search` (`query`; optional `count`, `sort`, `cursor`), `post` (`id`), `profile` (`username`), `profile_posts` (`username`; optional `count`, `cursor`), `comments` (`video_id`; optional `count`, `cursor`), `hashtag` (`tag`; optional `count`, `cursor`), `trending` (optional `region`, `count`). See [TikTok, Facebook, and Instagram](#tiktok-facebook-and-instagram).
|
|
81
|
+
- **Facebook** (`facebook`): Public Facebook data. `action` (required): `search` (`query`; optional `count`, `cursor`) and `hashtag` (`tag`; optional `count`, `cursor`) return Meta Ad Library ads, not organic posts; `post` (`id`), `profile` (`profile_id`, a page or profile ID or public handle), `profile_posts` (`profile_id`; optional `count`, `cursor`), `comments` (`post_id`; optional `count`, `cursor`).
|
|
82
|
+
- **Instagram** (`instagram`): Public Instagram data. `action` (required): `search` (`query`; optional `count`; profiles, one page, no cursor), `media` (`id`: shortcode, numeric ID, or URL), `profile` (`username`), `profile_posts` (`username`; optional `count`, `cursor`), `comments` (`shortcode`, the code in the post URL; optional `count`, `cursor`), `hashtag` (`tag`; optional `count`, `cursor`).
|
|
79
83
|
- **People Search** (`people-search`): Start a paid job billed to the user's Desearch balance: a search for people who match a plain-language description. Arguments: `platform` (required: `x`, `youtube`, `linkedin`, or `tiktok`), `query` (required, 3–1000 characters), `count` (optional, 5–200, API default 25), `min_score` (optional, 0–100), `exclude` (optional handles), `metadata` (optional labels, below), `idempotency_key` (optional), and that platform's filters (below). Returns the `task_id`, status, and `reserved_cost_usd` (`count` times the platform's per-person price at the time of the call; prices at https://desearch.ai/pricing); the ended task carries `final_cost_usd`. Public data only: public X posts and profile fields, public YouTube channel pages plus the creator's own website for publicly listed contact details, public LinkedIn posts and profiles, and public TikTok videos and profiles. Contacts are only those the person lists publicly.
|
|
80
84
|
- **People Search Status** (`people-search-status`): A task's status, progress, and cost, plus a page of the people found so far. Arguments: `task_id` (required), `cursor` (optional, `next_cursor` from the previous call), `limit` (optional, 1–100, default 25), `include_people` (optional, default `true`). Free; it reads a search you already started (people come from public profiles and posts).
|
|
81
85
|
- **Pause People Search** (`people-search-pause`): Pause a task. A queued search pauses at once; a running one finishes its current batch first. No data is lost and billing does not change; `people-search-resume` continues where it stopped with no new charge. A search paused for more than 7 days is cancelled by the API and can no longer be resumed. Argument: `task_id` (required). Free.
|
|
@@ -83,8 +87,48 @@ Lookup tools, including `search` and `fetch`, set `readOnlyHint: true`, `destruc
|
|
|
83
87
|
- **Cancel People Search** (`people-search-cancel`): Stop a task for good. You pay only for the people it already delivered; the rest of the reservation is returned. Cannot be undone. Argument: `task_id` (required). Free.
|
|
84
88
|
- **List People Search Tasks** (`people-search-tasks`): Your searches, newest first. Arguments: `platform` (optional), `status` (optional list, for example `["running", "paused"]`), `limit` (optional, 1–100), `cursor` (optional), `metadata` (optional, up to 3 labels a task must have, for example `{"campaign": "q4-outbound"}`). Free; lists tasks, not the people they found.
|
|
85
89
|
- **List People Found** (`people-profiles`): Everyone your own searches found on one platform, one entry per person, with the search that found them. Runs no new search and queries no outside source. Arguments: `platform` (required), `q` (optional text in name, handle, bio, or location), `sort` (optional: `score`, `recent`, or `audience`), `limit` (optional, 1–200, default 25), `cursor` (optional), and the filters `has` (channels every person must have: `email`, `website`, `x`, `linkedin`, `instagram`, `youtube`, `tiktok`), `min_audience`, `max_audience`, `min_score`, `location`, `verified`. Free.
|
|
90
|
+
- **Export People Found** (`people-search-export`): The people your searches found as CSV or JSON Lines text. Pass `task_id` to export one search, or `platform` (without `task_id`) to export everyone found on that platform, with the same `q`, `sort`, and filters as `people-profiles`. Arguments: `task_id` or `platform`, `format` (optional, `csv` or `jsonl`, default `csv`), `has`, `min_audience`, `max_audience`, `min_score`, `location`, `verified`, `q` and `sort` (platform export only), `max_rows` (optional, 1–1000, default 100). The reply is a note, then the file text cut at a row boundary to `max_rows` rows and 50,000 characters; the note says how many rows were cut. Free.
|
|
91
|
+
- **Company Search** (`company-search`): Start a paid job billed to the user's Desearch balance: find companies on the web that match a plain-language description and collect each one's public contact data. Arguments: `query` (required, 3–1000 characters), `count` (optional, 5–200, API default 25), `min_score` (optional, 0–100), `exclude` (optional domains or URLs, up to 1000), `countries` (optional ISO 3166-1 alpha-2 codes or names, up to 20), `require` (optional: `email`, `phone`, `linkedin`, `leader`, `leader_email`), `roles` (optional, below), `infer_emails` (optional, default `true`), `verify_emails` (optional, default `true`), `metadata` (optional labels, as on `people-search`), `idempotency_key` (optional). `countries` and `require` are sent as the API's `filters`. Returns the `task_id`, status, and `reserved_cost_usd` (`count` times the Company Search per-company price at the time of the call; prices at https://desearch.ai/pricing); the ended task carries `final_cost_usd`. Public data only: each company's own website, public web search results, and public LinkedIn profiles of its leaders.
|
|
92
|
+
- **Company Enrich** (`company-enrich`): Start a paid job billed to the user's Desearch balance: the same public contact data for companies you already know. Arguments: `domains` (required, 1–200 domains or URLs; reduced to the host without `www.`, lowercased, deduplicated), `roles`, `infer_emails`, `verify_emails`, `metadata`, `idempotency_key` (all optional). One company per domain, with `score: null`. Reserves one company per domain sent at the Company Enrich per-company price; duplicates and companies it does not deliver are returned when the task ends.
|
|
93
|
+
- **Company Search Status** (`company-search-status`): A Company Search or Company Enrich task's status, progress, and cost, plus a page of the companies delivered so far. Arguments: `task_id` (required), `cursor` (optional, `next_cursor` from the previous call), `limit` (optional, 1–100, default 10), `include_companies` (optional, default `true`). Free.
|
|
94
|
+
- **Pause Company Search** (`company-search-pause`): Pause a task. No data is lost and billing does not change; `company-search-resume` continues where it stopped with no new charge. A task paused for more than 7 days is cancelled by the API. Argument: `task_id` (required). Free.
|
|
95
|
+
- **Resume Company Search** (`company-search-resume`): Resume a paused task from where it stopped, with no new charge (409 when it is not paused). Argument: `task_id` (required). Free.
|
|
96
|
+
- **Cancel Company Search** (`company-search-cancel`): Stop a task for good. You pay only for the companies it already delivered; the rest of the reservation is returned. Cannot be undone. Argument: `task_id` (required). Free.
|
|
97
|
+
- **List Company Search Tasks** (`company-search-tasks`): Your Company Search and Company Enrich tasks, newest first. Arguments: `type` (optional, `search` or `enrich`), `status` (optional list), `limit` (optional, 1–100), `cursor` (optional), `metadata` (optional, up to 3 labels, exact match). Free; People Search tasks are not listed here.
|
|
86
98
|
|
|
87
|
-
The full SDK method → endpoint → MCP tool map is in [docs/API_MCP_PARITY.md](docs/API_MCP_PARITY.md). Every public `desearch-js` 1.5 method is a tool. `latestTweets` was removed from the SDK (`GET /twitter/latest` in 1.0.1) and is not exposed. People Search
|
|
99
|
+
The full SDK method → endpoint → MCP tool map is in [docs/API_MCP_PARITY.md](docs/API_MCP_PARITY.md). Every public `desearch-js` 1.5 method is a tool. `latestTweets` was removed from the SDK (`GET /twitter/latest` in 1.0.1) and is not exposed. People Search, Company Search, the TikTok, Facebook, and Instagram routes, and `POST /search` are not in `desearch-js` 1.5; those tools call the routes directly (`/desearch/people/*`, `/desearch/companies/*`, and the rest), and the parity doc lists them too. The network stats routes (`/network/stats`) are not MCP tools.
|
|
100
|
+
|
|
101
|
+
### TikTok, Facebook, and Instagram
|
|
102
|
+
|
|
103
|
+
`tiktok`, `facebook`, and `instagram` each take an `action` that picks one public route, plus that route's arguments. A missing argument, or one the action does not take, is refused before any request, with a message that lists what the action takes:
|
|
104
|
+
|
|
105
|
+
```text
|
|
106
|
+
TikTok error: tiktok action "comments" needs video_id. comments takes: video_id (required), count, cursor. No request was sent.
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
`post`, `profile`, and `media` return the item as the API sends it. List actions return `{ "results": [...], "next_cursor": ..., "next": ... }`. `next_cursor` is the API's `x-desearch-next-cursor` header; it is `null` on the last page. `count` (1–100) is a maximum: one page may hold fewer.
|
|
110
|
+
|
|
111
|
+
Prompt: show me the latest TikTok videos tagged #ai, then the next page.
|
|
112
|
+
|
|
113
|
+
```json
|
|
114
|
+
{ "name": "tiktok", "arguments": { "action": "hashtag", "tag": "ai", "count": 2 } }
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
```json
|
|
118
|
+
{
|
|
119
|
+
"results": [
|
|
120
|
+
{ "id": "7620891413932166433", "url": "https://www.tiktok.com/@tiktok/video/7620891413932166433", "text": "caption text", "hashtags": ["ai"] }
|
|
121
|
+
],
|
|
122
|
+
"next_cursor": "eyJ2IjoxLCJyb3V0ZSI6...",
|
|
123
|
+
"next": "More results: call tiktok again with action \"hashtag\", the same tag, and cursor set to next_cursor, unchanged. A cursor works for 24 hours."
|
|
124
|
+
}
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
```json
|
|
128
|
+
{ "name": "tiktok", "arguments": { "action": "hashtag", "tag": "ai", "count": 2, "cursor": "eyJ2IjoxLCJyb3V0ZSI6..." } }
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
The cursor is opaque: send it back unchanged, on the same action with the same target (`query`, `username`, `profile_id`, `video_id`, `post_id`, `shortcode`, or `tag`), within 24 hours. Any other value returns HTTP 422 and is not charged. TikTok `trending` and Instagram `search` return one page and take no cursor. Facebook `search` and `hashtag` read the Meta Ad Library (ads), not organic posts. Instagram `comments` takes the post shortcode (`DeuOR-CjKE9` in `https://www.instagram.com/p/DeuOR-CjKE9/`); a numeric media ID returns 404. A leading `@` on a username and `#` on a tag are removed.
|
|
88
132
|
|
|
89
133
|
### People Search
|
|
90
134
|
|
|
@@ -181,7 +225,11 @@ Then poll with `{"task_id": "3f1c2b9e-8d4a-4c1e-9b7a-2e5f6a7b8c9d"}` on `people-
|
|
|
181
225
|
}
|
|
182
226
|
```
|
|
183
227
|
|
|
184
|
-
The output above is shortened to one person. CSV
|
|
228
|
+
The output above is shortened to one person. `people-search-export` returns the same people as CSV or JSON Lines text (`GET /desearch/people/tasks/{task_id}/export`), cut to `max_rows` rows (default 100) and 50,000 characters, with a note first that says how many rows were cut:
|
|
229
|
+
|
|
230
|
+
```text
|
|
231
|
+
CSV export of task 3f1c2b9e-8d4a-4c1e-9b7a-2e5f6a7b8c9d: 250 rows. Showing the first 100 rows; 150 rows were cut by max_rows 100. For the whole file, call GET https://api.desearch.ai/desearch/people/tasks/3f1c2b9e-8d4a-4c1e-9b7a-2e5f6a7b8c9d/export?format=csv (plus the same filters) with your API key, or page through people with people-search-status or people-profiles.
|
|
232
|
+
```
|
|
185
233
|
|
|
186
234
|
When the search has ended, the task also says why and how complete it is, and each person says what their own profile confirms (0.3.2 and later):
|
|
187
235
|
|
|
@@ -213,6 +261,145 @@ When the search has ended, the task also says why and how complete it is, and ea
|
|
|
213
261
|
- `warnings` lists what made part of the search less reliable. `partial_enrichment`: `failed` of `attempted` profiles could not be read after search, so those people were scored on the search hit and show `enrichment: "failed"` with `enrichment_error`.
|
|
214
262
|
- `fully_verified` is `true` when every criterion is confirmed by the person's own profile or posts. `unverified_criteria` lists up to five that are not: `(unknown)`, `(not met)`, or a disqualifier that `(applies)`. Both are information only: the person still qualified. Results scored before 2026-10-20 have neither.
|
|
215
263
|
|
|
264
|
+
### Company Search
|
|
265
|
+
|
|
266
|
+
Company Search finds companies on the web that match a plain-language description. Company Enrich starts from domains you send. Both collect each company's public contact data: emails, phones, social profiles, and its leaders (`roles`: CEO, founders, CTO, and CFO by default) with their LinkedIn profiles and emails. Every contact keeps the page it came from (`source_url`). Company Search also scores how well each company fits (0–100); Company Enrich has no score (`score: null`).
|
|
267
|
+
|
|
268
|
+
A task runs in the background, like a People Search:
|
|
269
|
+
|
|
270
|
+
1. `company-search` or `company-enrich` starts a paid job billed to the user's Desearch balance and returns a `task_id` at once. Company Search reserves `count` companies at its per-company price, Company Enrich one company per domain sent at its own price (prices at https://desearch.ai/pricing). When the task ends you pay only for the companies it delivered (Company Search: a minimum of 2 when it delivers any; Company Enrich: a minimum of 1; a task that delivers none is free), and the rest of the reservation is returned. A company left out by `min_score` or `require` is not billed. Send the same `idempotency_key` to retry a call without starting, or paying for, a second task.
|
|
271
|
+
2. `company-search-status` returns the task's status, progress, cost, and a page of companies. Each company goes through stages: `profile` (its homepage, and the fit score), `contacts` (its contact, about, team, and imprint pages), `people` (its leaders), `email_patterns` (inferred leader emails), and `email_check` (every email checked: `valid`, `invalid`, `risky`, or `unknown`). A company is delivered as soon as the stages the request needs have run, with `enrichment.status: "partial"`, and later stages fill it in until it is `complete`. Pass `next_cursor` back as `cursor` to get only new companies; call without `cursor` to read every company in its latest version. `stage: "enriching"` means every company is delivered and only later stages are left. The `next` hint says which to do, and reminds you to read once more without `cursor` after the task ends if you read companies while it ran.
|
|
272
|
+
3. `company-search-pause`, `company-search-resume`, and `company-search-cancel` pause, resume, or cancel it. `company-search-tasks` lists your tasks, filtered by `type` (`search` or `enrich`), `status`, or `metadata`.
|
|
273
|
+
|
|
274
|
+
A People Search `task_id` is a 404 on the company tools, and a company `task_id` is a 404 on the People Search tools. Companies stay readable for 30 days after a task ends.
|
|
275
|
+
|
|
276
|
+
`require` keeps only companies that have all of the listed contacts: `email`, `phone`, `linkedin` (the company's LinkedIn page), `leader` (one of `roles`), `leader_email` (a leader with an email). A company that does not have them once the stage that can show them has run is not delivered and not billed. `roles` takes any of `ceo`, `founder`, `cto`, `cfo`, `coo`, `cmo`, `president`, `owner`, `managing_director`; a managing director (Geschäftsführer) counts as `ceo` when `ceo` is asked for. `infer_emails: false` skips the inferred leader emails and `verify_emails: false` skips the email checks.
|
|
277
|
+
|
|
278
|
+
Prompt: find 25 Series A fintech startups in Berlin with a leader's email.
|
|
279
|
+
|
|
280
|
+
```json
|
|
281
|
+
{
|
|
282
|
+
"name": "company-search",
|
|
283
|
+
"arguments": {
|
|
284
|
+
"query": "Series A fintech startups in Berlin building payment infrastructure",
|
|
285
|
+
"count": 25,
|
|
286
|
+
"countries": ["DE"],
|
|
287
|
+
"require": ["leader_email"]
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
```
|
|
291
|
+
|
|
292
|
+
Then poll with `{"task_id": "5b33f3ee-168b-4780-9c8e-63a626781872"}` on `company-search-status`:
|
|
293
|
+
|
|
294
|
+
```json
|
|
295
|
+
{
|
|
296
|
+
"task_id": "5b33f3ee-168b-4780-9c8e-63a626781872",
|
|
297
|
+
"search_type": "company_search",
|
|
298
|
+
"status": "running",
|
|
299
|
+
"stage": "processing",
|
|
300
|
+
"done": false,
|
|
301
|
+
"query": "Series A fintech startups in Berlin building payment infrastructure",
|
|
302
|
+
"count": 25,
|
|
303
|
+
"result_count": 3,
|
|
304
|
+
"progress": {
|
|
305
|
+
"candidates_found": 140,
|
|
306
|
+
"candidates_processed": 60,
|
|
307
|
+
"qualified": 3,
|
|
308
|
+
"filtered": { "not_a_company": 9, "below_min_score": 3 },
|
|
309
|
+
"enrichment": { "published": 3, "complete": 1, "pending": 2, "failed": 0 },
|
|
310
|
+
"email_checks": { "checked": 6, "valid": 3, "invalid": 1, "risky": 1, "unknown": 1 }
|
|
311
|
+
},
|
|
312
|
+
"reserved_cost_usd": 2.25,
|
|
313
|
+
"created_at": "2026-10-28T10:00:00Z",
|
|
314
|
+
"companies": [
|
|
315
|
+
{
|
|
316
|
+
"domain": "example.com",
|
|
317
|
+
"name": "Example Payments",
|
|
318
|
+
"url": "https://example.com/",
|
|
319
|
+
"industry": "Fintech",
|
|
320
|
+
"location": { "country": "DE", "city": "Berlin" },
|
|
321
|
+
"description": "Payment infrastructure for marketplaces.",
|
|
322
|
+
"score": 86,
|
|
323
|
+
"why": "Berlin payments infrastructure startup, Series A in 2025.",
|
|
324
|
+
"reasons": ["Payments infrastructure for marketplaces", "Based in Berlin"],
|
|
325
|
+
"fully_verified": false,
|
|
326
|
+
"unverified_criteria": ["Stage: Series A (unknown)"],
|
|
327
|
+
"primary_email": {
|
|
328
|
+
"value": "anna.schmidt@example.com",
|
|
329
|
+
"type": "personal",
|
|
330
|
+
"source": "inferred",
|
|
331
|
+
"person": "Anna Schmidt",
|
|
332
|
+
"confidence": "high",
|
|
333
|
+
"pattern": "first.last",
|
|
334
|
+
"verification": "valid"
|
|
335
|
+
},
|
|
336
|
+
"primary_contact": {
|
|
337
|
+
"name": "Anna Schmidt",
|
|
338
|
+
"title": "Co-founder & CEO",
|
|
339
|
+
"email": "anna.schmidt@example.com",
|
|
340
|
+
"linkedin_url": "https://www.linkedin.com/in/example-anna",
|
|
341
|
+
"reason": "CEO, email inferred from the company's pattern and verified"
|
|
342
|
+
},
|
|
343
|
+
"contact_coverage": { "email": true, "phone": true, "linkedin": true, "leader": true, "leader_email": true },
|
|
344
|
+
"emails": [
|
|
345
|
+
{
|
|
346
|
+
"value": "hello@example.com",
|
|
347
|
+
"type": "general",
|
|
348
|
+
"source": "website",
|
|
349
|
+
"source_url": "https://example.com/impressum",
|
|
350
|
+
"verification": "valid"
|
|
351
|
+
}
|
|
352
|
+
],
|
|
353
|
+
"phones": [{ "value": "+493012345678", "type": "main", "source_url": "https://example.com/impressum" }],
|
|
354
|
+
"socials": [
|
|
355
|
+
{
|
|
356
|
+
"type": "linkedin",
|
|
357
|
+
"url": "https://www.linkedin.com/company/example-payments",
|
|
358
|
+
"source_url": "https://example.com/"
|
|
359
|
+
}
|
|
360
|
+
],
|
|
361
|
+
"leaders": [
|
|
362
|
+
{
|
|
363
|
+
"name": "Anna Schmidt",
|
|
364
|
+
"title": "Co-founder & CEO",
|
|
365
|
+
"roles": ["ceo", "founder"],
|
|
366
|
+
"verified": true,
|
|
367
|
+
"linkedin_url": "https://www.linkedin.com/in/example-anna",
|
|
368
|
+
"emails": [
|
|
369
|
+
{
|
|
370
|
+
"value": "anna.schmidt@example.com",
|
|
371
|
+
"type": "personal",
|
|
372
|
+
"source": "inferred",
|
|
373
|
+
"confidence": "high",
|
|
374
|
+
"pattern": "first.last",
|
|
375
|
+
"verification": "valid"
|
|
376
|
+
}
|
|
377
|
+
],
|
|
378
|
+
"evidence_url": "https://example.com/impressum"
|
|
379
|
+
}
|
|
380
|
+
],
|
|
381
|
+
"enrichment": {
|
|
382
|
+
"status": "complete",
|
|
383
|
+
"stages": { "profile": "done", "contacts": "done", "people": "done", "email_patterns": "done", "email_check": "done" }
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
],
|
|
387
|
+
"next_cursor": "3",
|
|
388
|
+
"has_more": false,
|
|
389
|
+
"next": "Still running. Wait 15 to 30 seconds, then call company-search-status again with cursor \"3\" to get only the companies delivered since this call. Companies with enrichment status \"partial\" are still being filled in; when the task is done, call company-search-status without cursor to read every company in its latest version."
|
|
390
|
+
}
|
|
391
|
+
```
|
|
392
|
+
|
|
393
|
+
The output above is shortened to one company.
|
|
394
|
+
|
|
395
|
+
- `score` is the fit score (0–100) for Company Search and `null` for Company Enrich. `why` and up to three `reasons` say why it matched; `fully_verified` and `unverified_criteria` say what the company's own pages confirm (information only: the company still qualified).
|
|
396
|
+
- Each email has `type` (`personal`, `leadership`, `sales`, `general`, `press`, `support`, `careers`, `legal`, `other`), `source` (`website`, `search`, `linkedin`, `inferred`), `source_url` (none for inferred ones), and `verification` (`valid`, `invalid`, `risky`, `unknown`; left out until the email checks ran). Inferred emails carry `confidence` (`high`: the pattern was learned from this company's own addresses; `low`: a common pattern) and `pattern`.
|
|
397
|
+
- `primary_email` is never a `support`, `legal`, `careers`, `press`, or `other` address, and an inferred one only when `valid`. `primary_contact` is the leader to reach first, with why.
|
|
398
|
+
- Each leader has `roles` (from the request's `roles`), `verified` (a quote on the company's own site or their current LinkedIn position shows the role), and `evidence_url` (the page that shows it).
|
|
399
|
+
- `completion_reason` adds `all_domains_processed` (Company Enrich read every domain) to People Search's values. `warnings` keep their `code` and `message`, for example `enrichment_time_limit` when some companies were not fully enriched before the task's time limit.
|
|
400
|
+
|
|
401
|
+
CSV and JSON Lines downloads (`GET /desearch/companies/tasks/{task_id}/export`) are not MCP tools; call the API directly for a file.
|
|
402
|
+
|
|
216
403
|
## Prerequisites 📋
|
|
217
404
|
|
|
218
405
|
- An [Desearch API Key](https://console.desearch.ai/api-keys)
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import { type DesearchApi, type QueryValue } from "./desearch-api.js";
|
|
2
|
+
import { type PeopleApiResponse, type PeopleControlAction } from "./people.js";
|
|
3
|
+
/**
|
|
4
|
+
* Company Search and Company Enrich on the Desearch API (`/desearch/companies/*`).
|
|
5
|
+
*
|
|
6
|
+
* desearch-js 1.5 has no Company Search methods, so this module calls the routes
|
|
7
|
+
* directly through `desearch-api.ts`, with the same base URL, `Authorization: <key>`
|
|
8
|
+
* header, and `HTTP <status>: <detail>` error text as People Search (people.ts).
|
|
9
|
+
*
|
|
10
|
+
* - `POST /desearch/companies/search` finds companies from a description and
|
|
11
|
+
* `POST /desearch/companies/enrich` reads the domains you send. Both are billed:
|
|
12
|
+
* they reserve companies at the route price and settle to what they deliver.
|
|
13
|
+
* - Every other route (tasks, results, pause/resume/cancel) is free. Both kinds of task
|
|
14
|
+
* run on the People Search engine, but a People Search task_id is a 404 on these
|
|
15
|
+
* routes and a company task_id is a 404 on People Search's.
|
|
16
|
+
*
|
|
17
|
+
* A company is published once the stages its request needs have run
|
|
18
|
+
* (`enrichment.status: "partial"`); later stages (contacts, people, email_patterns,
|
|
19
|
+
* email_check) fill it in place until it is `complete`. A results cursor returns only
|
|
20
|
+
* companies delivered after it; reading without a cursor returns every company in its
|
|
21
|
+
* latest version.
|
|
22
|
+
*/
|
|
23
|
+
/** Statuses are People Search's (desearch-public-api model/people.py TaskStatus). */
|
|
24
|
+
export declare const COMPANY_TASK_STATUSES: readonly ["queued", "running", "pausing", "paused", "cancelling", "completed", "partial", "failed", "cancelled", "expired"];
|
|
25
|
+
/** `roles` (desearch-public-api model/companies.py Role). */
|
|
26
|
+
export declare const COMPANY_ROLES: readonly ["ceo", "founder", "cto", "cfo", "coo", "cmo", "president", "owner", "managing_director"];
|
|
27
|
+
export type CompanyRole = (typeof COMPANY_ROLES)[number];
|
|
28
|
+
/** `filters.require` (model/companies.py Requirement). */
|
|
29
|
+
export declare const COMPANY_REQUIREMENTS: readonly ["email", "phone", "linkedin", "leader", "leader_email"];
|
|
30
|
+
export type CompanyRequirement = (typeof COMPANY_REQUIREMENTS)[number];
|
|
31
|
+
/** `type` on `GET /desearch/companies/tasks` (routers/companies.py TYPE_SERVICES). */
|
|
32
|
+
export declare const COMPANY_TASK_TYPES: readonly ["search", "enrich"];
|
|
33
|
+
export type CompanyTaskType = (typeof COMPANY_TASK_TYPES)[number];
|
|
34
|
+
/** Request limits (model/companies.py, model/people.py). */
|
|
35
|
+
export declare const COMPANY_DOMAINS_MAX = 200;
|
|
36
|
+
export declare const COMPANY_COUNTRIES_MAX = 20;
|
|
37
|
+
export declare const COMPANY_EXCLUDE_MAX = 1000;
|
|
38
|
+
interface CompanyTaskOptions {
|
|
39
|
+
roles?: CompanyRole[];
|
|
40
|
+
infer_emails?: boolean;
|
|
41
|
+
verify_emails?: boolean;
|
|
42
|
+
metadata?: Record<string, string>;
|
|
43
|
+
idempotency_key?: string;
|
|
44
|
+
}
|
|
45
|
+
export interface CompanySearchArgs extends CompanyTaskOptions {
|
|
46
|
+
query: string;
|
|
47
|
+
count?: number;
|
|
48
|
+
min_score?: number;
|
|
49
|
+
exclude?: string[];
|
|
50
|
+
countries?: string[];
|
|
51
|
+
require?: CompanyRequirement[];
|
|
52
|
+
}
|
|
53
|
+
export interface CompanyEnrichArgs extends CompanyTaskOptions {
|
|
54
|
+
domains: string[];
|
|
55
|
+
}
|
|
56
|
+
export interface CompanyClient {
|
|
57
|
+
startSearch(body: Record<string, unknown>, idempotencyKey?: string): Promise<PeopleApiResponse>;
|
|
58
|
+
startEnrich(body: Record<string, unknown>, idempotencyKey?: string): Promise<PeopleApiResponse>;
|
|
59
|
+
getTask(taskId: string): Promise<unknown>;
|
|
60
|
+
getResults(taskId: string, params: {
|
|
61
|
+
cursor?: string;
|
|
62
|
+
limit?: number;
|
|
63
|
+
}): Promise<unknown>;
|
|
64
|
+
controlTask(taskId: string, action: PeopleControlAction): Promise<unknown>;
|
|
65
|
+
listTasks(params: Record<string, QueryValue>): Promise<unknown>;
|
|
66
|
+
}
|
|
67
|
+
export declare function createCompanyClient(apiKey: string, baseUrl?: string): CompanyClient;
|
|
68
|
+
/** A Company Search client on an existing API caller, so the server shares one per key. */
|
|
69
|
+
export declare function companyClientFor(call: DesearchApi): CompanyClient;
|
|
70
|
+
/**
|
|
71
|
+
* Request body for `POST /desearch/companies/search` (model/companies.py CompanySearchRequest).
|
|
72
|
+
* The tool takes `countries` and `require` as top-level arguments; they go in `filters`.
|
|
73
|
+
*/
|
|
74
|
+
export declare function companySearchBody(args: CompanySearchArgs): Record<string, unknown>;
|
|
75
|
+
/** Request body for `POST /desearch/companies/enrich` (model/companies.py CompanyEnrichRequest). */
|
|
76
|
+
export declare function companyEnrichBody(args: CompanyEnrichArgs): Record<string, unknown>;
|
|
77
|
+
/**
|
|
78
|
+
* One company as an agent needs it: what it is, how well it fits (Company Search; `score`
|
|
79
|
+
* is null for Company Enrich), how to reach it and its leaders, with the page each contact
|
|
80
|
+
* came from, and how far its enrichment has got.
|
|
81
|
+
*/
|
|
82
|
+
export declare function compactCompany(company: unknown): Record<string, unknown>;
|
|
83
|
+
/**
|
|
84
|
+
* Task fields an agent polls on. `progress` is the worker's counters, passed through
|
|
85
|
+
* without its copy of `warnings` (listed once, at the top). `completion_reason` appears
|
|
86
|
+
* once the task has ended, `coverage_limited` only when true.
|
|
87
|
+
*/
|
|
88
|
+
export declare function compactCompanyTask(task: unknown, options?: {
|
|
89
|
+
progress?: boolean;
|
|
90
|
+
}): Record<string, unknown>;
|
|
91
|
+
/**
|
|
92
|
+
* One sentence (or two) on what to do next, so an agent does not have to infer it from the status.
|
|
93
|
+
* `nextCursor` is the results cursor when the caller just read a page of companies.
|
|
94
|
+
* `task` adds the stage (`enriching`) and why an ended task stopped.
|
|
95
|
+
* `page.partial` counts the companies on this page whose enrichment is still `partial`;
|
|
96
|
+
* `page.readAfterStart` is true when the caller passed a cursor, so it may hold older
|
|
97
|
+
* versions of companies it read before.
|
|
98
|
+
*/
|
|
99
|
+
export declare function companyNextStep(status: string | undefined, nextCursor?: string, hasMore?: boolean, task?: {
|
|
100
|
+
stage?: unknown;
|
|
101
|
+
completion_reason?: unknown;
|
|
102
|
+
coverage_limited?: unknown;
|
|
103
|
+
count?: unknown;
|
|
104
|
+
}, page?: {
|
|
105
|
+
partial?: number;
|
|
106
|
+
readAfterStart?: boolean;
|
|
107
|
+
}): string;
|
|
108
|
+
/** `company-search`: start a billed background Company Search and return the task to poll. */
|
|
109
|
+
export declare function startCompanySearch(client: CompanyClient, args: CompanySearchArgs): Promise<Record<string, unknown>>;
|
|
110
|
+
/** `company-enrich`: start a billed background Company Enrich and return the task to poll. */
|
|
111
|
+
export declare function startCompanyEnrich(client: CompanyClient, args: CompanyEnrichArgs): Promise<Record<string, unknown>>;
|
|
112
|
+
/** `company-search-status`: task status and progress, plus a page of companies when there are any. */
|
|
113
|
+
export declare function readCompanyStatus(client: CompanyClient, args: {
|
|
114
|
+
task_id: string;
|
|
115
|
+
cursor?: string;
|
|
116
|
+
limit?: number;
|
|
117
|
+
include_companies?: boolean;
|
|
118
|
+
}): Promise<Record<string, unknown>>;
|
|
119
|
+
/** `company-search-pause`, `company-search-resume`, `company-search-cancel`: change a task's state. */
|
|
120
|
+
export declare function controlCompanyTask(client: CompanyClient, args: {
|
|
121
|
+
task_id: string;
|
|
122
|
+
action: PeopleControlAction;
|
|
123
|
+
}): Promise<Record<string, unknown>>;
|
|
124
|
+
/** `company-search-tasks`: the caller's Company Search and Company Enrich tasks, newest first. */
|
|
125
|
+
export declare function listCompanyTasks(client: CompanyClient, args: {
|
|
126
|
+
type?: CompanyTaskType;
|
|
127
|
+
status?: string[];
|
|
128
|
+
limit?: number;
|
|
129
|
+
cursor?: string;
|
|
130
|
+
metadata?: Record<string, string>;
|
|
131
|
+
}): Promise<Record<string, unknown>>;
|
|
132
|
+
export {};
|
|
133
|
+
//# sourceMappingURL=companies.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"companies.d.ts","sourceRoot":"","sources":["../companies.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgC,KAAK,WAAW,EAAE,KAAK,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACpG,OAAO,EAUH,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EAC3B,MAAM,aAAa,CAAC;AAErB;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,qFAAqF;AACrF,eAAO,MAAM,qBAAqB,6HAAuB,CAAC;AAE1D,6DAA6D;AAC7D,eAAO,MAAM,aAAa,oGAUhB,CAAC;AACX,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,CAAC,CAAC;AAEzD,0DAA0D;AAC1D,eAAO,MAAM,oBAAoB,mEAAoE,CAAC;AACtG,MAAM,MAAM,kBAAkB,GAAG,CAAC,OAAO,oBAAoB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEvE,sFAAsF;AACtF,eAAO,MAAM,kBAAkB,+BAAgC,CAAC;AAChE,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,kBAAkB,CAAC,CAAC,MAAM,CAAC,CAAC;AAElE,4DAA4D;AAC5D,eAAO,MAAM,mBAAmB,MAAM,CAAC;AACvC,eAAO,MAAM,qBAAqB,KAAK,CAAC;AACxC,eAAO,MAAM,mBAAmB,OAAO,CAAC;AAExC,UAAU,kBAAkB;IACxB,KAAK,CAAC,EAAE,WAAW,EAAE,CAAC;IACtB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAClC,eAAe,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,MAAM,WAAW,iBAAkB,SAAQ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