Appearance
API
Base URLs:
- Production:
https://api.cryptowi.re - Local:
http://localhost:3001
Quick Start
Get headlines from selected sources:
sh
curl "https://api.cryptowi.re/news?sources=coindesk,decrypt,cointelegraph&limit=20"Use source ids from References > Sources.
Public Endpoints
GET /news
Returns normalized news items.
Query params:
sources(required, comma-separated source ids; see References > Sources)limit(default30, max effective100)cursor(optional, use the last itemidfrom the previous page)retentionDays(max effective7)category(optional category filter)
Example:
sh
curl "https://api.cryptowi.re/news?sources=coindesk,decrypt,cointelegraph&limit=20"Cursor pagination example:
sh
# Page 1
curl "https://api.cryptowi.re/news?sources=coindesk&category=Markets&limit=20"
# Page 2 (set cursor to the last item id from page 1)
curl "https://api.cryptowi.re/news?sources=coindesk&category=Markets&limit=20&cursor=coindesk-20260227-001"Notes:
cursorshould be the last returned item id from the same query shape.- Keep
sources,category, andretentionDaysthe same between pages when usingcursorto avoid skips and duplicates. - Missing
sourcesreturns400. - Any invalid source id in
sourcesreturns400(for examplecoindesk,bad-source).
Status codes:
200success400invalid or missing query params (including invalid source ids)
Example response:
json
{
"items": [
{
"id": "coindesk-20260227-001",
"title": "Bitcoin ETFs See Fresh Inflows as Volatility Cools",
"summary": "Analysts point to steady institutional demand as crypto markets stabilize.",
"url": "https://www.coindesk.com/example-article",
"source": "CoinDesk",
"categories": ["Markets"],
"publishedAt": "2026-02-27T19:20:00.000Z",
"imageUrl": "https://cdn.example.com/image.jpg"
}
]
}GET /news/sources
Returns all supported source ids and names. Use this first to build your sources query.
Example:
sh
curl "https://api.cryptowi.re/news/sources"Example response:
json
{
"sources": [
{ "id": "coindesk", "name": "CoinDesk" },
{ "id": "decrypt", "name": "Decrypt" },
{ "id": "cointelegraph", "name": "Cointelegraph" }
]
}Status codes:
200success
GET /news/categories
Returns available categories for selected sources.
Query params:
sources(required, comma-separated source ids; see References > Sources)
Example:
sh
curl "https://api.cryptowi.re/news/categories?sources=coindesk,decrypt"Example response:
json
{
"categories": ["Markets", "Policy", "Technology"]
}Status codes:
200success400missingsources, invalid source ids, or malformedsourcesquery
GET /news/status
Returns refresh status metadata.
Example:
sh
curl "https://api.cryptowi.re/news/status"Example response:
json
{
"lastRefreshAt": "2026-02-27T19:20:00.000Z",
"now": "2026-02-27T19:25:00.000Z"
}Status codes:
200success
GET /news/item/:id
Returns one normalized news item by id.
Example:
sh
curl "https://api.cryptowi.re/news/item/coindesk-20260227-001"Status codes:
200success400invalid path param404item not found
GET /news/summary
Returns the latest generated summary of recent headlines.
Example:
sh
curl "https://api.cryptowi.re/news/summary"Example response:
json
{
"generatedAt": "2026-02-27T19:00:00.000Z",
"windowStart": "2026-02-26T19:00:00.000Z",
"windowEnd": "2026-02-27T19:00:00.000Z",
"windowHours": 24,
"articleCount": 180,
"model": "unknown-model",
"aiError": null,
"summary": "Crypto markets were mixed over the last 24 hours, with Bitcoin holding key levels while altcoins diverged.",
"highlights": [
{
"title": "ETF flows improve",
"detail": "US spot Bitcoin ETFs posted net inflows after two muted sessions.",
"sources": ["CoinDesk", "Decrypt"],
"url": "https://www.coindesk.com/example-article"
}
],
"sourceCoverage": [
{
"sourceId": "coindesk",
"source": "CoinDesk",
"articleCount": 25,
"reputationWeight": 0.95
}
]
}Status codes:
200success503summary not available yet (typically before first refresh in production)
GET /prices
Returns the latest stored quotes for requested symbols.
Notes:
- This endpoint serves cached/stored values (KV in production, memory fallback otherwise).
- It does not fetch CoinGecko on each request.
- Prices are updated by calling
POST /prices/refresh(typically from a scheduled workflow). - Before the first successful refresh, it returns
503.
Query params:
symbols(comma-separated, exampleBTC,ETH,SOL)
Example:
sh
curl "https://api.cryptowi.re/prices?symbols=BTC,ETH,SOL"Example response:
json
{
"quotes": [
{
"symbol": "BTC",
"usd": 86123.45,
"usd24hChange": 2.1,
"fetchedAt": "2026-02-27T19:20:00.000Z"
},
{
"symbol": "ETH",
"usd": 4620.17,
"usd24hChange": 1.4,
"fetchedAt": "2026-02-27T19:20:00.000Z"
}
]
}Status codes:
200success400invalid query params503prices not ready yet (before first successful refresh)
GET /prices/status
Returns price refresh readiness metadata.
Example:
sh
curl "https://api.cryptowi.re/prices/status"Example response:
json
{
"lastRefreshAt": "2026-02-27T19:20:00.000Z",
"quoteCount": 8,
"ready": true,
"now": "2026-02-27T19:25:00.000Z"
}Status codes:
200success
GET /market
Returns market overview stats.
Example:
sh
curl "https://api.cryptowi.re/market"Example response:
json
{
"ok": true,
"overview": {
"marketCapUsd": 3123456789012,
"marketCapChange24hPct": 1.4,
"volume24hUsd": 154321098765,
"btcDominancePct": 52.3,
"updatedAt": 1740684000,
"fearGreed": {
"value": 71,
"classification": "Greed",
"timestamp": 1740684000
}
}
}Status codes:
200success502upstream service unavailable
GET /health
Health check endpoint.
Example:
sh
curl "https://api.cryptowi.re/health"Example response:
json
{ "ok": true }Status codes:
200success
GET /rss.xml
RSS feed of latest headlines.
Example:
sh
curl "https://api.cryptowi.re/rss.xml"Status codes:
200success
Admin Endpoints
These endpoints are for refresh and diagnostics workflows.
Authorization:
- In production, send
x-refresh-secretand matchNEWS_REFRESH_SECRET. - In non-production, if
NEWS_REFRESH_SECRETis unset, these endpoints are allowed without that header.
POST /news/refresh
Body fields:
limit(optional, default30, max effective100)retentionDays(optional, max effective7)sources(optional, comma-separated source ids; see References > Sources)force(optional boolean:true/false/1/0)
Notes:
- If
sourcesis omitted, or none of the supplied ids are valid, all supported sources are fetched.
Example:
sh
curl -X POST "https://api.cryptowi.re/news/refresh" \
-H "content-type: application/json" \
-H "x-refresh-secret: YOUR_SECRET" \
--data-raw '{"limit":30,"retentionDays":7,"force":true,"sources":"coindesk,decrypt,cointelegraph"}'Status codes:
200success400invalid body401unauthorized405wrong method (GET /news/refresh)
POST /prices/refresh
Body fields:
symbols(optional, comma-separated symbols; defaultBTC,ETH,SOL,BNB,XRP,ADA,DOGE,AVAX)
Example:
sh
curl -X POST "https://api.cryptowi.re/prices/refresh" \
-H "content-type: application/json" \
-H "x-refresh-secret: YOUR_SECRET" \
--data-raw '{"symbols":"BTC,ETH,SOL,BNB,XRP,ADA,DOGE,AVAX"}'Status codes:
200success400invalid body401unauthorized405wrong method (GET /prices/refresh)
POST /news/summary/refresh
Body fields:
hours(optional, default24, max72)limit(optional, default180, max effective250)sources(optional, comma-separated source ids; see References > Sources)force(optional boolean:true/false/1/0)
Notes:
- If
sourcesis omitted, or none of the supplied ids are valid, all supported sources are used. - Returns
{ "ok": true, "skipped": true, ... }when a fresh summary already exists andforceis not set.
Example:
sh
curl -X POST "https://api.cryptowi.re/news/summary/refresh" \
-H "content-type: application/json" \
-H "x-refresh-secret: YOUR_SECRET" \
--data-raw '{"hours":24,"limit":180,"sources":"coindesk,decrypt"}'Status codes:
200success400invalid body401unauthorized405wrong method (GET /news/summary/refresh)
POST /news/diagnose
Body fields:
limit(optional, default5, max200)sources(optional, comma-separated source ids forwarded to upstream probe)
Example:
sh
curl -X POST "https://api.cryptowi.re/news/diagnose" \
-H "content-type: application/json" \
-H "x-refresh-secret: YOUR_SECRET" \
--data-raw '{"limit":100,"sources":"coindesk,decrypt"}'Status codes:
200success400invalid body401unauthorized405wrong method (GET /news/diagnose)