You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(news-search): premium full-text article search across worker, SDKs, MCP
New /api/premium/news/search (Tier 1, 1 credit) plus matching SDK and
MCP support so AI agents can ask "what happened with X in March?" in
one paid call instead of paginating the free /news endpoint themselves.
Worker (worker/src/news-search.ts):
- Tokenization strips stop words and tokens shorter than 2 chars
- Relevance score blends title hits (weight 3), snippet hits (weight 1),
and a recency boost in [0, 0.3] capped at score 1.0
- Filters: q (free text), from / to (YYYY-MM-DD UTC), provider
(substring match against source name and sourceDomain), category
(substring match), limit (1-100, default 25)
- Browse mode: omit q to get the latest filtered articles in
publishedAt desc with relevance 1
- Validation rejects malformed dates and from > to with 400
SDKs:
Python 1.7.0 tf.news_search(q=, from_date=, to_date=, provider=, category=, limit=)
TypeScript 1.6.0 tf.newsSearch({ q, from, to, provider, category, limit })
TS exports NewsSearchResponse + NewsSearchResultItem
MCP (1.2.0):
news_search tool with formatted text output (rank, title, source,
url, date, relevance, matched terms, snippet)
Tests: 15 new vitest cases for tokenization, scoring, filters, browse
mode, validation, and empty corpus. Total worker tests: 95.
Also restored proper X_ACCESS_TOKEN / GITHUB_TOKEN field names in
worker/src/payments.test.ts (an over-aggressive rename had renamed
them in a prior commit; runtime tests passed but tsc was unhappy).
Updated /api/meta, public/llms.txt, /developers/agent-payments,
CLAUDE.md, and all three READMEs.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
news-search.test.ts Vitest coverage for query mode, filters, browse mode, validation
46
48
podcasts.ts Podcast feed polling
47
49
trending.ts Trending GitHub repos
48
50
twitter.ts X/Twitter auto-posting
@@ -205,6 +207,7 @@ All mounted under `https://tensorfeed.ai/api/*` via the Worker.
205
207
-`/api/premium/watches` (GET): List watches owned by the bearer token. Free.
206
208
-`/api/premium/watches/{id}` (GET|DELETE): Read or remove an owned watch. Free.
207
209
-`/api/premium/agents/directory?category=&status=&open_source=&capability=&sort=&limit=`: Tier 1, 1 credit. Enriched agents catalog joined with live status, recent news (count + top 3), agent traffic, flagship pricing, and a derived trending_score. Sort options: trending, alphabetical, status, price_low, price_high, news_count.
210
+
-`/api/premium/news/search?q=&from=&to=&provider=&category=&limit=`: Tier 1, 1 credit. Full-text search over the article corpus with relevance scoring (term hits weighted 3 in title, 1 in snippet, plus recency boost) and date/provider/category filters. Default limit 25, max 100.
Copy file name to clipboardExpand all lines: mcp-server/package.json
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
{
2
2
"name": "@tensorfeed/mcp-server",
3
-
"version": "1.1.0",
4
-
"description": "MCP server for TensorFeed.ai - AI news, status, model data, and premium endpoints (routing, history series, webhook watches, enriched directory) for AI agents",
3
+
"version": "1.2.0",
4
+
"description": "MCP server for TensorFeed.ai - AI news, status, model data, and premium endpoints (routing, history series, news search, webhook watches, enriched directory) for AI agents",
'Full-text search over the TensorFeed news article corpus with optional date range, provider, and category filters. Relevance scoring with recency boost. Costs 1 credit.',
558
+
{
559
+
q: z.string().optional().describe('Free-text query, e.g. "claude opus pricing". Omit to browse latest filtered articles.'),
560
+
from: z.string().optional().describe('Start date YYYY-MM-DD UTC (inclusive)'),
561
+
to: z.string().optional().describe('End date YYYY-MM-DD UTC (inclusive end-of-day)'),
562
+
provider: z.string().optional().describe('Substring match against source name and domain (e.g. "anthropic", "openai", "techcrunch")'),
563
+
category: z.string().optional().describe('Substring match against article categories'),
564
+
limit: z.number().min(1).max(100).optional().describe('Max results (default 25, max 100)'),
565
+
},
566
+
async({ q, from, to, provider, category, limit })=>{
Copy file name to clipboardExpand all lines: public/llms.txt
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -56,6 +56,7 @@ TensorFeed accepts USDC on Base as the sole payment method for premium endpoints
56
56
- [Premium History Compare](https://tensorfeed.ai/api/premium/history/compare): Tier 1, 1 credit per call. Diff between two daily snapshots: added, removed, and changed entries with deltas. Params: `?from=YYYY-MM-DD&to=YYYY-MM-DD&type=pricing|benchmarks`.
57
57
- [Premium Watches](https://tensorfeed.ai/api/premium/watches): Tier 1, 1 credit per registration. Webhook alerts for price changes (`{ type: "price", model, field: "inputPrice"|"outputPrice"|"blended", op: "lt"|"gt"|"changes", threshold? }`) or service status transitions (`{ type: "status", provider, op: "becomes"|"changes", value? }`). POST `{ spec, callback_url, secret? }` to register, GET to list, GET/DELETE on `/api/premium/watches/{id}` for individual control. Each watch lives 90 days, fires up to 100 times by default, delivers a signed POST to the callback URL with `X-TensorFeed-Signature: sha256=<hex>` and an `X-TensorFeed-Watch-Id` header. Listing and per-watch read/delete require the bearer token but cost no credits.
58
58
- [Premium Agents Directory](https://tensorfeed.ai/api/premium/agents/directory): Tier 1, 1 credit per call. The agents catalog joined with live status, recent news count + top 3 articles, agent traffic stats, flagship pricing, and a derived `trending_score` (0-100). Server-side filter (`?category=&status=&open_source=&capability=`) and sort (`?sort=trending|alphabetical|status|price_low|price_high|news_count`). Default `limit=50`, max 100.
59
+
- [Premium News Search](https://tensorfeed.ai/api/premium/news/search): Tier 1, 1 credit per call. Full-text search over the news corpus with relevance scoring (term hits in title weighted 3, snippet 1, plus recency boost). Filters: `?q=&from=YYYY-MM-DD&to=YYYY-MM-DD&provider=&category=&limit=`. Omit `q` to browse latest filtered articles in publishedAt desc. Stop words and short tokens are stripped. Each result includes title, url, source, snippet, published_at, relevance, and matched_terms. Default `limit=25`, max 100.
59
60
60
61
**Recommended flow:** POST `/api/payment/buy-credits`, send USDC, POST `/api/payment/confirm`, then use the returned token for all premium calls. **Fallback (x402):** call any `/api/premium/*` endpoint without auth to receive a 402 response with payment instructions; send USDC and retry with `X-Payment-Tx: <txHash>` header.
Copy file name to clipboardExpand all lines: sdk/javascript/package.json
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
{
2
2
"name": "tensorfeed",
3
-
"version": "1.5.0",
3
+
"version": "1.6.0",
4
4
"description": "JavaScript/TypeScript SDK for the TensorFeed.ai API: AI news, status, model pricing, benchmarks, premium history series, webhook watches, and agent-payable premium routing (USDC on Base)",
description = "Python SDK for the TensorFeed.ai API: AI news, status, model pricing, premium routing + history series + webhook watches, agent payments via USDC on Base (optional web3 auto-send)"
0 commit comments