Get a curated news feed

Changed on

Returns a curated, ranked news feed for a fixed topic. The topic path segment selects the feed; an optional q filters it by keyword. results are ordered by relevance (a semantic pass tuned to the topic, weighted toward fresher articles); news holds the same articles in strict reverse-chronological order. images includes article images when available. When a pre-written brief exists for the topic it is returned in aiSummary (also in answer); a response to a q request carries no brief. Choose the output with format: json (default), context (markdown for LLMs), rss (RSS 2.0), embed (an HTML widget) or ticker (a scrolling headline bar). Links that cannot send a header, such as an <iframe> or a feed reader, use a feed key in the key query parameter with rss, embed or ticker. GET /api/v1/news lists the topics.

get/api/v1/news/{topic}

Request

  • Base URL
    https://api.andiai.com
  • URL
    https://api.andiai.com/api/v1/news/{topic}
  • Auth
    API key in header x-api-key

Path parameters

topic'technology' | 'business' | 'finance' | 'politics' | 'sports' | 'health' | 'science' | 'world' | 'entertainment' | 'us' | 'europe' | 'uk' | 'asia' | 'middle-east' | 'africa' | 'latin-america' | 'australia' | 'programming' | 'startups' | 'media' | 'crypto' | 'legal' | 'space' | 'top' | 'hn-frontpage' | 'ai-news' | 'tech-news' required

Topic slug selecting the feed.

Query parameters

limitinteger

Number of results to return. Values outside 1–50 are clamped.

format'json' | 'context' | 'rss' | 'embed' | 'ticker'

Output format. json returns the response object. context returns markdown for language models (text/markdown), with the topic brief as a ## Summary block. rss returns an RSS 2.0 feed (application/rss+xml), with the brief in an andi:aiSummary element. embed returns a self-contained HTML widget (text/html). ticker returns a self-contained scrolling headline bar (text/html). Both can be loaded in an <iframe> with a feed key in the key parameter. A feed key works only with rss, embed and ticker. Any other value returns 400.

qstring

Keyword filter within the topic, ranked against your query. Up to 200 characters. A response to a q request carries no brief (aiSummary is absent and answer is empty).

querystring

Alias of q.

hoursinteger

Recency window in hours. Values outside 1–336 are clamped. Defaults to 48; format=ticker defaults to 24 unless q is set.

langstring

Language code (for example en, es), or all for every language. An unrecognised value falls back to en.

summaryboolean

Set to 0 or false to leave the topic brief out of this response (aiSummary is dropped and answer is empty).

detail'full'

Set to full to get the topic's detailed brief. Only topics that list detail: ["full"] in GET /api/v1/news have one (currently startups and space); other topics return their standard brief.

extractsboolean

Include stored text passages from each article, in extracts[]. Defaults to true for format=context and when content=true; pass extracts=false to turn them off. Nothing is fetched live; the text comes from pages Andi has already stored.

contentboolean

Include each article's stored full text in reader.markdown. Also turns on extracts unless extracts=false is passed. Billed per token, as on search.

maxContentLengthinteger

Maximum number of characters of reader.markdown to return per article. Only applies when content=true.

metadata'basic' | 'full'

Metadata level for format=context. basic is the default.

titlestring

format=embed only: heading shown in the widget. Up to 80 characters.

tzstring

format=embed only: IANA time zone for displayed times, for example America/New_York.

theme'light' | 'dark'

format=ticker only: colour theme.

speedinteger

format=ticker only: scroll speed, from 20 to 200.

labelstring

format=ticker only: short text shown on the ticker's label block.

keystring

A feed key, for links that cannot send a header (an <iframe>, a dashboard, a feed reader). Works only with format=rss, embed or ticker, and on GET /api/v1/news. Any other format, or no format, returns 403. A full API key in a URL returns 403: send it in the x-api-key header instead. Treat a feed-key link like a password.

noCacheboolean

Bypass the cache and fetch a fresh feed.

Response

Curated news feed in the requested format.

results_typestring required

The type of results returned (e.g., Search, News, Weather, Calculator). Determines which optional response sections are present.

answerstring required

Instant answer for the query when one is found — for example a definition, a weather line or a calculation — otherwise an empty string. On news feeds, a short summary of the headlines when available.

typestring required

Same as results_type. Indicates the category of results.

titlestring required

Your query text (for a news feed, the feed's description).

correctedQuerystring

Spell-corrected query. Present when a misspelling in the original query is detected and corrected — any mode can return it; deep and exhaustive modes run the strongest spell correction.

related_searchesstring[]

Related search suggestions. Present on some queries.

topicsstring[]

Related topics. Present on some queries.

related_topicsstring[]

Related topic names for entity answers.

Example response

{
  "locale": {
    "language": "de",
    "country": "DE"
  }
}

Changes

    • info

      added the optional property // to the response with the status

    • info

      added the optional property // to the response with the status

    • info

      added the optional property // to the response with the status

    • info

      added the optional property // to the response with the status

    • info

      added the optional property // to the response with the status

    • info

      added the optional property // to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property // to the response with the status

    • info

      added the optional property // to the response with the status

    • info

      added the optional property // to the response with the status

    • info

      added the optional property // to the response with the status

    • info

      added the optional property // to the response with the status

    • info

      added the optional property // to the response with the status

    • info

      added the optional property // to the response with the status

    • info

      added the optional property // to the response with the status

    • info

      added the optional property // to the response with the status

    • info

      added the optional property // to the response with the status

    • info

      added the optional property // to the response with the status

    • info

      added the optional property // to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status