socialcrawl-mcp 2.0.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.
Files changed (51) hide show
  1. package/README.md +94 -112
  2. package/dist/client.d.ts +2 -0
  3. package/dist/client.js +4 -0
  4. package/dist/constants.d.ts +10 -1
  5. package/dist/constants.js +10 -1
  6. package/dist/cost-guard.d.ts +8 -1
  7. package/dist/cost-guard.js +21 -9
  8. package/dist/data/docs-handwritten.js +1 -1
  9. package/dist/data/docs.js +1 -1
  10. package/dist/data/endpoints.js +25 -22
  11. package/dist/data/examples.js +1 -1
  12. package/dist/data/guide.d.ts +1 -1
  13. package/dist/data/guide.js +1 -1
  14. package/dist/data/outputs.js +217 -217
  15. package/dist/data/registry-meta.d.ts +1 -1
  16. package/dist/data/registry-meta.js +1 -1
  17. package/dist/endpoint-resolve.d.ts +10 -0
  18. package/dist/endpoint-resolve.js +34 -0
  19. package/dist/format/shape.d.ts +6 -0
  20. package/dist/format/shape.js +64 -0
  21. package/dist/freshness.d.ts +27 -4
  22. package/dist/freshness.js +42 -19
  23. package/dist/result.d.ts +2 -0
  24. package/dist/result.js +8 -0
  25. package/dist/schemas/normalize.d.ts +27 -0
  26. package/dist/schemas/normalize.js +189 -0
  27. package/dist/schemas/outputs.d.ts +51 -31
  28. package/dist/schemas/outputs.js +10 -4
  29. package/dist/schemas/tools.d.ts +43 -8
  30. package/dist/schemas/tools.js +20 -7
  31. package/dist/server.js +17 -12
  32. package/dist/tools/cohorts.d.ts +3 -1
  33. package/dist/tools/cohorts.js +11 -10
  34. package/dist/tools/collect.d.ts +7 -3
  35. package/dist/tools/collect.js +110 -9
  36. package/dist/tools/discover.js +22 -27
  37. package/dist/tools/endpoint.js +8 -4
  38. package/dist/tools/estimate.js +53 -9
  39. package/dist/tools/find.d.ts +1 -0
  40. package/dist/tools/find.js +171 -8
  41. package/dist/tools/manage.d.ts +4 -0
  42. package/dist/tools/manage.js +106 -4
  43. package/dist/tools/monitors.d.ts +8 -1
  44. package/dist/tools/monitors.js +17 -12
  45. package/dist/tools/pricing.d.ts +1 -5
  46. package/dist/tools/pricing.js +17 -0
  47. package/dist/tools/request.d.ts +2 -11
  48. package/dist/tools/request.js +123 -74
  49. package/dist/tools/web.d.ts +3 -1
  50. package/dist/tools/web.js +4 -3
  51. package/package.json +2 -2
