News Feed

GET/gateway/v1/news/feed

Returns crypto news from major sources.

Filters: `source` (enum), `project`, and time range (`from`/`to`).

Sort: `recency` (default) or `trending`.

Use the detail endpoint with article `id` for full content.

Query Parameters

sourceenum<string>

Filter by news source

Available options:coindeskcointelegraphtheblockdecryptdlnewsblockbeatsbitcoincomcoinpediaambcryptocryptodailycryptopotatophemexpanewsodailytradingviewchaincatchertechflow
Example: coindesk
projectstring

Comma-separated project names to filter by

Example: bitcoin,ethereum
fromstring

Filter articles published on or after this time. Accepts Unix seconds or date string (2024-01-01)

Example: 2024-01-01
tostring

Filter articles published on or before this time. Accepts Unix seconds or date string (2024-02-01)

Example: 2024-02-01
sort_byenum<string>

Sort order: recency (newest first) or trending (deterministic newest-first alias until engagement ranking is available)

Available options:recencytrending
Example: recency
limitinteger

Results per page (max 50)

Example: 20
offsetinteger

Pagination offset

Example: 0
News Feed
const options = {method: 'GET'};

fetch('https://api.asksurf.ai/gateway/v1/news/feed?source=coindesk&project=bitcoin,ethereum&from=2024-01-01&to=2024-02-01&sort_by=recency&limit=20&offset=0', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
OK
{
  "$schema": "https://example.com/schemas/DataResponseNewsArticleItem.json",
  "data": [
    {
      "highlights": {},
      "id": "<string>",
      "project_id": "<string>",
      "project_name": "<string>",
      "published_at": 123,
      "source": "<string>",
      "summary": "<string>",
      "title": "<string>",
      "url": "<string>"
    }
  ],
  "meta": {
    "cached": true,
    "credits_used": 123,
    "empty_reason": "<string>",
    "has_more": true,
    "limit": 123,
    "offset": 123,
    "total": 123,
    "watermark": 123
  }
}