socialcrawl-mcp 1.12.0 → 2.0.1
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/README.md +148 -144
- package/dist/app.d.ts +7 -0
- package/dist/app.js +12 -2
- package/dist/auth.d.ts +8 -0
- package/dist/auth.js +21 -8
- package/dist/client.d.ts +36 -3
- package/dist/client.js +100 -12
- package/dist/constants.d.ts +15 -1
- package/dist/constants.js +15 -1
- package/dist/context.d.ts +6 -0
- package/dist/cost-guard.d.ts +68 -0
- package/dist/cost-guard.js +161 -0
- package/dist/data/docs-handwritten.js +142 -48
- package/dist/data/docs.d.ts +14 -1
- package/dist/data/docs.js +108 -11
- package/dist/data/endpoints.d.ts +1 -1
- package/dist/data/endpoints.js +9258 -489
- package/dist/data/examples.d.ts +3 -0
- package/dist/data/examples.js +4 -0
- package/dist/data/guide.d.ts +3 -0
- package/dist/data/guide.js +4 -0
- package/dist/data/outputs.d.ts +18 -0
- package/dist/data/outputs.js +883 -0
- package/dist/data/platforms.d.ts +1 -1
- package/dist/data/platforms.js +51 -27
- package/dist/data/recipes.d.ts +3 -0
- package/dist/data/recipes.js +3 -0
- package/dist/data/registry-meta.d.ts +17 -10
- package/dist/data/registry-meta.js +17 -10
- package/dist/discovery-routes.d.ts +19 -0
- package/dist/discovery-routes.js +46 -0
- package/dist/endpoint-resolve.d.ts +10 -0
- package/dist/endpoint-resolve.js +34 -0
- package/dist/format/csv.d.ts +27 -0
- package/dist/format/csv.js +92 -0
- package/dist/format/fields.d.ts +34 -0
- package/dist/format/fields.js +121 -0
- package/dist/format/shape.d.ts +39 -0
- package/dist/format/shape.js +274 -0
- package/dist/freshness.d.ts +53 -0
- package/dist/freshness.js +110 -0
- package/dist/instructions.d.ts +1 -0
- package/dist/instructions.js +19 -0
- package/dist/instructions.md +18 -0
- package/dist/jobs.d.ts +34 -0
- package/dist/jobs.js +66 -0
- package/dist/judgments.d.ts +104 -0
- package/dist/judgments.js +310 -0
- package/dist/oauth/api-key-resolver.d.ts +27 -0
- package/dist/oauth/api-key-resolver.js +67 -0
- package/dist/oauth/config.d.ts +19 -0
- package/dist/oauth/config.js +61 -0
- package/dist/oauth/jwt-verifier.d.ts +23 -0
- package/dist/oauth/jwt-verifier.js +69 -0
- package/dist/oauth/resource-server.d.ts +24 -0
- package/dist/oauth/resource-server.js +111 -0
- package/dist/oauth/scopes.d.ts +29 -0
- package/dist/oauth/scopes.js +70 -0
- package/dist/pricing.d.ts +2 -0
- package/dist/pricing.js +30 -0
- package/dist/prompts/index.d.ts +3 -0
- package/dist/prompts/index.js +35 -0
- package/dist/prompts/recipe-prompt.d.ts +6 -0
- package/dist/prompts/recipe-prompt.js +113 -0
- package/dist/resources/index.d.ts +3 -0
- package/dist/resources/index.js +166 -0
- package/dist/resources/recipe-types.d.ts +81 -0
- package/dist/resources/recipe-types.js +2 -0
- package/dist/resources/sample-gate.d.ts +45 -0
- package/dist/resources/sample-gate.js +575 -0
- package/dist/resources/supplier-tokens.d.ts +9 -0
- package/dist/resources/supplier-tokens.js +39 -0
- package/dist/result.d.ts +42 -0
- package/dist/result.js +240 -0
- package/dist/results-store.d.ts +16 -0
- package/dist/results-store.js +66 -0
- package/dist/schemas/normalize.d.ts +27 -0
- package/dist/schemas/normalize.js +189 -0
- package/dist/schemas/outputs.d.ts +886 -0
- package/dist/schemas/outputs.js +176 -0
- package/dist/schemas/tools.d.ts +245 -39
- package/dist/schemas/tools.js +135 -14
- package/dist/search/catalog.d.ts +22 -0
- package/dist/search/catalog.js +158 -0
- package/dist/search/manage-docs.d.ts +24 -0
- package/dist/search/manage-docs.js +31 -0
- package/dist/search/rank.d.ts +339 -0
- package/dist/search/rank.js +800 -0
- package/dist/server.d.ts +11 -1
- package/dist/server.js +200 -147
- package/dist/session-spend.d.ts +7 -0
- package/dist/session-spend.js +33 -0
- package/dist/sse.d.ts +47 -0
- package/dist/sse.js +260 -0
- package/dist/timeouts.d.ts +19 -0
- package/dist/timeouts.js +47 -0
- package/dist/tools/account.d.ts +16 -0
- package/dist/tools/account.js +12 -0
- package/dist/tools/check-balance.d.ts +3 -0
- package/dist/tools/check-balance.js +20 -7
- package/dist/tools/cohorts.d.ts +3 -1
- package/dist/tools/cohorts.js +11 -10
- package/dist/tools/collect.d.ts +24 -0
- package/dist/tools/collect.js +327 -0
- package/dist/tools/discover.d.ts +14 -6
- package/dist/tools/discover.js +180 -44
- package/dist/tools/endpoint.d.ts +47 -0
- package/dist/tools/endpoint.js +413 -0
- package/dist/tools/estimate.d.ts +32 -0
- package/dist/tools/estimate.js +235 -0
- package/dist/tools/find.d.ts +35 -0
- package/dist/tools/find.js +649 -0
- package/dist/tools/get-docs.d.ts +1 -1
- package/dist/tools/get-docs.js +2 -2
- package/dist/tools/legacy.d.ts +20 -0
- package/dist/tools/legacy.js +190 -0
- package/dist/tools/list-endpoints.d.ts +2 -0
- package/dist/tools/list-endpoints.js +44 -19
- package/dist/tools/list-platforms.js +2 -2
- package/dist/tools/manage.d.ts +30 -0
- package/dist/tools/manage.js +196 -0
- package/dist/tools/monitors.d.ts +8 -1
- package/dist/tools/monitors.js +18 -13
- package/dist/tools/pricing.d.ts +12 -1
- package/dist/tools/pricing.js +205 -6
- package/dist/tools/request.d.ts +41 -2
- package/dist/tools/request.js +404 -45
- package/dist/tools/web.d.ts +5 -3
- package/dist/tools/web.js +14 -6
- package/dist/types.d.ts +162 -0
- package/dist/walk-quote.d.ts +26 -0
- package/dist/walk-quote.js +75 -0
- package/package.json +8 -5
- package/dist/__tests__/auth.test.d.ts +0 -1
- package/dist/__tests__/auth.test.js +0 -41
- package/dist/__tests__/auth.test.js.map +0 -1
- package/dist/__tests__/check-balance.test.d.ts +0 -1
- package/dist/__tests__/check-balance.test.js +0 -120
- package/dist/__tests__/check-balance.test.js.map +0 -1
- package/dist/__tests__/client.test.d.ts +0 -1
- package/dist/__tests__/client.test.js +0 -330
- package/dist/__tests__/client.test.js.map +0 -1
- package/dist/__tests__/cohorts.test.d.ts +0 -1
- package/dist/__tests__/cohorts.test.js +0 -325
- package/dist/__tests__/cohorts.test.js.map +0 -1
- package/dist/__tests__/context.test.d.ts +0 -1
- package/dist/__tests__/context.test.js +0 -27
- package/dist/__tests__/context.test.js.map +0 -1
- package/dist/__tests__/coverage.test.d.ts +0 -1
- package/dist/__tests__/coverage.test.js +0 -133
- package/dist/__tests__/coverage.test.js.map +0 -1
- package/dist/__tests__/data-integrity.test.d.ts +0 -1
- package/dist/__tests__/data-integrity.test.js +0 -498
- package/dist/__tests__/data-integrity.test.js.map +0 -1
- package/dist/__tests__/discover.test.d.ts +0 -1
- package/dist/__tests__/discover.test.js +0 -311
- package/dist/__tests__/discover.test.js.map +0 -1
- package/dist/__tests__/http.test.d.ts +0 -1
- package/dist/__tests__/http.test.js +0 -221
- package/dist/__tests__/http.test.js.map +0 -1
- package/dist/__tests__/hydration.test.d.ts +0 -1
- package/dist/__tests__/hydration.test.js +0 -251
- package/dist/__tests__/hydration.test.js.map +0 -1
- package/dist/__tests__/monitors.test.d.ts +0 -1
- package/dist/__tests__/monitors.test.js +0 -133
- package/dist/__tests__/monitors.test.js.map +0 -1
- package/dist/__tests__/paginate.test.d.ts +0 -1
- package/dist/__tests__/paginate.test.js +0 -80
- package/dist/__tests__/paginate.test.js.map +0 -1
- package/dist/__tests__/preflight.test.d.ts +0 -1
- package/dist/__tests__/preflight.test.js +0 -69
- package/dist/__tests__/preflight.test.js.map +0 -1
- package/dist/__tests__/pricing.test.d.ts +0 -1
- package/dist/__tests__/pricing.test.js +0 -143
- package/dist/__tests__/pricing.test.js.map +0 -1
- package/dist/__tests__/server.test.d.ts +0 -1
- package/dist/__tests__/server.test.js +0 -64
- package/dist/__tests__/server.test.js.map +0 -1
- package/dist/__tests__/truncation.test.d.ts +0 -1
- package/dist/__tests__/truncation.test.js +0 -32
- package/dist/__tests__/truncation.test.js.map +0 -1
- package/dist/__tests__/validation.test.d.ts +0 -1
- package/dist/__tests__/validation.test.js +0 -198
- package/dist/__tests__/validation.test.js.map +0 -1
- package/dist/__tests__/web.test.d.ts +0 -1
- package/dist/__tests__/web.test.js +0 -198
- package/dist/__tests__/web.test.js.map +0 -1
- package/dist/app.js.map +0 -1
- package/dist/auth.js.map +0 -1
- package/dist/client.js.map +0 -1
- package/dist/constants.js.map +0 -1
- package/dist/context.js.map +0 -1
- package/dist/data/docs-handwritten.js.map +0 -1
- package/dist/data/docs.js.map +0 -1
- package/dist/data/endpoints.js.map +0 -1
- package/dist/data/platforms.js.map +0 -1
- package/dist/data/registry-meta.js.map +0 -1
- package/dist/http.js.map +0 -1
- package/dist/hydration.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/paginate.js.map +0 -1
- package/dist/pricing.js.map +0 -1
- package/dist/schemas/tools.js.map +0 -1
- package/dist/server.js.map +0 -1
- package/dist/tools/check-balance.js.map +0 -1
- package/dist/tools/cohorts.js.map +0 -1
- package/dist/tools/discover.js.map +0 -1
- package/dist/tools/get-docs.js.map +0 -1
- package/dist/tools/list-endpoints.js.map +0 -1
- package/dist/tools/list-platforms.js.map +0 -1
- package/dist/tools/monitors.js.map +0 -1
- package/dist/tools/pricing.js.map +0 -1
- package/dist/tools/request.js.map +0 -1
- package/dist/tools/web.js.map +0 -1
- package/dist/types.js.map +0 -1
package/README.md
CHANGED
|
@@ -2,12 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
# socialcrawl-mcp
|
|
4
4
|
|
|
5
|
-
**Give your AI agent access to
|
|
5
|
+
**Give your AI agent access to every SocialCrawl platform and endpoint — social media, commerce, marketplaces & product reviews, retail, app stores, places, travel & local, business & software reputation, jobs & salaries, markets & finance, congressional trading disclosures, news, web research, full web scraping & browser automation, on-page SEO, prediction markets, search trends, cross-platform Prism composites, and a universal meta-search — through a single API, with exact credit pricing for every endpoint**
|
|
6
6
|
|
|
7
7
|
[](https://www.npmjs.com/package/socialcrawl-mcp)
|
|
8
8
|
[](https://registry.modelcontextprotocol.io)
|
|
9
|
-
[](https://socialcrawl.dev)
|
|
10
|
-
[](https://socialcrawl.dev/docs)
|
|
11
9
|
[](LICENSE)
|
|
12
10
|
[](https://glama.ai/mcp/servers/socialcrawl/mcp)
|
|
13
11
|
|
|
@@ -15,35 +13,12 @@
|
|
|
15
13
|
<img width="380" src="https://glama.ai/mcp/servers/socialcrawl/mcp/badges/card.svg" alt="Socialcrawl MCP server" />
|
|
16
14
|
</a>
|
|
17
15
|
|
|
18
|
-
[
|
|
16
|
+
[Installation](#installation) | [Overview](#overview) | [Setup](#setup) | [Usage](#usage) | [Tools](#available-tools) | [Platforms](#supported-platforms)
|
|
19
17
|
|
|
20
18
|
</div>
|
|
21
19
|
|
|
22
20
|
---
|
|
23
21
|
|
|
24
|
-
## Overview
|
|
25
|
-
|
|
26
|
-
`socialcrawl-mcp` is an [MCP (Model Context Protocol)](https://modelcontextprotocol.io) server that connects AI agents to the [SocialCrawl API](https://socialcrawl.dev) — a unified data API covering 65 platforms and 575 endpoints.
|
|
27
|
-
|
|
28
|
-
Retrieve profiles, posts, comments, search results, trending content, and analytics from TikTok, Instagram, YouTube, Twitter/X, LinkedIn, Reddit, Threads, Douyin, Telegram, Quora, Apple Music, GitHub, Hacker News, Polymarket, and 30 more platforms. Pull products, offers, price history, reviews, and sellers from Amazon, Walmart, Target, Home Depot, eBay, Klarna, AliExpress, Etsy, Sephora, H&M, Kohl's, Wayfair, Gumtree, and Google Shopping; apps, charts, and reviews from Google Play and the Apple App Store; hotels, restaurants, attractions, cruises, and traveler reviews from Tripadvisor, plus local business data from Yelp and Google Business; brand reputation from Trustpilot and software reviews from G2; job listings and salary bands from LinkedIn, Indeed, Bing, and Xing; market quotes, price history, financial statements, and options chains; US congressional trading disclosures; Korean search and Data Lab trend series from Naver; cross-web brand mentions with sentiment via Content Analysis; Google News headlines and Google Trends interest curves — plus web research via Tavily and Perplexity, AI-powered X search via Grok, on-page SEO audits, and a single `/search/everywhere` endpoint that fans out across 14 sources in one call.
|
|
29
|
-
|
|
30
|
-
New in this release (v1.12.0): a registry re-sync that adds **three endpoints and two new price levers**.
|
|
31
|
-
|
|
32
|
-
- **TikTok's own leaderboards.** `tiktok/hashtags/popular` reads the trending-hashtag board for a market and time window — the overall board plus 15 industry boards, 2cr per hashtag returned (one board is 6cr; `industry=all` holds 96 and settles around 88-92). `tiktok/videos/popular` reads the Top Videos board for the US, Japan, Vietnam, Thailand or Indonesia at 25cr per board plus 1cr per video. Both are ranked leaderboards with no second page.
|
|
33
|
-
- **`google_trends/trending`** — Trending Now by location, with hour window, category, status and sort filters (5cr).
|
|
34
|
-
- **`coverage=full` on `instagram/followers` and `instagram/following`.** A merged walk that never repeats an account across pages until the rows reach the profile's own total. It doubles the page price to 10cr, which moved both endpoints from a flat ladder rate to a **5-10cr metered band** — and a full list is genuinely expensive (a 2,652-account following list took 54 pages, 540 credits, measured 13/09). `socialcrawl_pricing` quotes the band and names `coverage` as the lever.
|
|
35
|
-
- **`feed=global|local` on `tiktok/trending`** — the worldwide web feed, or the For You feed as a phone in `region` would see it (more in-country content, slower, more videos).
|
|
36
|
-
- `instagram/location/posts` now pages properly with a cursor instead of being a single 60-post grid.
|
|
37
|
-
|
|
38
|
-
Prices, params, response shapes and paging descriptors are re-synced across 24 further endpoints. Row hydration (the opt-in `include=` joins added in v1.11.0) is unchanged at 33 joins across 28 endpoints.
|
|
39
|
-
|
|
40
|
-
**What the MCP server does:**
|
|
41
|
-
- Discovers platforms and endpoints dynamically, or by free-text search across all 575 of them
|
|
42
|
-
- Fetches live data on your behalf across every platform, method, and composite
|
|
43
|
-
- Prices every call up front — ladder, flat, or metered band — so an agent can budget before it spends
|
|
44
|
-
- Validates requests locally before calling the API: required params, `oneOf` groups, enum values, integer ranges, parameter couplings, and CSV limits. A bad call fails free instead of burning credits
|
|
45
|
-
- Provides built-in API documentation the agent can query on demand, paged rather than truncated
|
|
46
|
-
|
|
47
22
|
## Installation
|
|
48
23
|
|
|
49
24
|
### Remote server (hosted — no install)
|
|
@@ -73,7 +48,7 @@ claude mcp add --scope user --transport http socialcrawl https://mcp.socialcrawl
|
|
|
73
48
|
|
|
74
49
|
**Cursor / Windsurf / VS Code** — choose the HTTP ("streamable-http") server type with the same URL and header. `x-api-key: sc_your_key_here` works as an alternative header.
|
|
75
50
|
|
|
76
|
-
The discovery tools (`
|
|
51
|
+
The discovery tools (`socialcrawl_find`, `socialcrawl_endpoint`, `socialcrawl_estimate`) work without a key, so you can explore before signing up. claude.ai custom connectors (Settings → Connectors) require OAuth. An OAuth 2.1 resource-server mode is in preview and off by default (`SOCIALCRAWL_OAUTH=1`; see `docs/REMOTE-STREAMABLE-HTTP.md`); until it is enabled on the hosted server, use the header-based setup above.
|
|
77
52
|
|
|
78
53
|
Prefer running it locally? Every stdio option below works exactly as before.
|
|
79
54
|
|
|
@@ -88,13 +63,7 @@ Available on [npm](https://www.npmjs.com/package/socialcrawl-mcp). Most users do
|
|
|
88
63
|
### Claude Code (quickest)
|
|
89
64
|
|
|
90
65
|
```bash
|
|
91
|
-
claude mcp add --scope user socialcrawl -- npx -y socialcrawl-mcp
|
|
92
|
-
```
|
|
93
|
-
|
|
94
|
-
Then set your API key:
|
|
95
|
-
|
|
96
|
-
```bash
|
|
97
|
-
claude mcp add-env socialcrawl SOCIALCRAWL_API_KEY sc_your_key_here
|
|
66
|
+
claude mcp add --scope user socialcrawl -e SOCIALCRAWL_API_KEY=sc_your_key_here -- npx -y socialcrawl-mcp
|
|
98
67
|
```
|
|
99
68
|
|
|
100
69
|
### Claude Desktop
|
|
@@ -180,6 +149,21 @@ Any MCP client that supports stdio transport can use this server. The general pa
|
|
|
180
149
|
|
|
181
150
|
Restart your AI client after saving the configuration.
|
|
182
151
|
|
|
152
|
+
## Overview
|
|
153
|
+
|
|
154
|
+
`socialcrawl-mcp` is an [MCP (Model Context Protocol)](https://modelcontextprotocol.io) server that connects AI agents to the [SocialCrawl API](https://socialcrawl.dev) — a unified data API over social, commerce, jobs, finance, research and web data. `socialcrawl_find` with no task lists every platform; `socialcrawl_account` view `freshness` shows the live counts.
|
|
155
|
+
|
|
156
|
+
Retrieve profiles, posts, comments, search results, trending content, and analytics from TikTok, Instagram, YouTube, Twitter/X, LinkedIn, Reddit, Threads, Douyin, Xiaohongshu, Telegram, Quora, Bluesky, Apple Music, GitHub, Hacker News, Product Hunt, Polymarket, and many more platforms. Pull products, offers, price history, reviews, and sellers from Amazon, Walmart, Target, Home Depot, eBay, Klarna, AliExpress, Etsy, Sephora, H&M, Kohl's, Wayfair, Gumtree, and Google Shopping; apps, charts, and reviews from Google Play and the Apple App Store; hotels, restaurants, attractions, cruises, and traveler reviews from Tripadvisor, plus local business data from Yelp and Google Business; brand reputation from Trustpilot and software reviews from G2; job listings and salary bands from LinkedIn, Indeed, Bing, and Xing; market quotes, price history, financial statements, and options chains; US congressional trading disclosures; Korean search and Data Lab trend series from Naver; cross-web brand mentions with sentiment via Content Analysis; Google News headlines and Google Trends interest curves — plus web research via Tavily and Perplexity, AI-powered X search via Grok, on-page SEO audits, and a single `/search/everywhere` endpoint that fans out across 14 sources in one call.
|
|
157
|
+
|
|
158
|
+
New in v2.0.0: **seven tools instead of eleven** (`socialcrawl_find`, `socialcrawl_endpoint`, `socialcrawl_estimate`, `socialcrawl_request`, `socialcrawl_collect`, `socialcrawl_account`, `socialcrawl_manage`). See [Available Tools](#available-tools) for the 1.x → 2.0 mapping and [CHANGELOG.md](CHANGELOG.md) for every release.
|
|
159
|
+
|
|
160
|
+
**What the MCP server does:**
|
|
161
|
+
- Finds the right endpoint for a task in plain words (ranked search across every endpoint, with URLs and handles resolved), and tells the agent what data each one returns
|
|
162
|
+
- Fetches live data on your behalf across every platform, method, and composite
|
|
163
|
+
- Prices every call up front — ladder, flat, or metered band — so an agent can budget before it spends
|
|
164
|
+
- Validates requests locally before calling the API: required params, `oneOf` groups, enum values, integer ranges, parameter couplings, and CSV limits. A bad call fails free instead of burning credits
|
|
165
|
+
- Provides built-in API documentation the agent can query on demand, paged rather than truncated
|
|
166
|
+
|
|
183
167
|
## Setup
|
|
184
168
|
|
|
185
169
|
### 1. Get your API key
|
|
@@ -245,7 +229,7 @@ Show me all the TikTok endpoints
|
|
|
245
229
|
Which endpoints can give me video transcripts?
|
|
246
230
|
```
|
|
247
231
|
|
|
248
|
-
|
|
232
|
+
Each is a `socialcrawl_find` call: the task in plain words, ranked across every endpoint, no platform needed.
|
|
249
233
|
|
|
250
234
|
### Learn the API from the API
|
|
251
235
|
|
|
@@ -261,7 +245,7 @@ Show me exactly how to call the Prism comments endpoint
|
|
|
261
245
|
Is this MCP server's endpoint list up to date?
|
|
262
246
|
```
|
|
263
247
|
|
|
264
|
-
|
|
248
|
+
These hit `socialcrawl_endpoint` and `socialcrawl_account` and cost nothing.
|
|
265
249
|
|
|
266
250
|
### Check what something costs before running it
|
|
267
251
|
|
|
@@ -277,7 +261,7 @@ Show me everything I can call for 1 credit
|
|
|
277
261
|
Why did that last call charge me 7 credits instead of 2?
|
|
278
262
|
```
|
|
279
263
|
|
|
280
|
-
The first two hit `
|
|
264
|
+
The first two hit `socialcrawl_estimate`; the third reads the credit ledger via `socialcrawl_account` with `view: "transactions"` and shows the deduction and refund rows for that `request_id`.
|
|
281
265
|
|
|
282
266
|
### Access documentation
|
|
283
267
|
|
|
@@ -314,52 +298,50 @@ Every response follows a unified envelope format:
|
|
|
314
298
|
|
|
315
299
|
## Available Tools
|
|
316
300
|
|
|
317
|
-
|
|
301
|
+
Version 2.0.0 exposes 7 tools (about 4.7k tokens of `tools/list`, down from about 12.8k for the 11 tools of 1.x):
|
|
318
302
|
|
|
319
|
-
| Tool |
|
|
320
|
-
|
|
321
|
-
| `
|
|
322
|
-
| `
|
|
323
|
-
| `
|
|
324
|
-
| `socialcrawl_request` |
|
|
325
|
-
| `
|
|
326
|
-
| `
|
|
327
|
-
| `
|
|
328
|
-
| `socialcrawl_cohorts` | Audience-filtered mention search (`/v1/cohorts/*`) — upload up to 10,000 public identities you already care about, then ask which of *them* posted your keywords. Actions: create, add_members, estimate_cost (local, free), query, query_status, query_results, query_cancel, get, delete. Everything but the query is 0 credits | Yes |
|
|
329
|
-
| `socialcrawl_discover` | The API describing itself, live, at 0 credits (`/v1/utility/*`) — quickstart, the full endpoint catalogue with live metered-aware prices, one endpoint's complete usage guide, the agent context corpus, a freshness check that tells you whether this server's bundled catalogue has fallen behind the API, and every platform's live circuit-breaker `status` | Optional |
|
|
330
|
-
| `socialcrawl_get_docs` | API documentation by topic or platform — overview, authentication, credits, pricing, errors, idempotency, pagination, caching, response-schema, limits, monitors, cohorts, discovery, or any platform slug. Long topics are paged, never truncated | No |
|
|
303
|
+
| Tool | What it does | Needs API key? |
|
|
304
|
+
|------|--------------|----------------|
|
|
305
|
+
| `socialcrawl_find` | **Start here.** A task in plain words becomes the best endpoints (3 by default), each with the params the task already supplies (URLs and `@handles` are resolved), the params still missing, the credit cost and the exact call to make. `platform` narrows it. With no task it lists the platforms, or one platform's endpoints. Ranked by the live `/v1/utility/find` when deployed, otherwise by the bundled ranker (BM25 over id, summary, returns, use_when and tags, with a platform boost) | No |
|
|
306
|
+
| `socialcrawl_endpoint` | The contract for one endpoint (`id: "tiktok/post/comments"`): purpose, required and optional params, where the rows are (`rows_at`) and up to 25 response fields, cost and pricing rule, paging, measured latency and timeout, next endpoints, and a sample-response link. A platform slug returns its endpoint table; a topic (`errors`, `pricing`, `pagination`, `judgments`, `hydration`, `overview`, ...) returns that guide. Live through `/v1/utility/endpoint` when a key is set | No |
|
|
307
|
+
| `socialcrawl_estimate` | Exact cost before you spend: one call (`id` + the `params` you will send, `calls` for a job total, `items` for a walk) or a `plan` of calls. Uses `/v1/utility/estimate` when deployed, otherwise the bundled pricing. A platform slug returns its price table; no id returns the pricing overview | No |
|
|
308
|
+
| `socialcrawl_request` | Call one endpoint: `platform`, `resource`, `params` (or `body` for POST batch endpoints). Validates locally first, quotes, refuses above `max_credits`, confirms above `SOCIALCRAWL_CONFIRM_ABOVE`, and returns `structuredContent` (rows, credits, paging). `fields` / `max_items` / `format` shape the result; large pages are cut at row boundaries behind a `socialcrawl://results/<request_id>` link. An unknown platform or resource gets a did-you-mean | Yes |
|
|
309
|
+
| `socialcrawl_collect` | Walk a paged endpoint until `items` unique rows, the last page, or `max_credits`, in one call, with a resource link to every row as JSONL, JSON or CSV | Yes |
|
|
310
|
+
| `socialcrawl_account` | Free checks: `balance` (with this session's spend), `transactions` (the itemised ledger, or the receipts for one `request_id`), `status` (platform health) and `freshness` (is this server's catalogue behind the API) | Yes (except `status`) |
|
|
311
|
+
| `socialcrawl_manage` | Stateful work by `area` + `action`: `monitors` (scheduled recipes), `cohorts` (mention search over your own panel), `web` (scrape, search, map, extract, crawl/batch/agent jobs, change monitors, browser sessions) and `jobs` (Prism background jobs: submit, list, get). The action's fields go in `input`, the resource id in `id`; a wrong field is refused free with the rules | Yes |
|
|
331
312
|
|
|
332
|
-
|
|
313
|
+
**Upgrading from 1.x.** Set `SOCIALCRAWL_LEGACY_TOOLS=1` to also register the nine retired 1.x names as thin wrappers for this major version. The mapping:
|
|
333
314
|
|
|
334
|
-
|
|
315
|
+
| 1.x tool | 2.0 tool |
|
|
316
|
+
|----------|----------|
|
|
317
|
+
| `socialcrawl_list_platforms` | `socialcrawl_find` with no arguments |
|
|
318
|
+
| `socialcrawl_list_endpoints` | `socialcrawl_find` (`task` or `platform`); `socialcrawl_endpoint` for one contract |
|
|
319
|
+
| `socialcrawl_pricing` | `socialcrawl_estimate` |
|
|
320
|
+
| `socialcrawl_discover` | `socialcrawl_endpoint` (endpoint guide), `socialcrawl_find` (catalog, plan), `socialcrawl_account` (freshness, status) |
|
|
321
|
+
| `socialcrawl_get_docs` | `socialcrawl_endpoint` with the topic as `id` |
|
|
322
|
+
| `socialcrawl_check_balance` | `socialcrawl_account` (`requestId` is now `request_id`) |
|
|
323
|
+
| `socialcrawl_monitors` / `socialcrawl_web` / `socialcrawl_cohorts` | `socialcrawl_manage` with `area: "monitors"` / `"web"` / `"cohorts"` |
|
|
324
|
+
| `socialcrawl_request`, `socialcrawl_collect` | unchanged (`platform` is now a plain string with did-you-mean) |
|
|
335
325
|
|
|
336
|
-
|
|
326
|
+
### Discovery, live and bundled
|
|
337
327
|
|
|
338
|
-
|
|
339
|
-
|--------|----------|--------------|
|
|
340
|
-
| `quickstart` | `/v1/utility/quickstart` | Auth, base URL, a runnable first call, the success and error envelopes, the billing model, the **full error taxonomy**, rate limits, and the paging contract — in one response |
|
|
341
|
-
| `catalog` | `/v1/utility/endpoints` | Every endpoint with its live metered-aware price label, required and optional params, `oneOf` groups, and paging flag. Filter by `platform` / `search` / `method` |
|
|
342
|
-
| `endpoint` | `/v1/utility/endpoint` | One endpoint's complete usage guide — every parameter with type and example, the exact pricing rule, cache TTL, paging recipe, an example response, a copy-paste curl, and related endpoints |
|
|
343
|
-
| `llms` | `/v1/utility/llms` | The agent context corpus for the whole API or one platform, as markdown or JSON — bootstrap an agent in one call instead of crawling docs |
|
|
344
|
-
| `freshness` | — | Compare the live registry against this server's bundled catalogue |
|
|
328
|
+
`socialcrawl_find`, `socialcrawl_endpoint` and `socialcrawl_estimate` answer from data bundled with the server (generated from the backend registry, dump schema v4) and need no key. With a key they first ask the API's free `/v1/utility/*` routes (`find`, `resolve`, `endpoint`, `estimate`), which answer from the live registry, and fall back to the bundled answer when a route is not deployed. Every one of these is 0 credits.
|
|
345
329
|
|
|
346
|
-
**Why
|
|
330
|
+
**Why freshness matters.** This server ships a catalogue generated when it was built; the API keeps moving. Data calls always hit the live API and keep working, but discovery, pricing and local validation answer from that snapshot. The server checks this itself once per process and, when it is behind, adds one line to the next tool result. One free call tells you which situation you are in:
|
|
347
331
|
|
|
348
332
|
```
|
|
349
|
-
|
|
333
|
+
socialcrawl_account view: "freshness"
|
|
350
334
|
```
|
|
351
335
|
|
|
352
|
-
**Bundled vs live.** `list_platforms`, `list_endpoints`, `pricing`, and `get_docs` answer instantly from bundled data and need no key — prefer them for browsing. Reach for `socialcrawl_discover` when correctness matters more than latency: an endpoint looks missing, you need a metered endpoint's exact live price, or you are generating code that must match production today. Without a key it still answers everything except `llms` from bundled data, so discovery never hard-requires auth.
|
|
353
|
-
|
|
354
336
|
These same endpoints are plain HTTP, so a third-party integration or a non-MCP agent framework gets the identical information with a `curl`.
|
|
355
337
|
|
|
356
338
|
### Pricing — know the cost before you spend
|
|
357
339
|
|
|
358
|
-
`
|
|
340
|
+
`socialcrawl_estimate` exists because a single number is a lie for most of the surface. SocialCrawl bills three ways:
|
|
359
341
|
|
|
360
|
-
- **Ladder**
|
|
361
|
-
- **Flat** (
|
|
362
|
-
- **Metered**
|
|
342
|
+
- **Ladder** — the tier rate per request: standard 1cr, advanced 5cr, premium 10cr.
|
|
343
|
+
- **Flat** (some of them free) — a per-endpoint override, e.g. `/v1/search/everywhere` at 20cr flat.
|
|
344
|
+
- **Metered** — the charge depends on the request. An upfront ceiling is deducted and refunded down to the work actually done.
|
|
363
345
|
|
|
364
346
|
Quoting a metered endpoint's base cost understates every call: `/v1/search/news` has a 1cr base but really charges **2–62cr** — one credit per Google country leg that returns articles, plus per-article billing when the bing engine is added. The tool returns the real band, the registry's own charging rule, the parameters that move the bill, and the worst case to budget for:
|
|
365
347
|
|
|
@@ -369,6 +351,7 @@ action: "endpoint" → one endpoint's price, rule, price-driving params, pagin
|
|
|
369
351
|
action: "platform" → a whole platform's cost table
|
|
370
352
|
action: "list" → rank/filter by cost — "everything I can call for 1 credit", "the 10 most expensive endpoints"
|
|
371
353
|
action: "hydration" → every include= row join: what it fills, per-row rate, row cap, fully-joined ceiling
|
|
354
|
+
action: "judgments" → every judged list: free default labels/relevance, metered presets, the hold per opt-in
|
|
372
355
|
```
|
|
373
356
|
|
|
374
357
|
Pass the `include` you intend to send to `action: "endpoint"` and the band becomes arithmetic — the exact hold, itemised per join, using the same formula the backend's pricer runs:
|
|
@@ -378,11 +361,30 @@ action: "endpoint", platform: "linkedin", resource: "search/people", include: "p
|
|
|
378
361
|
→ holds 22 credits (10cr page + 12cr for 3 rows of `profile`), settling anywhere down to 10
|
|
379
362
|
```
|
|
380
363
|
|
|
381
|
-
|
|
364
|
+
Or pass the exact `params` you will send (and `calls`, for a whole job). Joins, metered judgments and `max_pages` are all itemised, and `max_pages` multiplies the page, because each page walked is billed as one call:
|
|
365
|
+
|
|
366
|
+
```
|
|
367
|
+
action: "endpoint", platform: "youtube", resource: "search", calls: 10,
|
|
368
|
+
params: { query: "espresso", include: "engagement,channel", label: "mention", brand: "Acme", max_pages: "3" }
|
|
369
|
+
→ 1cr page + 5cr engagement + 5cr channel + 4cr label=mention = up to 15cr per page
|
|
370
|
+
× 3 pages = up to 45cr per call; 10 calls = up to 450 credits held, settling to what was filled and judged
|
|
371
|
+
```
|
|
372
|
+
|
|
373
|
+
It also states the rules that make the real charge differ from the sticker price. Cache hits, idempotent replays, empty results, upstream failures and `dry_run=1` previews are all 0 credits; `seen=<id>` discounts each page by its share of rows you already received; `since` / `stop_at_id` end a walk at rows you already hold.
|
|
374
|
+
|
|
375
|
+
### Judgments — labels and relevance, free by default
|
|
376
|
+
|
|
377
|
+
About 50 list endpoints judge their rows for you at no extra credit. Posts carry `sponsored`, `intent` and `niche`; comments carry `sentiment`, `question`, `purchase_intent` and `complaint`; reviews carry `sentiment` and `issue`. All of these land under `computed.labels`, and the judged searches score each row's relevance to your query under `computed.relevance`. Only these add credits:
|
|
378
|
+
|
|
379
|
+
- a metered preset: `mention` (with `brand=`), `quality`, `injection` on posts; `spam`, `toxic`, `low_quality` on comments; `reports`, `incentivized` on reviews,
|
|
380
|
+
- `label=intent` with `offer=` (what you sell),
|
|
381
|
+
- `relevance=score|filter` with your own topic in `relevant_to=`.
|
|
382
|
+
|
|
383
|
+
Each holds 1 credit per started 25 rows of the page (4cr on a 100-row page) and settles to the rows judged fresh. Already-judged rows and cached pages are free. `judgments=off` turns the defaults off, and `dry_run=1` previews the cost for 0 credits. `socialcrawl_endpoint` with `id: "judgments"` is the full contract.
|
|
382
384
|
|
|
383
385
|
### Row hydration — one call instead of a page plus a lookup per row
|
|
384
386
|
|
|
385
|
-
Some lists are thin because the upstream publishes nothing else on them: a Pinterest search result has no save count, a LinkedIn reactor row no follower count, a YouTube playlist no view counts or durations. Another SocialCrawl endpoint answers each of those for one row — so
|
|
387
|
+
Some lists are thin because the upstream publishes nothing else on them: a Pinterest search result has no save count, a LinkedIn reactor row no follower count, a YouTube playlist no view counts or durations. Another SocialCrawl endpoint answers each of those for one row — so those endpoints accept an `include=` token that joins every row to that sibling in the same call.
|
|
386
388
|
|
|
387
389
|
```
|
|
388
390
|
GET /v1/pinterest/search?query=kitchen&include=engagement → saves, likes, comments, shares on every row
|
|
@@ -395,22 +397,22 @@ GET /v1/linkedin/search/people?keywords=cto&include=profile&limit=3
|
|
|
395
397
|
- **A row cap caps the bill.** `limit=3&include=profile` on LinkedIn holds 22 credits, not 50.
|
|
396
398
|
- **It tells you what it did.** `data.hydration` reports rows, lookups, cache hits, credits held vs kept, and milliseconds; `_warnings` carries `<token>_partial` when only some rows filled.
|
|
397
399
|
|
|
398
|
-
`
|
|
400
|
+
`socialcrawl_endpoint` with `id: "hydration"` lists every join, its price and the full contract; `socialcrawl_estimate` quotes one call with its `include`.
|
|
399
401
|
|
|
400
402
|
### Monitors — schedule any recipe
|
|
401
403
|
|
|
402
|
-
`
|
|
404
|
+
`socialcrawl_manage` with `area: "monitors"` wraps any registry endpoint or Prism composite in a scheduled, stateful monitor (`/v1/monitors/*`). It re-runs the recipe hourly/daily/weekly (or on a cron), delivers each result to an HMAC-signed webhook, raises alerts on metric thresholds or changes, and keeps a per-run time-series you can read back. *"Prism answers once; monitors watch it for you."* Managing monitors costs 0 credits; each scheduled run bills the recipe's normal cost plus a 1-credit scheduling premium. See `socialcrawl_endpoint` with `id: "monitors"` for the full contract.
|
|
403
405
|
|
|
404
406
|
### Web — scrape, crawl, browse
|
|
405
407
|
|
|
406
|
-
`
|
|
408
|
+
`socialcrawl_manage` with `area: "web"` drives the full web-scraping and browser-automation surface (the `web` platform, `/v1/web/*`) through a single `action` parameter:
|
|
407
409
|
|
|
408
410
|
- **Sync reads** — `scrape` (URL → markdown/HTML/screenshot/links), `search` (web search with page content), `map` (discover a site's URLs), `extract` (LLM structured data from a page).
|
|
409
411
|
- **Async jobs** — `crawl` a whole site, `batch_scrape` many URLs, or `agent` (autonomous multi-step web task); each returns a job you poll with `job_get`/`job_list`, inspect with `job_errors` (per-page failures), and stop with `job_cancel`. `crawl_preview` dry-runs a crawl's parameters for free before you pay for it.
|
|
410
412
|
- **Monitors** — `monitor_create`/`list`/`get`/`update`/`delete`/`checks` re-check a URL on a cadence and deliver changes to a webhook.
|
|
411
413
|
- **Sessions** — `session_create`/`get`/`list`, `session_execute` (run code in the live page), `session_close`.
|
|
412
414
|
|
|
413
|
-
Most of the paid web surface is metered rather than flat: a crawl holds `limit` credits and refunds every page it did not crawl; a session holds against `ttl_seconds` and settles on close. Job, monitor, and session management is 0 credits. See `
|
|
415
|
+
Most of the paid web surface is metered rather than flat: a crawl holds `limit` credits and refunds every page it did not crawl; a session holds against `ttl_seconds` and settles on close. Job, monitor, and session management is 0 credits. See `socialcrawl_endpoint` with `id: "web"`, or `socialcrawl_estimate` with `id: "web"`.
|
|
414
416
|
|
|
415
417
|
### Smart validation
|
|
416
418
|
|
|
@@ -422,75 +424,77 @@ Pass an `idempotencyKey` to `socialcrawl_request` (UUIDv4 recommended) to make t
|
|
|
422
424
|
|
|
423
425
|
## Supported Platforms
|
|
424
426
|
|
|
425
|
-
| Platform |
|
|
426
|
-
|
|
427
|
-
| **LinkedIn** |
|
|
428
|
-
| **
|
|
429
|
-
| **
|
|
430
|
-
| **
|
|
431
|
-
| **
|
|
432
|
-
| **
|
|
433
|
-
| **Web Scraping** |
|
|
434
|
-
| **US Congress Trades** |
|
|
435
|
-
| **Klarna** |
|
|
436
|
-
| **Tripadvisor** |
|
|
437
|
-
| **Twitter/X** |
|
|
438
|
-
| **Naver** |
|
|
439
|
-
| **Reddit** |
|
|
440
|
-
| **GitHub** |
|
|
441
|
-
| **Gumtree** |
|
|
442
|
-
| **Jobs** |
|
|
443
|
-
| **Sephora** |
|
|
444
|
-
| **Content Analysis** |
|
|
445
|
-
| **Google** |
|
|
446
|
-
| **AliExpress** |
|
|
447
|
-
| **Apple App Store** |
|
|
448
|
-
| **Google Play** |
|
|
449
|
-
| **Amazon** |
|
|
450
|
-
| **Douyin** |
|
|
451
|
-
| **Finance** |
|
|
452
|
-
| **G2** |
|
|
453
|
-
| **Quora** |
|
|
454
|
-
| **H&M** |
|
|
455
|
-
| **
|
|
456
|
-
| **
|
|
457
|
-
| **
|
|
458
|
-
| **
|
|
459
|
-
| **
|
|
460
|
-
| **
|
|
461
|
-
| **
|
|
462
|
-
| **
|
|
463
|
-
| **
|
|
464
|
-
| **
|
|
465
|
-
| **
|
|
466
|
-
| **
|
|
467
|
-
| **
|
|
468
|
-
| **
|
|
469
|
-
| **
|
|
470
|
-
| **
|
|
471
|
-
| **
|
|
472
|
-
| **
|
|
473
|
-
| **
|
|
474
|
-
| **
|
|
475
|
-
| **
|
|
476
|
-
| **
|
|
477
|
-
| **
|
|
478
|
-
| **
|
|
479
|
-
| **
|
|
480
|
-
| **
|
|
481
|
-
| **
|
|
482
|
-
| **
|
|
483
|
-
| **
|
|
484
|
-
| **
|
|
485
|
-
| **
|
|
486
|
-
| **
|
|
487
|
-
| **
|
|
488
|
-
| **
|
|
489
|
-
| **
|
|
490
|
-
| **
|
|
491
|
-
| **
|
|
492
|
-
|
|
493
|
-
**
|
|
427
|
+
| Platform | Data Available |
|
|
428
|
+
|----------|----------------|
|
|
429
|
+
| **LinkedIn** | Profiles (single sub-resources or one-call bundles: all, complete, with-posts) & company pages (incl. lookup by domain, also-viewed, employee counts), posts & post-with-comments, reposts, reactions, comments & replies, Pulse articles with comments and reactions, people search (keyword or search-URL), company & hashtag search, similar members, profile sub-resources (experience, education, skills, position skills, certifications, followed schools/newsletters/Top Voices, last activity…), jobs (search, company jobs, jobs a member posted, hiring team, details), company insights, groups, the complete post-history archive (metered per post), transcripts, Ad Library, profile-360 |
|
|
430
|
+
| **Prism** | Cross-platform composites — URL lookup, comment harvesting, batch post-stats/profile/comment lookup, async background jobs of up to 5,000 items, handle-audit, name→accounts resolution (find-accounts), handle/link mentions, adverse-post screening, campaign-brief checks, hook/format lift, term earliness, a no-keyword country trend board, commenter language mix, comment-sourced buyer leads, brand mentions, demand signals, AI visibility, crisis radar/post-mortem, reputation, share-of-voice, creator vetting & creator cards, org radar, Korea gap, AI consensus answers, video/app/product intelligence |
|
|
431
|
+
| **Instagram** | Profiles, account transparency (profile/about), posts, reels, comments & comment replies, highlights, stories, tagged & location feeds, followers/following, similar accounts, post likers, reshare stats, one-call reels/posts feeds with share counts, engagement analytics, universal + popular-post search, reels/hashtag/profile/location/music search (reel search with creator cards via `include=creator`), on-screen text (OCR), trending, transcripts, profile-360 |
|
|
432
|
+
| **TikTok** | Profiles, videos, comments & replies, on-screen text extraction, keyword/hashtag/user/music search + suggestions, hashtag details, trending (global or in-country For You), TikTok's own popular-hashtag and Top Videos boards, audience, similar accounts, followers, liked videos, playlists & collections, place feeds, effects, live, songs, transcripts, Ad Library, profile-360 |
|
|
433
|
+
| **Facebook** | Pages, groups & group posts, posts, comments & replies, photos, reels (incl. full reels feed with view counts), events & event search, Marketplace, keyword search over posts/pages/people/videos/groups, transcripts, full Ad Library |
|
|
434
|
+
| **YouTube** | Channels, videos, shorts, comments & replies, sponsors, playlists & items, community posts, search (advanced + autocomplete), trending, live streams, channel contact email lookup, media files (audio/video/subtitles/thumbnails), transcripts, batch videos/channels/transcripts, profile-360 |
|
|
435
|
+
| **Web Scraping** | Scrape, web search, site map, LLM extract, async crawl/batch-scrape/agent jobs with per-page error feeds, change monitors, interactive browser sessions, document parse — driven by `socialcrawl_manage` (area `web`) |
|
|
436
|
+
| **US Congress Trades** | US Congress STOCK Act disclosures — trade feeds (all/48h/7d), members, per-politician and per-ticker stats and trades, state delegations, and the full statistics suite (party, sectors, issuers, volume, unusual activity, buy/sell ratio, late filings) |
|
|
437
|
+
| **Klarna** | Product details and every merchant offer, keyword search + suggestions, user and professional reviews with score overviews, price history, product comparison, category browsing with filters/keywords/buying guides, store listings |
|
|
438
|
+
| **Tripadvisor** | Hotels, restaurants, attractions and cruise ships — search and full detail for each, traveler reviews with owner replies, place lookup by URL, destination autocomplete, experience types |
|
|
439
|
+
| **Twitter/X** | Profiles, tweets and replies, tweet & user search, user media, followers, following, retweeters, communities, video transcripts, AI search via Grok, profile-360 |
|
|
440
|
+
| **Naver** | Korea's #1 portal — blog, news, encyclopedia, cafe, KiN, local, image, web search, errata & adult classifiers, Data Lab search-trend & shopping-insight series, brief |
|
|
441
|
+
| **Reddit** | Subreddits, post detail, comments, user profiles with post and comment history, keyword/comment/media search, subreddit discovery, transcripts, omni-search VoC sweep |
|
|
442
|
+
| **GitHub** | Users, repos, issues, PRs, READMEs, releases, search, repo dossier, user profile-velocity |
|
|
443
|
+
| **Gumtree** | UK classifieds — listing search and details, similar listings, seller profiles and their ads, search suggestions, trending searches, category tree with filters, location lookup |
|
|
444
|
+
| **Jobs** | Job search and listing detail across LinkedIn, Indeed, Bing and Xing, LinkedIn organization-id resolution, and salary ranges by title and country |
|
|
445
|
+
| **Sephora** | Product details, reviews, keyword search + suggestions, category tree browsing, brand listings and per-brand products, store lookup, per-SKU in-store availability |
|
|
446
|
+
| **Content Analysis** | Cross-web brand mentions, sentiment, rating distributions, phrase/category trends |
|
|
447
|
+
| **Google** | Web search, Ads Transparency, Business Profile (info, reviews, updates, Q&A), Travel hotels |
|
|
448
|
+
| **AliExpress** | Product details, keyword search, similar products, reviews, per-SKU shipping, hot products, featured promotions, category tree |
|
|
449
|
+
| **Apple App Store** | App search, search suggestions, app details, reviews, charts, listings database, reference data |
|
|
450
|
+
| **Google Play** | App search, search suggestions, app details, reviews, charts, listings database, reference data |
|
|
451
|
+
| **Amazon** | Product search, ASIN details, reviews, sellers, shop pages, Best Sellers charts, current deals, seller profiles — ~13 marketplaces |
|
|
452
|
+
| **Douyin** | China's TikTok — video search, creator profiles and feeds, video detail, comments and comment replies, creator search, hot-search board (mostly metered per row) |
|
|
453
|
+
| **Finance** | Instrument quotes, ticker search, markets overview, instrument news, daily price history, company financial statements, options chains |
|
|
454
|
+
| **G2** | Software marketplace — product pages, reviews, category listings and the category index, vendor profiles and their catalogue, product URL index |
|
|
455
|
+
| **Quora** | Question search and detail, answer search, Space post search, profile search, Space/topic search |
|
|
456
|
+
| **H&M** | Keyword search + suggestions, store listings by country, countries/languages, category tree, per-product supplier and factory disclosure |
|
|
457
|
+
| **Pinterest** | Pins, boards, user boards, search, Pinterest Trends by country, URL save-counts |
|
|
458
|
+
| **Spotify** | Artists, tracks, albums, podcasts, episodes, search |
|
|
459
|
+
| **Threads** | Profiles, posts, post comments, keyword search, user search |
|
|
460
|
+
| **Utility** | Free API self-discovery — quickstart, endpoint catalogue, per-endpoint usage guide, cross-cutting capabilities index, plain-words call planner, LLM context payload. 0 credits, served from the live registry. Behind `socialcrawl_find`, `socialcrawl_endpoint`, `socialcrawl_estimate` and `socialcrawl_account` |
|
|
461
|
+
| **Xiaohongshu** | RED / Little Red Book — note search, hot-search board, creator profiles and their notes, note detail, top-level comments (5cr per returned row) |
|
|
462
|
+
| **Apple Music** | Catalog search, artist, album, track, per-country charts (songs, albums, music videos, playlists) |
|
|
463
|
+
| **Google Shopping** | Product search, product details, price history, cross-retailer reviews, per-seller offers |
|
|
464
|
+
| **Kohl's** | Keyword search, reviews, product questions and answers, store lookup, category tree |
|
|
465
|
+
| **Rumble** | Search, channel videos, video details, comments, transcripts |
|
|
466
|
+
| **Target** | Product details by TCIN, reviews, category browsing, full taxonomy, store lookup |
|
|
467
|
+
| **TikTok Shop** | Products, reviews, listings, search, creator showcases |
|
|
468
|
+
| **Universal Search** | One query fanned out across many platforms (20cr flat); `multi` — each named platform's own native search in one call at the sum of their page prices; forums lane; multi-country news lane (metered); creator-discovery lane across TikTok/Threads/Instagram |
|
|
469
|
+
| **Walmart** | Product details, reviews, keyword search, category browsing, seller offers |
|
|
470
|
+
| **Yelp** | Business profiles by encid, business reviews, business search (compact and full-card), search suggestions |
|
|
471
|
+
| **Bluesky** | Profiles, user posts, post details, keyword post search |
|
|
472
|
+
| **Etsy** | Listings by id or URL, a shop's catalogue, similar listings, search suggestions |
|
|
473
|
+
| **Hacker News** | Story search, story, comment tree, profile |
|
|
474
|
+
| **Home Depot** | Keyword search, product details by item id or URL (store/zip-aware pricing), reviews, store lookup by ZIP |
|
|
475
|
+
| **Tavily** | Web search (with LLM answer), URL extraction, sitemap, full crawl |
|
|
476
|
+
| **Twitch** | Profiles, clips, videos, schedules |
|
|
477
|
+
| **Google Trends** | Interest-over-time (explore), rising/breakout related queries, and Trending Now by location |
|
|
478
|
+
| **Kwai** | Profiles, posts |
|
|
479
|
+
| **Telegram** | Public channel profiles, channel post feeds, single post lookup |
|
|
480
|
+
| **Truth Social** | Profiles, posts |
|
|
481
|
+
| **Wayfair** | Product search, product details by SKU, reviews |
|
|
482
|
+
| **eBay** | Listing search incl. sold/completed with realised prices, listing details |
|
|
483
|
+
| **Snapchat** | Profiles, Spotlight comments |
|
|
484
|
+
| **Trustpilot** | Business search, company reviews |
|
|
485
|
+
| **Google News** | Real-time Google News SERP search |
|
|
486
|
+
| **Kick** | Clips |
|
|
487
|
+
| **Komi** | Link pages |
|
|
488
|
+
| **LinkBio** | Link pages |
|
|
489
|
+
| **LinkMe** | Link pages |
|
|
490
|
+
| **Linktree** | Link pages |
|
|
491
|
+
| **On-Page** | Single-URL on-page SEO audit — the technical, content and meta checks in one call |
|
|
492
|
+
| **Perplexity** | Sonar web research with cited sources |
|
|
493
|
+
| **Pillar** | Link pages |
|
|
494
|
+
| **Polymarket** | Prediction-market research — multi-query fan-out + ranking |
|
|
495
|
+
| **Product Hunt** | Current Product Hunt launches (~50 per page), optionally by topic |
|
|
496
|
+
|
|
497
|
+
`socialcrawl_find` with no task lists every platform with its live endpoint count.
|
|
494
498
|
|
|
495
499
|
## Error Handling
|
|
496
500
|
|
package/dist/app.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import express from "express";
|
|
2
|
+
import { type OAuthResourceServerConfig } from "./oauth/config.js";
|
|
2
3
|
export interface AppConfig {
|
|
3
4
|
/** SocialCrawl API origin the tools call, no trailing slash. */
|
|
4
5
|
baseUrl: string;
|
|
@@ -25,5 +26,11 @@ export interface AppConfig {
|
|
|
25
26
|
* (e.g. 1 for one load balancer) only where that is actually true.
|
|
26
27
|
*/
|
|
27
28
|
trustProxy?: number | boolean;
|
|
29
|
+
/**
|
|
30
|
+
* OAuth 2.1 resource-server mode (preview). Omitted → read from env
|
|
31
|
+
* (`SOCIALCRAWL_OAUTH=1` + settings, see oauth/config.ts); `null` → off.
|
|
32
|
+
* Off is the default and leaves every existing behaviour unchanged.
|
|
33
|
+
*/
|
|
34
|
+
oauth?: OAuthResourceServerConfig | null;
|
|
28
35
|
}
|
|
29
36
|
export declare function buildApp(config: AppConfig): express.Express;
|
package/dist/app.js
CHANGED
|
@@ -5,7 +5,10 @@ import { StreamableHTTPServerTransport } from "@modelcontextprotocol/sdk/server/
|
|
|
5
5
|
import { extractApiKey } from "./auth.js";
|
|
6
6
|
import { createServer } from "./server.js";
|
|
7
7
|
import { SERVER_NAME, SERVER_VERSION } from "./constants.js";
|
|
8
|
+
import { oauthConfigFromEnv } from "./oauth/config.js";
|
|
9
|
+
import { mountProtectedResourceMetadata, oauthGate, RESOLVED_API_KEY } from "./oauth/resource-server.js";
|
|
8
10
|
export function buildApp(config) {
|
|
11
|
+
const oauth = config.oauth === undefined ? oauthConfigFromEnv(process.env) : (config.oauth ?? undefined);
|
|
9
12
|
const app = express();
|
|
10
13
|
app.set("trust proxy", config.trustProxy ?? false);
|
|
11
14
|
app.use(express.json({ limit: "1mb" }));
|
|
@@ -43,6 +46,9 @@ export function buildApp(config) {
|
|
|
43
46
|
});
|
|
44
47
|
next();
|
|
45
48
|
});
|
|
49
|
+
if (oauth) {
|
|
50
|
+
mountProtectedResourceMetadata(app, oauth);
|
|
51
|
+
}
|
|
46
52
|
// The xForwardedForHeader validation would 500 any request carrying an
|
|
47
53
|
// X-Forwarded-For header while `trust proxy` is off. We ignore that header
|
|
48
54
|
// deliberately in that case (req.ip = socket address), so silence it.
|
|
@@ -72,9 +78,13 @@ export function buildApp(config) {
|
|
|
72
78
|
// ApiContext documents baseUrl as "no trailing slash" — enforce it here so a
|
|
73
79
|
// misconfigured env value doesn't produce `//v1/...` upstream URLs.
|
|
74
80
|
const baseUrl = config.baseUrl.replace(/\/+$/, "");
|
|
75
|
-
|
|
81
|
+
// With OAuth on, the gate answers 401/403 or resolves the token's API key
|
|
82
|
+
// into res.locals; without it, the key comes straight from the headers.
|
|
83
|
+
const mcpGate = oauth ? [oauthGate(oauth)] : [];
|
|
84
|
+
app.post("/mcp", ...mcpGate, async (req, res) => {
|
|
76
85
|
// Stateless: fresh server + transport per request, key bound via closure.
|
|
77
|
-
const
|
|
86
|
+
const resolvedKey = res.locals[RESOLVED_API_KEY];
|
|
87
|
+
const ctx = { apiKey: resolvedKey ?? extractApiKey(req.headers), baseUrl };
|
|
78
88
|
const server = createServer(ctx);
|
|
79
89
|
const transport = new StreamableHTTPServerTransport({
|
|
80
90
|
sessionIdGenerator: undefined,
|
package/dist/auth.d.ts
CHANGED
|
@@ -6,3 +6,11 @@ import type { IncomingHttpHeaders } from "node:http";
|
|
|
6
6
|
* no credentials must get an anonymous context, not the operator's key.
|
|
7
7
|
*/
|
|
8
8
|
export declare function extractApiKey(headers: IncomingHttpHeaders): string;
|
|
9
|
+
/**
|
|
10
|
+
* True for a compact JWS (`header.payload.signature`, base64url segments).
|
|
11
|
+
* With OAuth on, this is how a Bearer access token is told apart from a
|
|
12
|
+
* SocialCrawl API key sent as Bearer (API keys never contain dots).
|
|
13
|
+
*/
|
|
14
|
+
export declare function isJwtShaped(value: string): boolean;
|
|
15
|
+
/** The trimmed `Authorization: Bearer` value, or "" when absent/empty/another scheme. */
|
|
16
|
+
export declare function extractBearerToken(headers: IncomingHttpHeaders): string;
|
package/dist/auth.js
CHANGED
|
@@ -5,14 +5,11 @@
|
|
|
5
5
|
* no credentials must get an anonymous context, not the operator's key.
|
|
6
6
|
*/
|
|
7
7
|
export function extractApiKey(headers) {
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
if (token !== "") {
|
|
14
|
-
return token;
|
|
15
|
-
}
|
|
8
|
+
const token = extractBearerToken(headers);
|
|
9
|
+
// A whitespace-only bearer value falls through to x-api-key instead of
|
|
10
|
+
// silently downgrading a caller who sent both headers to anonymous.
|
|
11
|
+
if (token !== "") {
|
|
12
|
+
return token;
|
|
16
13
|
}
|
|
17
14
|
const xKey = headers["x-api-key"];
|
|
18
15
|
if (typeof xKey === "string") {
|
|
@@ -20,4 +17,20 @@ export function extractApiKey(headers) {
|
|
|
20
17
|
}
|
|
21
18
|
return "";
|
|
22
19
|
}
|
|
20
|
+
/**
|
|
21
|
+
* True for a compact JWS (`header.payload.signature`, base64url segments).
|
|
22
|
+
* With OAuth on, this is how a Bearer access token is told apart from a
|
|
23
|
+
* SocialCrawl API key sent as Bearer (API keys never contain dots).
|
|
24
|
+
*/
|
|
25
|
+
export function isJwtShaped(value) {
|
|
26
|
+
return /^[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]*$/.test(value);
|
|
27
|
+
}
|
|
28
|
+
/** The trimmed `Authorization: Bearer` value, or "" when absent/empty/another scheme. */
|
|
29
|
+
export function extractBearerToken(headers) {
|
|
30
|
+
const auth = headers.authorization;
|
|
31
|
+
if (typeof auth === "string" && auth.toLowerCase().startsWith("bearer ")) {
|
|
32
|
+
return auth.slice(7).trim();
|
|
33
|
+
}
|
|
34
|
+
return "";
|
|
35
|
+
}
|
|
23
36
|
//# sourceMappingURL=auth.js.map
|