desearch-mcp-server 0.6.0 → 0.8.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 +28 -0
- package/README.md +73 -5
- package/build/companies.d.ts +6 -3
- package/build/companies.d.ts.map +1 -1
- package/build/companies.js +8 -4
- package/build/desearch-api.d.ts +36 -0
- package/build/desearch-api.d.ts.map +1 -0
- package/build/desearch-api.js +72 -0
- package/build/people.d.ts +65 -16
- package/build/people.d.ts.map +1 -1
- package/build/people.js +152 -68
- package/build/server.d.ts +4 -1
- package/build/server.d.ts.map +1 -1
- package/build/server.js +281 -6
- package/build/social.d.ts +309 -0
- package/build/social.d.ts.map +1 -0
- package/build/social.js +364 -0
- package/package.json +7 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,33 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.8.0
|
|
4
|
+
|
|
5
|
+
YouTube, Reddit, and Threads: three new tools (39 in total) for the 16 public routes tagged YouTube Search, Reddit Search, and Threads Search. They are not in `desearch-js` 1.5, so they use the same `social.ts` action table and direct API calls (`desearch-api.ts`) as `tiktok`, `facebook`, and `instagram`. Each request is billed as one unit (an empty page included; a 404, a 422, and a 5xx are free).
|
|
6
|
+
|
|
7
|
+
- `youtube`: 6 routes. `search` (`POST /desearch/youtube/search`: `query`, `type`, `upload_date`, `sort_by`, `duration`, `cursor`), `video`, `transcript` (`language`), `comments` (`order`, `cursor`), `channel`, and `channel_videos` (`sort`, `cursor`). Video ids may be full YouTube URLs.
|
|
8
|
+
- `reddit`: 5 routes. `search` (`POST /desearch/reddit/search`: `query`, `sort`, `timeframe`, `cursor`), `subreddit`, `subreddit_posts` (`sort`, `timeframe`, `cursor`), `post`, and `comments` (`cursor`; a tree with the replies Reddit loaded). The two `sort` lists differ by action, and a value from the other list is refused before the request. A leading `r/` on a subreddit name is removed.
|
|
9
|
+
- `threads`: 5 routes. `search` (`query`, `start_date`, `end_date`), `search_users`, `profile`, `profile_posts`, and `post` (with its replies and thread continuation). Threads returns one page, so the tool has no `cursor`.
|
|
10
|
+
- Paging: `youtube` `search`, `comments`, `channel_videos` and `reddit` `search`, `subreddit_posts`, `comments` return `{ results, next_cursor, next }` with `next_cursor` from the `x-desearch-next-cursor` header, exactly as the TikTok actions do.
|
|
11
|
+
- All three 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.
|
|
12
|
+
- `scripts/e2e-youtube-reddit-threads.mjs` calls every new action once over stdio against a live API (`--base-url`, `--key-env`), plus a second page on each action that pages.
|
|
13
|
+
- `DESEARCH_API_BASE`, which already set the OAuth key-check host, now also sets the host for the routes the server calls directly (People Search, Company Search, `search-api`, `people-search-export`, and the social tools), so a staging API can be tested end to end. Tools built on `desearch-js` still call `https://api.desearch.ai`.
|
|
14
|
+
|
|
15
|
+
## 0.7.0
|
|
16
|
+
|
|
17
|
+
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.
|
|
18
|
+
|
|
19
|
+
- `tiktok`: public TikTok data. `action` picks one of 7 routes: `search` (`POST /desearch/tiktok/search`), `post`, `profile`, `profile_posts`, `comments`, `hashtag`, and `trending`.
|
|
20
|
+
- `facebook`: public Facebook data, 6 routes: `search` and `hashtag` (Meta Ad Library ads, not organic posts), `post`, `profile`, `profile_posts`, and `comments`.
|
|
21
|
+
- `instagram`: public Instagram data, 6 routes: `search` (profiles, one page), `media`, `profile`, `profile_posts`, `comments` (by shortcode), and `hashtag`.
|
|
22
|
+
- 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.
|
|
23
|
+
- 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.
|
|
24
|
+
- `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.
|
|
25
|
+
- `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.
|
|
26
|
+
- 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.
|
|
27
|
+
- `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).
|
|
28
|
+
- The Company Search export route (`GET /desearch/companies/tasks/{task_id}/export`) is still not a tool.
|
|
29
|
+
- 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.
|
|
30
|
+
|
|
3
31
|
## 0.6.0
|
|
4
32
|
|
|
5
33
|
Company Search and Company Enrich tools. Company Search is live on `api.desearch.ai` since 2026-10-29.
|
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, 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.
|
|
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, Instagram, YouTube (videos, transcripts, comments, channels), Reddit, and Threads 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.8.0 exposes 39 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`, `youtube`, `reddit`, `threads`, `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,12 @@ 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`).
|
|
83
|
+
- **YouTube** (`youtube`): Public YouTube data. `action` (required): `search` (`query`; optional `type`, `upload_date`, `sort_by`, `duration`, `cursor`; videos, Shorts, live streams, channels, and playlists, each with a `type`), `video` (`id`: video or Short ID or URL), `transcript` (`video_id`; optional `language`), `comments` (`video_id`; optional `order`, `cursor`), `channel` (`handle`, with or without `@`, or a `UC...` channel ID), `channel_videos` (`handle`; optional `sort`, `cursor`). See [YouTube, Reddit, and Threads](#youtube-reddit-and-threads).
|
|
84
|
+
- **Reddit** (`reddit`): Public Reddit data. `action` (required): `search` (`query`; optional `sort`, `timeframe`, `cursor`), `subreddit` (`name`, case-sensitive), `subreddit_posts` (`name`; optional `sort`, `timeframe`, `cursor`), `post` (`id`: post ID or URL), `comments` (`post_id`; optional `cursor`).
|
|
85
|
+
- **Threads** (`threads`): Public Threads data. `action` (required): `search` (`query`; optional `start_date`, `end_date`), `search_users` (`query`), `profile` (`username`), `profile_posts` (`username`), `post` (`id`: post URL or shortcode). One page each; no cursor.
|
|
79
86
|
- **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
87
|
- **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
88
|
- **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,6 +90,7 @@ Lookup tools, including `search` and `fetch`, set `readOnlyHint: true`, `destruc
|
|
|
83
90
|
- **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
91
|
- **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
92
|
- **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.
|
|
93
|
+
- **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.
|
|
86
94
|
- **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.
|
|
87
95
|
- **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.
|
|
88
96
|
- **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.
|
|
@@ -91,7 +99,63 @@ Lookup tools, including `search` and `fetch`, set `readOnlyHint: true`, `destruc
|
|
|
91
99
|
- **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.
|
|
92
100
|
- **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.
|
|
93
101
|
|
|
94
|
-
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
|
|
102
|
+
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, Instagram, YouTube, Reddit, and Threads 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.
|
|
103
|
+
|
|
104
|
+
### TikTok, Facebook, and Instagram
|
|
105
|
+
|
|
106
|
+
`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:
|
|
107
|
+
|
|
108
|
+
```text
|
|
109
|
+
TikTok error: tiktok action "comments" needs video_id. comments takes: video_id (required), count, cursor. No request was sent.
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
`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.
|
|
113
|
+
|
|
114
|
+
Prompt: show me the latest TikTok videos tagged #ai, then the next page.
|
|
115
|
+
|
|
116
|
+
```json
|
|
117
|
+
{ "name": "tiktok", "arguments": { "action": "hashtag", "tag": "ai", "count": 2 } }
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
```json
|
|
121
|
+
{
|
|
122
|
+
"results": [
|
|
123
|
+
{ "id": "7620891413932166433", "url": "https://www.tiktok.com/@tiktok/video/7620891413932166433", "text": "caption text", "hashtags": ["ai"] }
|
|
124
|
+
],
|
|
125
|
+
"next_cursor": "eyJ2IjoxLCJyb3V0ZSI6...",
|
|
126
|
+
"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."
|
|
127
|
+
}
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
```json
|
|
131
|
+
{ "name": "tiktok", "arguments": { "action": "hashtag", "tag": "ai", "count": 2, "cursor": "eyJ2IjoxLCJyb3V0ZSI6..." } }
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
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.
|
|
135
|
+
|
|
136
|
+
### YouTube, Reddit, and Threads
|
|
137
|
+
|
|
138
|
+
`youtube`, `reddit`, and `threads` work the same way: `action` picks one public route, and the action's arguments are checked before any request. Each call is billed per request, including an empty page; a 404, a 422, and a 5xx are not charged (prices at https://desearch.ai/pricing).
|
|
139
|
+
|
|
140
|
+
| Tool | Actions that page (take `cursor`) | Single items | One page, no cursor |
|
|
141
|
+
| --- | --- | --- | --- |
|
|
142
|
+
| `youtube` | `search`, `comments`, `channel_videos` | `video`, `transcript`, `channel` | — |
|
|
143
|
+
| `reddit` | `search`, `subreddit_posts`, `comments` | `subreddit`, `post` | — |
|
|
144
|
+
| `threads` | — | `profile`, `post` | `search`, `search_users`, `profile_posts` (the latest posts only) |
|
|
145
|
+
|
|
146
|
+
Paging is the same as on TikTok: a list action returns `{ "results": [...], "next_cursor": ..., "next": ... }`, where `next_cursor` is the `x-desearch-next-cursor` response header. Send it back unchanged as `cursor`, on the same action with the same target, within 24 hours.
|
|
147
|
+
|
|
148
|
+
Prompt: find recent YouTube videos about bittensor, then read the transcript of the first one.
|
|
149
|
+
|
|
150
|
+
```json
|
|
151
|
+
{ "name": "youtube", "arguments": { "action": "search", "query": "bittensor", "type": "videos", "upload_date": "this_month" } }
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
```json
|
|
155
|
+
{ "name": "youtube", "arguments": { "action": "transcript", "video_id": "dQw4w9WgXcQ", "language": "en" } }
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
The transcript comes back as `{ "videoId", "language", "text", "segments": [{ "text", "startMs", "endMs", "startText" }] }`; a video without captions returns 404 (not charged). `video`, `transcript`, and `comments` take a video ID or a full YouTube URL; `reddit` `post` and `comments` take a post ID (with or without `t3_`) or URL; `threads` `post` takes a post URL or shortcode. Reddit subreddit names are case-sensitive (`AskReddit`); a leading `r/` is removed. Reddit `sort` values depend on the action: `relevance`, `new`, `top`, or `comment_count` for `search`, and `best`, `hot`, `new`, `top`, or `rising` for `subreddit_posts` (`timeframe` applies to `top` there). `reddit` `comments` returns a tree: top-level comments with the `replies` Reddit loaded and `hasMoreReplies` when there are more.
|
|
95
159
|
|
|
96
160
|
### People Search
|
|
97
161
|
|
|
@@ -188,7 +252,11 @@ Then poll with `{"task_id": "3f1c2b9e-8d4a-4c1e-9b7a-2e5f6a7b8c9d"}` on `people-
|
|
|
188
252
|
}
|
|
189
253
|
```
|
|
190
254
|
|
|
191
|
-
The output above is shortened to one person. CSV
|
|
255
|
+
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:
|
|
256
|
+
|
|
257
|
+
```text
|
|
258
|
+
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.
|
|
259
|
+
```
|
|
192
260
|
|
|
193
261
|
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):
|
|
194
262
|
|
|
@@ -650,7 +718,7 @@ Environment variables for the host:
|
|
|
650
718
|
| `OAUTH_REGISTER_RATE_WINDOW_SEC` | No | Registration rate-limit window in seconds. Default 3600 (1 hour). Range 1 to 86400. |
|
|
651
719
|
| `OAUTH_AUTHORIZE_RATE_LIMIT` | No | Sign-in key checks per IP per window. Default 20. Range 1 to 10000. |
|
|
652
720
|
| `OAUTH_AUTHORIZE_RATE_WINDOW_SEC` | No | Sign-in key-check window in seconds. Default 600 (10 minutes). Range 1 to 86400. |
|
|
653
|
-
| `DESEARCH_API_BASE` | No |
|
|
721
|
+
| `DESEARCH_API_BASE` | No | Desearch API host. Default `https://api.desearch.ai`. Used by the key check and by the routes the server calls directly (People Search, Company Search, `search-api`, `people-search-export`, and the social tools), for example to test against a staging API. Tools built on `desearch-js` always call `https://api.desearch.ai`. |
|
|
654
722
|
| `OAUTH_REQUIRE_AUTH_ON_INITIALIZE` | No | Set to `true` to require a key or access token on `initialize`. Default is off, so keyless `initialize` stays public. `tools/list` stays public either way. |
|
|
655
723
|
|
|
656
724
|
The key check calls `GET /twitter/trends?woeid=1&count=1`. A real key is authenticated and then rejected as invalid input (HTTP 422), so the check does not run a full trends query. Only 422 counts as a valid key. `401` and `403` reject the key. Any other status, including a 2xx, is a verification error and is not treated as valid.
|
package/build/companies.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type DesearchApi, type QueryValue } from "./desearch-api.js";
|
|
2
|
+
import { type PeopleApiResponse, type PeopleControlAction } from "./people.js";
|
|
2
3
|
/**
|
|
3
4
|
* Company Search and Company Enrich on the Desearch API (`/desearch/companies/*`).
|
|
4
5
|
*
|
|
5
6
|
* desearch-js 1.5 has no Company Search methods, so this module calls the routes
|
|
6
|
-
* directly with the same base URL, `Authorization: <key>`
|
|
7
|
-
* `HTTP <status>: <detail>` error text as People Search (people.ts).
|
|
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).
|
|
8
9
|
*
|
|
9
10
|
* - `POST /desearch/companies/search` finds companies from a description and
|
|
10
11
|
* `POST /desearch/companies/enrich` reads the domains you send. Both are billed:
|
|
@@ -64,6 +65,8 @@ export interface CompanyClient {
|
|
|
64
65
|
listTasks(params: Record<string, QueryValue>): Promise<unknown>;
|
|
65
66
|
}
|
|
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;
|
|
67
70
|
/**
|
|
68
71
|
* Request body for `POST /desearch/companies/search` (model/companies.py CompanySearchRequest).
|
|
69
72
|
* The tool takes `countries` and `require` as top-level arguments; they go in `filters`.
|
package/build/companies.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"companies.d.ts","sourceRoot":"","sources":["../companies.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
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,C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,CAAC,CAAC,CAIlC;AAED,kGAAkG;AAClG,wBAAsB,gBAAgB,CAClC,MAAM,EAAE,aAAa,EACrB,IAAI,EAAE;IACF,IAAI,CAAC,EAAE,eAAe,CAAC;IACvB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACrC,GACF,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAgBlC"}
|
package/build/companies.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { createDesearchApi, withQuery } from "./desearch-api.js";
|
|
2
|
+
import { PEOPLE_API_BASE_URL, PEOPLE_ENDED_STATUSES, PEOPLE_TASK_STATUSES, arrayOf, compact, numberOf, objectOf, stringOf, unverifiedCriteria, } from "./people.js";
|
|
2
3
|
/**
|
|
3
4
|
* Company Search and Company Enrich on the Desearch API (`/desearch/companies/*`).
|
|
4
5
|
*
|
|
5
6
|
* desearch-js 1.5 has no Company Search methods, so this module calls the routes
|
|
6
|
-
* directly with the same base URL, `Authorization: <key>`
|
|
7
|
-
* `HTTP <status>: <detail>` error text as People Search (people.ts).
|
|
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).
|
|
8
9
|
*
|
|
9
10
|
* - `POST /desearch/companies/search` finds companies from a description and
|
|
10
11
|
* `POST /desearch/companies/enrich` reads the domains you send. Both are billed:
|
|
@@ -42,7 +43,10 @@ export const COMPANY_DOMAINS_MAX = 200;
|
|
|
42
43
|
export const COMPANY_COUNTRIES_MAX = 20;
|
|
43
44
|
export const COMPANY_EXCLUDE_MAX = 1000;
|
|
44
45
|
export function createCompanyClient(apiKey, baseUrl = PEOPLE_API_BASE_URL) {
|
|
45
|
-
|
|
46
|
+
return companyClientFor(createDesearchApi(apiKey, baseUrl));
|
|
47
|
+
}
|
|
48
|
+
/** A Company Search client on an existing API caller, so the server shares one per key. */
|
|
49
|
+
export function companyClientFor(call) {
|
|
46
50
|
const taskPath = (taskId) => `/desearch/companies/tasks/${encodeURIComponent(taskId)}`;
|
|
47
51
|
const start = (path, body, idempotencyKey) => call("POST", path, {
|
|
48
52
|
body,
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Direct calls to the Desearch API for routes desearch-js 1.5 does not cover
|
|
3
|
+
* (People Search, the TikTok, Facebook, Instagram, YouTube, Reddit and Threads routes,
|
|
4
|
+
* `POST /search`).
|
|
5
|
+
*
|
|
6
|
+
* Same base URL, `Authorization: <key>` header, and `HTTP <status>: <detail>`
|
|
7
|
+
* error text that desearch-js uses, so every tool reports API errors the same way.
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* `DESEARCH_API_BASE` (the host the OAuth key check also uses) points these direct calls
|
|
11
|
+
* at another Desearch API, such as a staging deploy. The desearch-js tools ignore it.
|
|
12
|
+
*/
|
|
13
|
+
export declare const DESEARCH_API_BASE_URL: string;
|
|
14
|
+
export type QueryValue = string | number | boolean | undefined;
|
|
15
|
+
export interface ApiResponse {
|
|
16
|
+
status: number;
|
|
17
|
+
/** Parsed JSON body, or the body text when it is not JSON. */
|
|
18
|
+
data: unknown;
|
|
19
|
+
/** The body exactly as sent, for CSV and JSON Lines downloads. */
|
|
20
|
+
text: string;
|
|
21
|
+
headers: {
|
|
22
|
+
get(name: string): string | null;
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
export interface ApiRequestOptions {
|
|
26
|
+
query?: Record<string, QueryValue>;
|
|
27
|
+
body?: Record<string, unknown>;
|
|
28
|
+
headers?: Record<string, string>;
|
|
29
|
+
}
|
|
30
|
+
export type DesearchApi = (method: "GET" | "POST", path: string, options?: ApiRequestOptions) => Promise<ApiResponse>;
|
|
31
|
+
/** The API's `detail` (plus the task status People Search adds on a 409), or the start of the body. */
|
|
32
|
+
export declare function errorDetail(data: unknown, text: string): string;
|
|
33
|
+
/** `path?key=value`, leaving out undefined values. */
|
|
34
|
+
export declare function withQuery(path: string, params: Record<string, QueryValue>): string;
|
|
35
|
+
export declare function createDesearchApi(apiKey: string, baseUrl?: string): DesearchApi;
|
|
36
|
+
//# sourceMappingURL=desearch-api.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"desearch-api.d.ts","sourceRoot":"","sources":["../desearch-api.ts"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AAEH;;;GAGG;AACH,eAAO,MAAM,qBAAqB,QAGjC,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;AAE/D,MAAM,WAAW,WAAW;IACxB,MAAM,EAAE,MAAM,CAAC;IACf,8DAA8D;IAC9D,IAAI,EAAE,OAAO,CAAC;IACd,kEAAkE;IAClE,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE;QAAE,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAA;KAAE,CAAC;CACjD;AAED,MAAM,WAAW,iBAAiB;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;IACnC,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC/B,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACpC;AAED,MAAM,MAAM,WAAW,GAAG,CACtB,MAAM,EAAE,KAAK,GAAG,MAAM,EACtB,IAAI,EAAE,MAAM,EACZ,OAAO,CAAC,EAAE,iBAAiB,KAC1B,OAAO,CAAC,WAAW,CAAC,CAAC;AAM1B,uGAAuG;AACvG,wBAAgB,WAAW,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAO/D;AAED,sDAAsD;AACtD,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,GAAG,MAAM,CASlF;AAED,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,GAAE,MAA8B,GAAG,WAAW,CAgCtG"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { fetch } from "undici";
|
|
2
|
+
/**
|
|
3
|
+
* Direct calls to the Desearch API for routes desearch-js 1.5 does not cover
|
|
4
|
+
* (People Search, the TikTok, Facebook, Instagram, YouTube, Reddit and Threads routes,
|
|
5
|
+
* `POST /search`).
|
|
6
|
+
*
|
|
7
|
+
* Same base URL, `Authorization: <key>` header, and `HTTP <status>: <detail>`
|
|
8
|
+
* error text that desearch-js uses, so every tool reports API errors the same way.
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* `DESEARCH_API_BASE` (the host the OAuth key check also uses) points these direct calls
|
|
12
|
+
* at another Desearch API, such as a staging deploy. The desearch-js tools ignore it.
|
|
13
|
+
*/
|
|
14
|
+
export const DESEARCH_API_BASE_URL = (process.env.DESEARCH_API_BASE?.trim() || "https://api.desearch.ai").replace(/\/+$/, "");
|
|
15
|
+
function isPlainObject(value) {
|
|
16
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
17
|
+
}
|
|
18
|
+
/** The API's `detail` (plus the task status People Search adds on a 409), or the start of the body. */
|
|
19
|
+
export function errorDetail(data, text) {
|
|
20
|
+
if (isPlainObject(data) && data.detail !== undefined) {
|
|
21
|
+
const detail = typeof data.detail === "string" ? data.detail : JSON.stringify(data.detail);
|
|
22
|
+
const task = isPlainObject(data.task) ? data.task : undefined;
|
|
23
|
+
return typeof task?.status === "string" ? `${detail} Task status: ${task.status}.` : detail;
|
|
24
|
+
}
|
|
25
|
+
return text.length > 500 ? `${text.slice(0, 500)}...` : text;
|
|
26
|
+
}
|
|
27
|
+
/** `path?key=value`, leaving out undefined values. */
|
|
28
|
+
export function withQuery(path, params) {
|
|
29
|
+
const search = new URLSearchParams();
|
|
30
|
+
for (const [key, value] of Object.entries(params)) {
|
|
31
|
+
if (value !== undefined) {
|
|
32
|
+
search.append(key, String(value));
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
const qs = search.toString();
|
|
36
|
+
return qs ? `${path}?${qs}` : path;
|
|
37
|
+
}
|
|
38
|
+
export function createDesearchApi(apiKey, baseUrl = DESEARCH_API_BASE_URL) {
|
|
39
|
+
return async (method, path, options = {}) => {
|
|
40
|
+
const headers = { Authorization: apiKey, ...options.headers };
|
|
41
|
+
if (options.body) {
|
|
42
|
+
headers["Content-Type"] = "application/json";
|
|
43
|
+
}
|
|
44
|
+
const url = `${baseUrl}${options.query ? withQuery(path, options.query) : path}`;
|
|
45
|
+
let response;
|
|
46
|
+
let text;
|
|
47
|
+
try {
|
|
48
|
+
response = await fetch(url, {
|
|
49
|
+
method,
|
|
50
|
+
headers,
|
|
51
|
+
body: options.body ? JSON.stringify(options.body) : undefined,
|
|
52
|
+
});
|
|
53
|
+
text = await response.text();
|
|
54
|
+
}
|
|
55
|
+
catch (error) {
|
|
56
|
+
throw new Error(`Unexpected Error: ${error instanceof Error ? error.message : String(error)}`);
|
|
57
|
+
}
|
|
58
|
+
let data = text;
|
|
59
|
+
if (text) {
|
|
60
|
+
try {
|
|
61
|
+
data = JSON.parse(text);
|
|
62
|
+
}
|
|
63
|
+
catch {
|
|
64
|
+
// Not JSON: keep the text.
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
if (!response.ok) {
|
|
68
|
+
throw new Error(`HTTP ${response.status}: ${errorDetail(data, text)}`);
|
|
69
|
+
}
|
|
70
|
+
return { status: response.status, data, text, headers: response.headers };
|
|
71
|
+
};
|
|
72
|
+
}
|
package/build/people.d.ts
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
|
+
import { type DesearchApi, type QueryValue } from "./desearch-api.js";
|
|
1
2
|
/**
|
|
2
3
|
* People Search on the Desearch API (`/desearch/people/*`).
|
|
3
4
|
*
|
|
4
5
|
* desearch-js 1.5 has no People Search methods, so this module calls the routes
|
|
5
|
-
* directly with the same base URL, `Authorization: <key>`
|
|
6
|
-
* `HTTP <status>: <detail>` error text that desearch-js uses.
|
|
6
|
+
* directly through `desearch-api.ts`, with the same base URL, `Authorization: <key>`
|
|
7
|
+
* header, and `HTTP <status>: <detail>` error text that desearch-js uses.
|
|
7
8
|
*
|
|
8
9
|
* - `POST /desearch/people/search/{platform}` starts a background search and is billed:
|
|
9
10
|
* it reserves `count` people at the route price and settles to what it delivers.
|
|
10
|
-
* - Every other route (tasks, results, pause/resume/cancel, profiles) is free.
|
|
11
|
+
* - Every other route (tasks, results, pause/resume/cancel, profiles, exports) is free.
|
|
11
12
|
*/
|
|
12
|
-
export declare const PEOPLE_API_BASE_URL
|
|
13
|
+
export declare const PEOPLE_API_BASE_URL: string;
|
|
13
14
|
export declare const PEOPLE_PLATFORMS: readonly ["x", "youtube", "linkedin", "tiktok"];
|
|
14
15
|
export type PeoplePlatform = (typeof PEOPLE_PLATFORMS)[number];
|
|
15
16
|
export declare const PEOPLE_TASK_STATUSES: readonly ["queued", "running", "pausing", "paused", "cancelling", "completed", "partial", "failed", "cancelled", "expired"];
|
|
@@ -63,7 +64,8 @@ export interface PeopleApiResponse {
|
|
|
63
64
|
status: number;
|
|
64
65
|
data: unknown;
|
|
65
66
|
}
|
|
66
|
-
export
|
|
67
|
+
export declare const PEOPLE_EXPORT_FORMATS: readonly ["csv", "jsonl"];
|
|
68
|
+
export type PeopleExportFormat = (typeof PEOPLE_EXPORT_FORMATS)[number];
|
|
67
69
|
export interface PeopleClient {
|
|
68
70
|
startSearch(platform: PeoplePlatform, body: Record<string, unknown>, idempotencyKey?: string): Promise<PeopleApiResponse>;
|
|
69
71
|
getTask(taskId: string): Promise<unknown>;
|
|
@@ -74,19 +76,14 @@ export interface PeopleClient {
|
|
|
74
76
|
controlTask(taskId: string, action: PeopleControlAction): Promise<unknown>;
|
|
75
77
|
listTasks(params: Record<string, QueryValue>): Promise<unknown>;
|
|
76
78
|
listProfiles(params: Record<string, QueryValue>): Promise<unknown>;
|
|
79
|
+
/** `GET /desearch/people/tasks/{task_id}/export`: the file body as text. */
|
|
80
|
+
exportTask(taskId: string, params: Record<string, QueryValue>): Promise<string>;
|
|
81
|
+
/** `GET /desearch/people/profiles/export`: the file body as text. */
|
|
82
|
+
exportProfiles(params: Record<string, QueryValue>): Promise<string>;
|
|
77
83
|
}
|
|
78
|
-
export declare function withQuery(path: string, params: Record<string, QueryValue>): string;
|
|
79
|
-
export type ApiCall = (method: "GET" | "POST", path: string, options?: {
|
|
80
|
-
body?: Record<string, unknown>;
|
|
81
|
-
headers?: Record<string, string>;
|
|
82
|
-
}) => Promise<PeopleApiResponse>;
|
|
83
|
-
/**
|
|
84
|
-
* One Desearch API request with the desearch-js conventions: `Authorization: <key>`,
|
|
85
|
-
* a JSON body, and `HTTP <status>: <detail>` on an error status. People Search and
|
|
86
|
-
* Company Search (companies.ts) share it.
|
|
87
|
-
*/
|
|
88
|
-
export declare function createApiCall(apiKey: string, baseUrl?: string): ApiCall;
|
|
89
84
|
export declare function createPeopleClient(apiKey: string, baseUrl?: string): PeopleClient;
|
|
85
|
+
/** A People Search client on an existing API caller, so the server shares one per key. */
|
|
86
|
+
export declare function peopleClientFor(call: DesearchApi): PeopleClient;
|
|
90
87
|
/**
|
|
91
88
|
* Request body for `POST /desearch/people/search/{platform}`.
|
|
92
89
|
* Throws when a filter does not apply to the platform, so no billed call is made.
|
|
@@ -162,4 +159,56 @@ export interface PeopleProfilesArgs {
|
|
|
162
159
|
}
|
|
163
160
|
/** `people-profiles`: everyone the caller's searches found on one platform. */
|
|
164
161
|
export declare function listPeopleProfiles(client: PeopleClient, args: PeopleProfilesArgs): Promise<Record<string, unknown>>;
|
|
162
|
+
/** Rows `people-search-export` returns when the caller does not set `max_rows`. */
|
|
163
|
+
export declare const PEOPLE_EXPORT_DEFAULT_ROWS = 100;
|
|
164
|
+
export declare const PEOPLE_EXPORT_MAX_ROWS = 1000;
|
|
165
|
+
/** Most characters of file text one reply carries; whole rows only. */
|
|
166
|
+
export declare const PEOPLE_EXPORT_MAX_CHARS = 50000;
|
|
167
|
+
export interface PeopleExportArgs {
|
|
168
|
+
task_id?: string;
|
|
169
|
+
platform?: PeoplePlatform;
|
|
170
|
+
format?: PeopleExportFormat;
|
|
171
|
+
q?: string;
|
|
172
|
+
sort?: (typeof PEOPLE_PROFILE_SORTS)[number];
|
|
173
|
+
has?: string[];
|
|
174
|
+
min_audience?: number;
|
|
175
|
+
max_audience?: number;
|
|
176
|
+
min_score?: number;
|
|
177
|
+
location?: string;
|
|
178
|
+
verified?: boolean;
|
|
179
|
+
max_rows?: number;
|
|
180
|
+
}
|
|
181
|
+
export interface PeopleExportResult {
|
|
182
|
+
/** One sentence: what was exported, how many rows, and how many were cut. */
|
|
183
|
+
note: string;
|
|
184
|
+
/** The file text up to the last row kept, byte for byte (CSV keeps its header). */
|
|
185
|
+
text: string;
|
|
186
|
+
total_rows: number;
|
|
187
|
+
returned_rows: number;
|
|
188
|
+
cut_rows: number;
|
|
189
|
+
}
|
|
190
|
+
/**
|
|
191
|
+
* End offset (after the line break) of each non-blank record. CSV fields in quotes
|
|
192
|
+
* may hold line breaks, so a CSV line break only ends a record outside quotes; a
|
|
193
|
+
* doubled quote inside a field toggles twice and changes nothing. JSON Lines escape
|
|
194
|
+
* line breaks, so every line is a record.
|
|
195
|
+
*/
|
|
196
|
+
export declare function exportRecordEnds(text: string, format: PeopleExportFormat): number[];
|
|
197
|
+
/**
|
|
198
|
+
* Keep the CSV header and at most `maxRows` whole rows that fit in `maxChars`.
|
|
199
|
+
* The kept text is a prefix of the file, so it parses the same way the file does.
|
|
200
|
+
*/
|
|
201
|
+
export declare function truncateExport(text: string, format: PeopleExportFormat, maxRows: number, maxChars?: number): {
|
|
202
|
+
text: string;
|
|
203
|
+
total_rows: number;
|
|
204
|
+
returned_rows: number;
|
|
205
|
+
cut_rows: number;
|
|
206
|
+
char_limited: boolean;
|
|
207
|
+
};
|
|
208
|
+
/**
|
|
209
|
+
* `people-search-export`: one search's people (`task_id`) or everyone the caller's
|
|
210
|
+
* searches found on a platform (`platform`), as CSV or JSON Lines text cut to
|
|
211
|
+
* `max_rows` rows and PEOPLE_EXPORT_MAX_CHARS characters.
|
|
212
|
+
*/
|
|
213
|
+
export declare function exportPeople(client: PeopleClient, args: PeopleExportArgs): Promise<PeopleExportResult>;
|
|
165
214
|
//# sourceMappingURL=people.d.ts.map
|
package/build/people.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"people.d.ts","sourceRoot":"","sources":["../people.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"people.d.ts","sourceRoot":"","sources":["../people.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4C,KAAK,WAAW,EAAE,KAAK,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAEhH;;;;;;;;;;GAUG;AAEH,eAAO,MAAM,mBAAmB,QAAwB,CAAC;AAEzD,eAAO,MAAM,gBAAgB,iDAAkD,CAAC;AAChF,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,CAAC,CAAC;AAE/D,eAAO,MAAM,oBAAoB,6HAWvB,CAAC;AAEX,yDAAyD;AACzD,eAAO,MAAM,qBAAqB,EAAE,WAAW,CAAC,MAAM,CAMpD,CAAC;AAEH,uFAAuF;AACvF,eAAO,MAAM,sBAAsB,kFAQzB,CAAC;AAEX,eAAO,MAAM,oBAAoB,0CAA2C,CAAC;AAE7E,eAAO,MAAM,sBAAsB,wCAAyC,CAAC;AAE7E;;;;GAIG;AACH,eAAO,MAAM,2BAA2B,wBAAwB,CAAC;AACjE,eAAO,MAAM,wBAAwB,KAAK,CAAC;AAC3C,eAAO,MAAM,2B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