Integrate your Newslit News Briefs into your application or website through a single & simple HTTP REST API.
You can display a series of stories from a live News Brief. Briefs are created by adding relevant keywords (topics, filters & exclusions) and are updated every few hours with new content.
Within the API you can specify
To make any requests you’ll need an API account. API accounts are tied to a Newslit user account.
An API account has an API key. This key will give you access to News Briefs for the respective user.
The following endpoints are currently available:
GET /briefs
- get a list of all briefs tied to your API accountGET /briefs/:brief_id
- get a specific brief information (topics, filters, exclusions and any other metadata)GET /briefs/:brief_id/stories
- get stories from a specific briefAuthentication is handled with a simple API key. The API key should be attached to a request in the header field as X-NewslitApiKey
.
curl -H "X-NewslitApiKey: YOUR_API_KEY" \
-H "X-RapidAPI-Key: YOUR_RAPIDAPI_KEY"
-H "X-RapidAPI-Host: news-briefs-read-only.p.rapidapi.com"
-X GET "https://news-briefs-read-only.p.rapidapi.com/briefs"
Responses return a json object. Successful responses will always have a meta
field containing request metadata as well a data
field containing any response data.
Relevant HTTP status codes are used where possible for every response.
If something goes wrong with the request, we will return a relevant HTTP status code along side a json object containing an errors
field with a human readable description of what has gone wrong.
For example, if a request supplies an incorrect API key you’ll receive a 401 Unauthorized
code with the following response:
{
"errors": [
{
"title": "Missing or invalid API key",
"status": "401"
}
]
}