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: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.
OR, and minus-prefixed
exclusions:
empty_query instead of
quietly returning no results.
Query parameters
See Search news for the generated request playground and
complete schema.
Response
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_availabletells you whethercontentis present.content_truncatedis true when Clair capped the returned snippet at 2,000 characters.descriptionis publisher-provided summary metadata when available.image_urlandauthorsare nullable/empty when the publisher did not provide reliable values.categoryis a deterministic source/section category. Cross-cutting events such as elections, crimes, conflicts, and disasters remain keyword queries.is_updatemarks a later in-place revision of the same publisher URL.relevance_scoreis a query-local value from 0 to 1. It is not a probability and isnullwhenqis absent.
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
Whennext_cursor is not null, repeat the exact search and pass the cursor
unchanged:
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:
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.