Sources
GET /v3/sources returns the full catalog of news sources available to your key. Use it to build source pickers, to learn which sources are searched by default, and to look up the details behind article.source.domain.
Every plan can call this endpoint. Each request costs 1 credit, like an article request. This includes a 304 Not Modified and error responses. Not charged: 401 and the monthly 429 itself. See Rate Limits & Credits. The catalog changes rarely, so fetch it once and keep it, for example for a day.
List sources
The request takes no parameters. The answer is the whole catalog, sorted by domain, as {"sources": [...]}. There is no paging.
The order is alphabetical but not strictly by bytes: punctuation can be ignored when sorting (english.kyodonews.net comes before en.mercopress.com, and www.bbc.com before www.bbc.co.uk). Sort again on your side if you need an exact order.
The source object
- Name
domain- Type
- string
- Description
The source's domain, for example
www.reuters.com. It is the join key toarticle.source.domain, and the value you pass insources,optInSourcesandexcludeSourceswhen you search.
- Name
name- Type
- string | null
- Description
Display name, for example
Reuters.nullwhen the source has no curated name yet.
- Name
type- Type
- string | null
- Description
The source type:
newswire,press_release,financial_media,general_media,aggregator,blogorgovernment.nullwhen the source is not classified. The list is open: treat an unknown value as a valid string.
- Name
isDefault- Type
- boolean
- Description
truewhen the source is in the default set, which is searched without naming it. Custom sources granted to you (isCustom: true) are searched without naming them too. All other sources are added per request withoptInSources(or by naming them insources). Every plan can do that. See Which sources you can use.
- Name
isCustom- Type
- boolean
- Description
truefor a custom source granted to your subscription. Custom sources that were not granted to you are not listed.
- Name
country- Type
- string | null
- Description
Origin country of the source, as ISO 3166-1 alpha-2.
- Name
languages- Type
- string[]
- Description
Languages the source publishes in, as ISO 639-1 codes, most common first. Can be
[].
type here is read live. The source.type on an article is the type the source had when the article was stored, so the two can differ for a while after a source is reclassified. See Source Types.
Caching
The answer carries a weak ETag header (W/"...") and no Cache-Control. Send the stored value back in If-None-Match. If the catalog is unchanged, the answer is 304 Not Modified with an empty body. A 304 costs 1 credit and counts toward the burst limit, like every request. A 304 only comes when the request does not send Cache-Control: no-cache. Browser and Node fetch add that header to conditional requests on their own, so send Cache-Control: max-age=0 together with If-None-Match.
Errors
| Status | code | When |
|---|---|---|
| 401 | UNAUTHORIZED | Missing or invalid API key |
| 429 | RATE_LIMITED | Burst limit or monthly credits used up |
See Errors for the problem+json shape.
Request
curl 'https://api.finlight.me/v3/sources' \
-H 'X-API-KEY: YOUR_API_KEY'
Response
{
"sources": [
{
"domain": "finance.yahoo.com",
"name": "Yahoo Finance",
"type": "aggregator",
"isDefault": true,
"isCustom": false,
"country": "US",
"languages": ["en"]
},
{
"domain": "www.prnewswire.com",
"name": "PR Newswire",
"type": "press_release",
"isDefault": true,
"isCustom": false,
"country": "US",
"languages": ["en"]
},
{
"domain": "www.reuters.com",
"name": "Reuters",
"type": "newswire",
"isDefault": true,
"isCustom": false,
"country": "GB",
"languages": ["en"]
}
// ...
]
}
Which sources you can use
There are three kinds of sources:
| Kind | In the catalog | Who can use it | How you get its articles |
|---|---|---|---|
| Default | isDefault: true | Every plan | Without naming it. |
| Non-default (opt-in) | isDefault: false, isCustom: false | Every plan | You opt in by naming the source. |
| Custom | isCustom: true | Only subscriptions the source was granted to | Without naming it, like a default source. |
- Default only means that you do not have to opt in.
- Non-default sources are the less common ones. They are not a paid extra. Every plan can opt in to them: in a REST search with
optInSources, withsourcesor with asource:oroptInSources:condition in the query. For live WebSocket frames and webhooks, name the source in the query withsource:. See Search Articles, Subscribe & filter and Webhook criteria. - Custom sources are not available to everyone. Without a grant you do not get their articles in any way: not in a search, not on a WebSocket, not in a webhook and not from an article lookup. Naming such a source in
sources, inoptInSources, in asource:condition or with*does not change that. The request is still accepted. It just returns nothing from that source. Custom sources that were not granted to you are not listed in this catalog either.
Using the catalog
- Search inside a source type. Filter articles with
sourceTypesorexcludeSourceTypesinstead of listing domains. See Source Types. - Add a non-default source. Pass its
domaininoptInSources. Every plan can do that. See Search Articles. - Join to articles.
article.source.domainmatchesdomainexactly.
Related: Source Types · Plans & Entitlements · Rate Limits & Credits