@@ -1504,7 +1504,7 @@ export const ENDPOINTS = [
1504
1504
  resource: "video/screen-text",
1505
1505
  method: "GET",
1506
1506
  params: [
1507
- { name: "url", required: true, description: "Full URL of the TikTok video", example: "https://www.tiktok.com/@stoolpresidente/video/7499229683859426602" },
1507
+ { name: "url", required: true, description: "Full URL of the TikTok video or photo post (a `/video/` or `/photo/` link)", example: "https://www.tiktok.com/@stoolpresidente/video/7499229683859426602" },
1508
1508
  ],
1509
1509
  optionalParams: [],
1510
1510
  oneOfGroups: [],
@@ -1513,16 +1513,19 @@ export const ENDPOINTS = [
1513
1513
  pricing: { cost: 5, tier: "advanced", ladderCost: 5, model: "ladder" },
1514
1514
  archetype: "Analytics",
1515
1515
  summary: "Get TikTok video on-screen text",
1516
- description: "Extracts the text shown ON the video itself: the overlay captions creators put on screen, which the regular caption and transcript never carry. Two layers are merged: native text-sticker data (present when the creator used TikTok's built-in text tool) and AI OCR of the video's cover frame, which also catches text burned in with editors like CapCut that no data provider returns. `texts` is the deduplicated union in reading order; `native_texts` and `ocr_texts` expose each layer separately and `source` says which layers produced data. A video with no on-screen text returns an empty `texts` array (that is a real answer, not an error). Costs 5 credits; auto-refunds when the video lookup or the whole extraction fails.",
1516
+ description: "Extracts the text shown ON a TikTok post itself: the overlay captions creators put on screen, which the regular caption and transcript never carry. Two layers are merged: native text-sticker data (present when the creator used TikTok's built-in text tool) and AI OCR of the post's images, which also catches text burned in with editors like CapCut that no data provider returns. What the OCR layer reads depends on the post. On a video, the cover frame only, so text that appears later in the video is not read. On a photo post (pass its `/photo/` link), every slide in order, up to the first 10; a longer photo post is read to slide 10 and the response carries a warning giving its full slide count. `texts` is the deduplicated union in reading order; `native_texts` and `ocr_texts` expose each layer separately and `source` says which layers produced data. On a photo post, `images` lists each slide read with its own `texts` and its 0-based `index`, so you know which slide said what. A post with no on-screen text returns an empty `texts` array (that is a real answer, not an error). Costs 5 credits for a video or a photo post of any length; auto-refunds when the post lookup or the whole extraction fails.",
1517
1517
  cache: { category: "post", ttlSeconds: 600 },
1518
1518
  upstream: { kind: "tiktok-screen-text" },
1519
1519
  tags: ["tiktok"],
1520
1520
  responseFields: {
1521
1521
  "texts": "Deduplicated union of every on-screen text block found, native layer first, in reading order. Empty array when the video shows no overlay text.",
1522
1522
  "native_texts": "Text the creator typed with TikTok's built-in text tool, straight from platform data. Null when the video carries no native text stickers.",
1523
- "ocr_texts": "Text the vision model read off the video's cover frame, including burned-in editor text. Null when the OCR layer was skipped or failed (see warnings).",
1523
+ "ocr_texts": "Text the vision model read off the video's cover frame, or off every slide read on a photo post, including burned-in editor text. Null when the OCR layer was skipped or failed (see warnings).",
1524
1524
  "source": "Which layers produced data: native+ocr, native, ocr, or none.",
1525
- "frame": "Which frame the OCR layer analysed (currently always the video's cover frame, or null when the video exposes no cover).",
1525
+ "media_type": "video or photo.",
1526
+ "frame": "cover when the OCR layer read a video's cover frame; null on a photo post (see images) or when the video exposes no cover.",
1527
+ "images": "Photo posts only: each slide read, in order, as { index, image_url, texts }. index is the slide's 0-based position; texts is null when that slide could not be read (see warnings).",
1528
+ "slide_count": "Photo posts only: the post's total slide count, which can exceed the 10 slides read.",
1526
1529
  },
1527
1530
  purpose: {
1528
1531
  summary: "Get TikTok video on-screen text",
@@ -4691,7 +4694,7 @@ export const ENDPOINTS = [
4691
4694
  pricing: { cost: 1, tier: "standard", ladderCost: 1, model: "metered", minCost: 1, maxCost: 5, description: "1 credit per page. The default labels (sponsored, intent, niche) are free. label=mention, or label=intent with offer=, holds 4 extra credits and refunds down to 1 credit per started 25 posts that were newly judged: posts already labelled are free, a page where nothing could be judged refunds the whole extra, and a cached page is free." },
4692
4695
  archetype: "PostList",
4693
4696
  summary: "List Twitter user tweets",
4694
- description: "Returns the most recent tweets posted by a Twitter/X user in descending chronological order, each with the full text, like count, retweet count, reply count, bookmark count, view count, media attachments, and creation timestamp. Retweets and self-threaded replies are included, matching the account's Posts tab; a pinned tweet is flagged via `post.flags.pinned` and sorts by its own publish date. A post carrying more than one photo lists every URL in `post.ext.all_media_urls`, while `post.content.media_urls` holds the first; `post.ext.quote_count` is how many times the post was quote-tweeted. Page size is set by the source, typically around 20 tweets. Deeper history is a cursor walk: send `pagination.next_cursor` back as `cursor` and repeat until `pagination.has_more` is false; each page costs 1 credit.",
4697
+ description: "Returns the most recent tweets posted by a Twitter/X user in descending chronological order, each with the full text, like count, retweet count, reply count, bookmark count, view count, media attachments, and creation timestamp. Retweets and self-threaded replies are included, matching the account's Posts tab; a pinned tweet is flagged via `post.flags.pinned` and sorts by its own publish date. A post carrying more than one photo lists every URL in `post.ext.all_media_urls`, while `post.content.media_urls` holds the first; `post.ext.quote_count` is how many times the post was quote-tweeted. Page size is set by the source, typically around 20 tweets. Deeper history is a cursor walk: send `pagination.next_cursor` back as `cursor` and repeat until `pagination.has_more` is false; each page costs 1 credit. When the latest tweets cannot be fetched, the call fails with 502 `UPSTREAM_ERROR` and the credit is refunded; it is never answered with an older or popularity-ranked set of tweets.",
4695
4698
  budget_ms: 20000,
4696
4699
  pagination: { style: "cursor", nativeParam: "cursor" },
4697
4700
  cache: { category: "post", ttlSeconds: 600 },
@@ -10538,7 +10541,7 @@ export const ENDPOINTS = [
10538
10541
  ],
10539
10542
  optionalParams: [
10540
10543
  { name: "location", type: "string", description: "Country as an ISO code ('US', 'GB', 'KR'), a full country name ('United Kingdom', 'South Korea') or a numeric location code ('2826'). Defaults to the United States. Volume is published for 94 countries; any other location is rejected with a free 400 naming the accepted forms.", example: "GB" },
10541
- { name: "language", type: "string", description: "Language code ('en', 'de', 'ko') the keywords are searched in. Defaults to the country's primary language, so Germany is 'de' and Belgium is 'fr'. A language the country does not hold (Germany in English) is rejected with a free 400 listing the ones it does." },
10544
+ { name: "language", type: "string", description: "Language code ('en', 'de', 'ko') the keywords are searched in. Defaults to the first language listed for the country: Germany is 'de' and Belgium is 'fr', but Vietnam, Indonesia, India, Malaysia, Pakistan, the Philippines, Hong Kong and Singapore default to 'en', so pass their local language (e.g. 'vi', 'id', 'hi') explicitly. A language the country does not hold (Germany in English) is rejected with a free 400 listing the ones it does." },
10542
10545
  ],
10543
10546
  oneOfGroups: [],
10544
10547
  csvConstraints: { "keywords": { max: 20 } },
@@ -10606,7 +10609,7 @@ export const ENDPOINTS = [
10606
10609
  pricing: { cost: 1, tier: "standard", ladderCost: 1, model: "ladder" },
10607
10610
  archetype: "ProductList",
10608
10611
  summary: "Search Amazon products by keyword",
10609
- description: "Returns organic Amazon search results for a keyword: title, price, list price, rating, image, and ASIN per product. Where Amazon shows its monthly purchase badge, `product.ext.bought_past_month_label` carries Amazon's text (\"9K+ bought in past month\") and `product.ext.bought_past_month` its lower bound as a number (9000); both are null when the row shows no badge, and the number is null on a badge with no count (\"New on Amazon in past month\"). Multiply it by `price.current` per `country` for an estimate of monthly spend by marketplace. Results reflect the chosen marketplace (default United States). Sponsored placements and related searches are excluded in v1. Paginate with the universal cursor parameter; pass depth instead if you need a single large page.",
10612
+ description: "Returns organic Amazon search results for a keyword: title, price, list price, rating, image, and ASIN per product. Where Amazon shows its monthly purchase badge, `product.ext.bought_past_month_label` carries Amazon's text in the marketplace's own language (\"9K+ bought in past month\", \"2000+ Mal im letzten Monat gekauft\") and `product.ext.bought_past_month` its LOWER BOUND as an integer (9000; a badge reading \"2000+\" means at least 2000, not exactly 2000). Parsed for US, GB, CA, AU, IN, DE, FR, IT, ES, MX, NL, BR and JP. Both are null when the row shows no badge, and the number is null on a badge with no count (\"New on Amazon in past month\") or in a wording we have not parsed (the label is still returned as-is). Calls served from the secondary source, or made with `depth`, carry the number without a label. Multiply it by `price.current` per `country` for an estimate of monthly spend by marketplace. Results reflect the chosen marketplace (default United States). Sponsored placements and related searches are excluded in v1. Paginate with the universal cursor parameter; pass depth instead if you need a single large page.",
10610
10613
  budget_ms: 20000,
10611
10614
  pagination: { style: "page", nativeParam: "page" },
10612
10615
  cache: { category: "search", ttlSeconds: 120 },
@@ -11321,7 +11324,7 @@ export const ENDPOINTS = [
11321
11324
  ],
11322
11325
  optionalParams: [
11323
11326
  { name: "period", type: "enum", enumValues: ["quarterly", "annual"], description: "Reporting period: quarterly or annual. Defaults to quarterly.", example: "quarterly" },
11324
- { name: "limit", type: "integer", minimum: 1, maximum: 40, description: "Number of most recent periods to return, 1 to 40. Defaults to 8.", example: "8" },
11327
+ { name: "limit", type: "integer", minimum: 1, maximum: 40, description: "Number of most recent periods to return, a whole number from 1 to 40. Defaults to 8. A value outside that range is rejected with a 400 and the credits are refunded.", example: "8" },
11325
11328
  ],
11326
11329
  oneOfGroups: [],
11327
11330
  creditTier: "standard",
@@ -11329,7 +11332,7 @@ export const ENDPOINTS = [
11329
11332
  pricing: { cost: 1, tier: "standard", ladderCost: 1, model: "ladder" },
11330
11333
  archetype: "Analytics",
11331
11334
  summary: "Get quarterly or annual fundamentals for a public company",
11332
- description: "Returns reported fundamentals for one US-listed company from its SEC filings: revenue, cost of goods sold, gross profit, inventory, the change in inventory since the previous period, and accounts payable, newest period first. Each row carries `period_end`, the fiscal year and period, the SEC form and the original filing date. Quarterly rows use the three-month figures; the fourth quarter is never filed on its own, so it is computed as the fiscal year minus the three reported quarters and listed in the row's `derived_fields`. `concepts_used` names the US GAAP concept that fed each field, because companies tag the same line differently (a retailer may report cost of goods sold under one concept, a software company cost of revenue under another). A figure the company does not report is null, never 0: a company with no inventory line returns null inventory. Values are USD, as filed; a restated figure replaces the original. Covers companies that file US GAAP statements with the SEC; foreign filers on IFRS and unlisted companies return not found.",
11335
+ description: "Returns reported fundamentals for one US-listed company from its SEC filings: revenue, cost of goods sold, gross profit, inventory, the change in inventory since the previous period, and accounts payable, newest period first. Each row carries `period_end`, the fiscal year and period, the SEC form and the original filing date. The fiscal year and period come from the company's own fiscal calendar: a quarter belongs to the fiscal year that contains it, and a year carries the number the company gave it in that year's annual report. No two rows share a fiscal year and period, and a period that cannot be placed has null labels. Quarterly rows use the quarter's own figures, including 16-week first quarters; the fourth quarter is rarely filed on its own, so it is computed as the fiscal year minus the first nine months, with every figure taken from the same filings so a later restatement of the year is not pushed into Q4, and listed in the row's `derived_fields`. `concepts_used` names the US GAAP concept that fed each field, because companies tag the same line differently: a retailer may report cost of goods sold under one concept and a software company cost of revenue under another, some companies report payables only as one accounts payable and accrued liabilities line, and a LIFO retailer that reports FIFO cost and the LIFO reserve as separate lines gets inventory as their difference, listed as computed. Gross profit is the company's reported figure when it equals revenue minus cost of goods sold, otherwise that difference. A cost line the company tags in quarterly reports but never in its annual report is not used as cost of goods sold, so cost of goods sold and gross profit stay null instead of showing a misleading margin. A figure the company does not report is null, never 0: a company with no inventory line returns null inventory. Values are USD, as filed; a restated figure replaces the original. Covers companies that file US GAAP statements with the SEC. Foreign filers on IFRS, companies whose latest US GAAP period ended more than two years ago, and unlisted companies return not found, and the credits are refunded.",
11333
11336
  budget_ms: 15000,
11334
11337
  cache: { category: "analytics", ttlSeconds: 21600 },
11335
11338
  upstream: { kind: "sec-edgar" },
@@ -18168,7 +18171,7 @@ export const ENDPOINTS = [
18168
18171
  pricing: { cost: 1, tier: "standard", ladderCost: 1, model: "ladder" },
18169
18172
  archetype: "PostList",
18170
18173
  summary: "Search Naver Blog",
18171
- description: "Searches naver.com/blog. Korea's dominant long-form blogging platform. Returns ranked posts under `data.items[]` with `title`, `link`, `description` (both HTML-tagged with `<b>` around matched keywords), `bloggername`, `bloggerlink`, and a day-precision `published_at` (ISO-8601 UTC, from Naver's YYYYMMDD `postdate`).",
18174
+ description: "Searches naver.com/blog. Korea's dominant long-form blogging platform. Returns ranked posts as PostList rows: `post.ext.title` (the post title, `<b>` highlight tags stripped and HTML entities decoded), `post.content.text` (the snippet), `post.author.display_name` (blogger name), `post.author.url`, and `post.published_at`. Naver sends only a calendar date (YYYYMMDD `postdate`), so `published_at` has DAY precision: it is rendered as midnight UTC (`T00:00:00.000Z`), which is a placeholder, not the real publish time. Treat only the date part as meaningful.",
18172
18175
  pagination: { style: "offset", nativeParam: "start", limitParam: "display" },
18173
18176
  cache: { category: "search", ttlSeconds: 120 },
18174
18177
  upstream: { kind: "naver" },
@@ -18200,7 +18203,7 @@ export const ENDPOINTS = [
18200
18203
  pricing: { cost: 1, tier: "standard", ladderCost: 1, model: "ladder" },
18201
18204
  archetype: "PostList",
18202
18205
  summary: "Search Naver News",
18203
- description: "Searches news.naver.com: aggregated Korean news from licensed publishers. Returns articles under `data.items[]` with `title`, `originallink` (publisher URL), `link` (naver-hosted URL), `description`, and `pubDate` (RFC 1123).",
18206
+ description: "Searches news.naver.com: aggregated Korean news from licensed publishers. Returns articles as PostList rows: `post.ext.title` (tags stripped, entities decoded), `post.url` (publisher URL), `post.content.text` (snippet), and `post.published_at`.",
18204
18207
  pagination: { style: "offset", nativeParam: "start", limitParam: "display" },
18205
18208
  cache: { category: "search", ttlSeconds: 120 },
18206
18209
  upstream: { kind: "naver" },
@@ -18264,7 +18267,7 @@ export const ENDPOINTS = [
18264
18267
  pricing: { cost: 1, tier: "standard", ladderCost: 1, model: "ladder" },
18265
18268
  archetype: "PostList",
18266
18269
  summary: "Search Naver Cafe articles",
18267
- description: "Searches cafe.naver.com. Korea's largest user-community platform (analog of Reddit subreddits / Discord servers). Returns cafe posts under `data.items[]` with `title`, `link`, `description`, `cafename`, and `cafeurl`. Many cafes are member-gated; the `link` URL works only if the caller has joined the cafe (Naver returns a teaser otherwise).",
18270
+ description: "Searches cafe.naver.com. Korea's largest user-community platform (analog of Reddit subreddits / Discord servers). Returns cafe posts as PostList rows: `post.ext.title` (tags stripped, entities decoded), `post.url`, `post.content.text` (snippet), `post.author.display_name` (cafe name), and `post.author.url`. No publish date is available. Many cafes are member-gated; the `link` URL works only if the caller has joined the cafe (Naver returns a teaser otherwise).",
18268
18271
  pagination: { style: "offset", nativeParam: "start", limitParam: "display" },
18269
18272
  cache: { category: "search", ttlSeconds: 120 },
18270
18273
  upstream: { kind: "naver" },
@@ -22639,19 +22642,19 @@ export const ENDPOINTS = [
22639
22642
  { name: "country_code", required: true, description: "One or more ISO 3166-1 alpha-2 country codes, comma-separated (up to 10), e.g. `DE,FR,GR`. `EU27` returns the European Union total.", example: "DE,FR" },
22640
22643
  ],
22641
22644
  optionalParams: [
22642
- { name: "category", type: "string", description: "Spending categories, comma-separated. Any of total, food, alcohol_tobacco, clothing, housing, furnishings, health, transport, communication, recreation, education, restaurants_hotels, miscellaneous. Defaults to all thirteen.", example: "transport,food" },
22645
+ { name: "category", type: "string", description: "Spending categories, comma-separated. Any of total, food, alcohol_tobacco, clothing, housing, furnishings, health, transport, communication, recreation, education, restaurants_hotels, insurance_financial, miscellaneous. Defaults to all fourteen.", example: "transport,food" },
22643
22646
  { name: "from_year", type: "integer", minimum: 1990, maximum: 2100, description: "First year to return. Defaults to five years before the current year.", example: "2020" },
22644
22647
  { name: "to_year", type: "integer", minimum: 1990, maximum: 2100, description: "Last year to return. Defaults to the latest year Eurostat has.", example: "2024" },
22645
22648
  { name: "unit", type: "enum", enumValues: ["eur_millions", "eur_per_capita", "share_of_total"], description: "`eur_millions` (current prices, million euro, the default), `eur_per_capita` (current prices, euro per person) or `share_of_total` (percentage of total household spending).", example: "eur_millions" },
22646
22649
  ],
22647
22650
  oneOfGroups: [],
22648
- csvConstraints: { "country_code": { max: 10, enumValues: ["BE", "BG", "CZ", "DK", "DE", "EE", "IE", "GR", "ES", "FR", "HR", "IT", "CY", "LV", "LT", "LU", "HU", "MT", "NL", "AT", "PL", "PT", "RO", "SI", "SK", "FI", "SE", "NO", "CH", "GB", "ME", "MK", "AL", "RS", "IS", "BA", "TR", "XK", "EU27", "EL", "UK"] }, "category": { enumValues: ["total", "food", "alcohol_tobacco", "clothing", "housing", "furnishings", "health", "transport", "communication", "recreation", "education", "restaurants_hotels", "miscellaneous"] } },
22651
+ csvConstraints: { "country_code": { max: 10, enumValues: ["BE", "BG", "CZ", "DK", "DE", "EE", "IE", "GR", "ES", "FR", "HR", "IT", "CY", "LV", "LT", "LU", "HU", "MT", "NL", "AT", "PL", "PT", "RO", "SI", "SK", "FI", "SE", "NO", "CH", "GB", "ME", "MK", "AL", "RS", "IS", "BA", "TR", "XK", "EU27", "EL", "UK"] }, "category": { enumValues: ["total", "food", "alcohol_tobacco", "clothing", "housing", "furnishings", "health", "transport", "communication", "recreation", "education", "restaurants_hotels", "insurance_financial", "miscellaneous"] } },
22649
22652
  creditTier: "standard",
22650
22653
  creditCost: 1,
22651
22654
  pricing: { cost: 1, tier: "standard", ladderCost: 1, model: "ladder" },
22652
22655
  archetype: "Analytics",
22653
22656
  summary: "Get household spending by country and category",
22654
- description: "Returns annual household final consumption expenditure per country and spending category, from Eurostat, the statistical office of the European Union. Categories are the twelve top-level COICOP divisions (food, housing, transport, restaurants_hotels and so on) plus `total`. Pick a unit: `eur_millions` for the size of the market, `eur_per_capita` to compare countries of different size, or `share_of_total` for the percentage of all household spending. Results come back as `data.series[]`, one per country and category, each with `points[]` of `{ year, value }`. A year Eurostat has not published for a country is `null`, never 0, and the latest years are often provisional. Covers EU and EEA countries and some candidates; the latest published year differs by country, so recent years can be `null` for some of them. `country_code` takes ISO codes (`GR` for Greece, `GB` for the United Kingdom, `EU27` for the union) and Eurostat's own `EL` and `UK` spellings. The response also carries `dataset` (id, label, last update), `unit` and a `source_note`.",
22657
+ description: "Returns annual household final consumption expenditure per country and spending category, from Eurostat, the statistical office of the European Union. Categories are the thirteen top-level COICOP 2018 divisions (food, housing, transport, restaurants_hotels, insurance_financial and so on) plus `total`. Pick a unit: `eur_millions` for the size of the market, `eur_per_capita` to compare countries of different size, or `share_of_total` for the percentage of all household spending. Results come back as `data.series[]`, one per country and category, each with `points[]` of `{ year, value }`. A year Eurostat has not published for a country is `null`, never 0, and the latest years are often provisional. Covers EU and EEA countries and some candidates; the latest published year differs by country, so recent years can be `null` for some of them. Norway, the United Kingdom, Iceland, Albania, North Macedonia and Kosovo come from Eurostat's older COICOP 1999 dataset, the only one that still carries them: there `miscellaneous` also includes insurance and financial services, `insurance_financial` is `null`, and the United Kingdom stops at 2019. `country_code` takes ISO codes (`GR` for Greece, `GB` for the United Kingdom, `EU27` for the union) and Eurostat's own `EL` and `UK` spellings. The response also carries `dataset` (id, label, last update), `unit` and a `source_note`.",
22655
22658
  budget_ms: 15000,
22656
22659
  cache: { category: "analytics", ttlSeconds: 86400 },
22657
22660
  upstream: { kind: "eurostat" },
@@ -22708,8 +22711,8 @@ export const ENDPOINTS = [
22708
22711
  { name: "naics", type: "string", description: "Industry filter: one or more NAICS codes, comma-separated (up to 20). Each code must be 2, 4 or 6 digits, and a shorter code matches the whole family, so `4811` covers scheduled air transportation and `48` covers all transportation.", example: "4811" },
22709
22712
  { name: "psc", type: "string", description: "Product or service code filter: one or more codes, comma-separated (up to 20), 1 to 4 characters each. A shorter code matches the family, so `V` is all transportation, travel and relocation services and `V301` is travel agent services." },
22710
22713
  { name: "keyword", type: "string", description: "Free-text match against award descriptions, 3 to 120 characters. Use it for a topic such as `travel` that no single industry code captures." },
22711
- { name: "from_date", type: "string", description: "Start of the window, `YYYY-MM-DD`, no earlier than 2007-10-01. Defaults to the first day of the last full US federal fiscal year (1 October). Send only this and the window runs to today.", example: "2024-10-01" },
22712
- { name: "to_date", type: "string", description: "End of the window, `YYYY-MM-DD`. Defaults to the last day of the last full US federal fiscal year (30 September). Send only this and the window starts one year earlier.", example: "2025-09-30" },
22714
+ { name: "from_date", type: "string", description: "Start of the window, `YYYY-MM-DD`, no earlier than 2007-10-01. Defaults to the first day of the most recent US federal fiscal year (1 October to 30 September) that ended at least 90 days ago, because agencies report with a lag and a year that just ended is only partly reported. Send only this and the window runs to today.", example: "2024-10-01" },
22715
+ { name: "to_date", type: "string", description: "End of the window, `YYYY-MM-DD`. Defaults to the last day of the most recent US federal fiscal year that ended at least 90 days ago (30 September). Send only this and the window starts one year earlier.", example: "2025-09-30" },
22713
22716
  { name: "geo", type: "enum", enumValues: ["state", "county", "country"], description: "Geography layer: `state` (default), `county` or `country`." },
22714
22717
  { name: "scope", type: "enum", enumValues: ["place_of_performance", "recipient_location"], description: "`place_of_performance` (default) places spending where the work is done. `recipient_location` places it where the recipient is based." },
22715
22718
  { name: "award_type", type: "enum", enumValues: ["contracts", "grants", "all"], description: "`contracts` (default) is purchase orders, delivery orders, definitive contracts and blanket purchase agreement calls. `grants` is grants and cooperative agreements. `all` is every award type." },
@@ -22721,7 +22724,7 @@ export const ENDPOINTS = [
22721
22724
  pricing: { cost: 1, tier: "standard", ladderCost: 1, model: "ladder" },
22722
22725
  archetype: "Analytics",
22723
22726
  summary: "Get US federal spending by state, county or country",
22724
- description: "Returns how much the US federal government spent, by geography, for an industry, a product or service, or a topic. Data comes from USAspending.gov, the official US government source for federal spending. Narrow it with `naics` (industry), `psc` (product or service code) and `keyword`, or send none to see all spending. The window defaults to the last full US federal fiscal year and any window since 2007-10-01 is allowed. `award_type` is `contracts` by default, with `grants` and `all` available. `geo` picks the layer: `state` (USPS codes, with DC and territories), `county` (5 digit FIPS codes) or `country` (ISO alpha-3 codes, which is how foreign place of performance appears). `scope` chooses whether spending is placed where the work is done (`place_of_performance`, the default) or where the recipient is based (`recipient_location`). Amounts are US dollars of federal obligations recorded in the window. The response is `data.regions[]`, sorted by amount, largest first, each `{ code, name, amount, population, per_capita }` (the last two when the source publishes them), plus `data.total_amount`, `data.geo_layer` and a `data.filters` echo of what was applied. A combination with no spending returns 404 and is not billed.",
22727
+ description: "Returns how much the US federal government spent, by geography, for an industry, a product or service, or a topic. Data comes from USAspending.gov, the official US government source for federal spending. Narrow it with `naics` (industry), `psc` (product or service code) and `keyword`, or send none to see all spending. The window defaults to the most recent US federal fiscal year that ended at least 90 days ago (agencies report with a lag, so a year that just ended is only partly reported), and any window since 2007-10-01 is allowed. `award_type` is `contracts` by default, with `grants` and `all` available. `geo` picks the layer: `state` (USPS codes, with DC and territories), `county` (5 digit FIPS codes) or `country` (ISO alpha-3 codes, which is how foreign place of performance appears). `scope` chooses whether spending is placed where the work is done (`place_of_performance`, the default) or where the recipient is based (`recipient_location`). Amounts are US dollars of federal obligations recorded in the window. The response is `data.regions[]`, sorted by amount, largest first, each `{ code, name, amount, population, per_capita }` (the last two when the source publishes them), plus `data.total_amount`, `data.geo_layer` and a `data.filters` echo of what was applied. A combination with no spending returns 404 and is not billed.",
22725
22728
  budget_ms: 20000,
22726
22729
  cache: { category: "analytics", ttlSeconds: 21600 },
22727
22730
  upstream: { kind: "usaspending" },
@@ -22744,13 +22747,13 @@ export const ENDPOINTS = [
22744
22747
  { name: "keyword", type: "string", description: "Free-text match against award descriptions, 3 to 120 characters. Use it for a topic such as `travel` that no single industry code captures." },
22745
22748
  { name: "naics", type: "string", description: "Industry filter: one or more NAICS codes, comma-separated (up to 20). Each code must be 2, 4 or 6 digits, and a shorter code matches the whole family, so `4811` covers scheduled air transportation and `48` covers all transportation.", example: "4811" },
22746
22749
  { name: "psc", type: "string", description: "Product or service code filter: one or more codes, comma-separated (up to 20), 1 to 4 characters each. A shorter code matches the family, so `V` is all transportation, travel and relocation services and `V301` is travel agent services." },
22747
- { name: "from_date", type: "string", description: "Start of the window, `YYYY-MM-DD`, no earlier than 2007-10-01. Defaults to the first day of the last full US federal fiscal year (1 October). Send only this and the window runs to today." },
22748
- { name: "to_date", type: "string", description: "End of the window, `YYYY-MM-DD`. Defaults to the last day of the last full US federal fiscal year (30 September). Send only this and the window starts one year earlier." },
22750
+ { name: "from_date", type: "string", description: "Start of the window, `YYYY-MM-DD`, no earlier than 2007-10-01. Defaults to the first day of the most recent US federal fiscal year (1 October to 30 September) that ended at least 90 days ago, because agencies report with a lag and a year that just ended is only partly reported. Send only this and the window runs to today." },
22751
+ { name: "to_date", type: "string", description: "End of the window, `YYYY-MM-DD`. Defaults to the last day of the most recent US federal fiscal year that ended at least 90 days ago (30 September). Send only this and the window starts one year earlier." },
22749
22752
  { name: "type", type: "enum", enumValues: ["purchase_order", "delivery_order", "definitive_contract", "bpa_call", "all"], description: "Limit to one award type: `purchase_order`, `delivery_order`, `definitive_contract` or `bpa_call`. `all` (default) returns all four.", example: "purchase_order" },
22750
22753
  { name: "sort", type: "enum", enumValues: ["amount", "start_date", "end_date", "recipient"], description: "Sort field: `amount` (default), `start_date`, `end_date` or `recipient`." },
22751
22754
  { name: "order", type: "enum", enumValues: ["asc", "desc"], description: "`desc` (default) or `asc`." },
22752
22755
  { name: "limit", type: "integer", minimum: 1, maximum: 100, description: "Awards per page, 1 to 100. Defaults to 25.", example: "10" },
22753
- { name: "page", type: "integer", minimum: 1, description: "Page number, starting at 1. The universal `cursor` returned in `pagination.next_cursor` is the simpler way to continue." },
22756
+ { name: "page", type: "integer", minimum: 1, description: "Page number, starting at 1. `page` x `limit` cannot exceed 50,000, so with `limit` 100 the last page is 500 and a deeper page is a refunded 400. The universal `cursor` returned in `pagination.next_cursor` is the simpler way to continue." },
22754
22757
  ],
22755
22758
  oneOfGroups: [["recipient", "keyword", "naics", "psc"]],
22756
22759
  csvConstraints: { "naics": { max: 20 }, "psc": { max: 20 } },
@@ -22759,7 +22762,7 @@ export const ENDPOINTS = [
22759
22762
  pricing: { cost: 1, tier: "standard", ladderCost: 1, model: "ladder" },
22760
22763
  archetype: "SearchResult",
22761
22764
  summary: "Search US federal contract awards",
22762
- description: "Searches individual US federal contract awards (purchase orders, delivery orders, definitive contracts and blanket purchase agreement calls) from USAspending.gov, the official US government source for federal spending. Send at least one of `recipient` (a company name, matched as text), `keyword` (matched against the award description), `naics` or `psc`. The window defaults to the last full US federal fiscal year, and it matches awards with activity in that window, so `start_date` can be earlier and `amount` is the total value obligated to the award so far, not spend inside the window. Results come back under `data.items[]`, each `{ award_id, generated_id, type, recipient_name, recipient_uei, amount, awarding_agency, awarding_sub_agency, naics, psc, description, start_date, end_date, place_of_performance: { state, city, country }, url }`. `type` is `purchase_order`, `delivery_order`, `definitive_contract` or `bpa_call`. A foreign award has a null `place_of_performance.state`. Sorted by `amount`, largest first, unless you set `sort` and `order`. Paginate with `page` (1 based) or the universal `cursor`; the response's `pagination` block carries `has_more` and `next_cursor`. The source publishes no match count, so `data.total` appears on the last page only. No match is a 200 with an empty `items` and is not billed.",
22765
+ description: "Searches individual US federal contract awards (purchase orders, delivery orders, definitive contracts and blanket purchase agreement calls) from USAspending.gov, the official US government source for federal spending. Send at least one of `recipient` (a company name, matched as text), `keyword` (matched against the award description), `naics` or `psc`. The window defaults to the most recent US federal fiscal year that ended at least 90 days ago, and it matches awards with activity in that window, so `start_date` can be earlier and `amount` is the total value obligated to the award so far, not spend inside the window. Results come back under `data.items[]`, each `{ award_id, generated_id, type, recipient_name, recipient_uei, amount, awarding_agency, awarding_sub_agency, naics, psc, description, start_date, end_date, place_of_performance: { state, city, country }, url }`. `type` is `purchase_order`, `delivery_order`, `definitive_contract` or `bpa_call`. A foreign award has a null `place_of_performance.state`. Sorted by `amount`, largest first, unless you set `sort` and `order`. Paginate with `page` (1 based) or the universal `cursor`; the response's `pagination` block carries `has_more` and `next_cursor`. `data.total` is the full number of matching contracts. A search can be paged to 50,000 results (`page` x `limit`); a deeper page is a refunded 400, so narrow the filters to reach the rest. No match is a 200 with an empty `items` and is not billed.",
22763
22766
  budget_ms: 20000,
22764
22767
  pagination: { style: "page", nativeParam: "page", limitParam: "limit" },
22765
22768
  cache: { category: "search", ttlSeconds: 120 },