Skip to main content
The Clair News API exposes two read-only endpoints over a continuously maintained news index: Clair collects and cleans publisher material in the background. Public requests query the prebuilt index only. They never crawl a URL supplied by a caller, contact a publisher during the request, or invoke an embedding model.

Base URL and authentication

The News API is distributed through RapidAPI. Send your key and the News API host on every request:
RapidAPI owns key issuance, plan quotas, rate limiting, and billing. There is no separate Clair account.
Use the exact host shown on the RapidAPI listing. The Jobs API is a separate listing with a separate host, even when you use the same RapidAPI key.

Search or walk the corpus

q is optional:
  • With q, Clair runs English full-text search across title and cleaned content. Title matches receive more weight.
  • Without q, Clair returns the canonical corpus newest first. This is the simplest path for polling or maintaining a local mirror.
The query syntax supports quoted phrases, uppercase OR, and minus-prefixed exclusions:
A query that contains only English stop words returns empty_query instead of quietly returning no results.

Query parameters

See Search news for the generated request playground and complete schema.

Response

The sample values are illustrative.

Content and revision semantics

content is a bounded cleaned snippet when extraction succeeded, a feed excerpt when one was available, or null when neither was available. Clair does not expose a full-article archive.
  • content_available tells you whether content is present.
  • content_truncated is true when Clair capped the returned snippet at 2,000 characters.
  • description is publisher-provided summary metadata when available.
  • image_url and authors are nullable/empty when the publisher did not provide reliable values.
  • category is a deterministic source/section category. Cross-cutting events such as elections, crimes, conflicts, and disasters remain keyword queries.
  • is_update marks a later in-place revision of the same publisher URL.
  • relevance_score is a query-local value from 0 to 1. It is not a probability and is null when q is absent.
By default, Clair returns only the canonical version of each publisher URL. Set include_edits=true when a revision history matters to your application. published_at is the publisher time. collected_at is when Clair ingested that record. Both preserve microseconds in the response and cursor.

Cursor pagination

When next_cursor is not null, repeat the exact search and pass the cursor unchanged:
The cursor is bound to the query, filters, sort, and revision mode that created it. Changing any of them while reusing the cursor returns bad_cursor. Stop when next_cursor is null. Exact totals are intentionally absent from the request path. Walk next_cursor for a stable result stream rather than depending on a broad archive count.

Sources

GET /v1/sources returns active names alphabetically:
Pass those strings exactly to sources or exclude_sources. An unknown name returns unknown_source rather than silently producing an empty page.

Errors

Product-handler failures use { "error": "...", "detail": "..." }. Authorization and gateway failures may contain only error. Branch on the stable code; detail is human-readable and may change. Validation failures return an array of details, while typed failures return a string. Origin responses include X-Request-ID. Include it when reporting a problem. Honor Retry-After on 503 responses and retry with backoff.