Comment on page
v3 Latest Headlines
Get the latest headlines given any topic, country, source, or language
get
https://v3-api.newscatcherapi.com/api/
latest_headlines?when=1h&by_parse_date=false&page=1&page_size=100
Get Latest Headlines
Parameters
Query
when
string
The time period you want to get the latest headlines for.
Accepted forms:
-
7d
=> Dailly Form (last 7 days time period), 30d
(last 30 days time period)
- 1h
=> Hourly Form (last hour), 24h
(last 24 hours)
Default: The number of historic data available for your subscription planby_parse_date
boolean
When set to
True
, transforms your when parameters to filter by parse_date instead of published_date.
Be aware that a new variable parse_date will be added to the output list with each article.
lang
array
Specifies the languages of the search. For example,
en
.
The only accepted format is ISO 639-1 — 2 letter code.
Refer to the Allowed Languages section for more details.countries
array
Countries where the news publisher is located.
Important: This parameter is not responsible for the countries mentioned in the news article.
One or multiple countries can be used in the search.
The only acceptable format is ISO 3166-1 alpha-2
For example,
US,CA,MX
or just US
not_countries
array
The inverse of the
countries
parameter.sources
array
One or more news resources to filter your search. It should be the normal form of the URL,
For example,
nytimes.com,theguardian.com
predefined_sources
string
Use our TOP predefined sources per country.
Later, we will improve it and add more functionality, like top categories.
The format should be strictly like this:
-starting with the word
top
-put the number of desired sources on top source
For example:
top 100 US
top 33 AT
top 5 GB
It is also possible to put multiple countries with a custom number of top sources, which should be comma-separated.
For example:
top 100 US, GB
top 33 AT, 55 IT
not_sources
array
One or more sources to be excluded from the search.
Comma-separated list. For example,
wsj.com
ranked_only
string
Default:
True
Limit the search only for the sources which are in the top 1 million online websites. Unranked sources are assigned a rank that equals 999999
is_headline
boolean
When set to
True
, only articles that were posted on the home page of a given news domain will be shown.is_paid_content
boolean
[Still in development phase]
When set to
False
, only articles that publish full public available content will be shown.
Some news publishers partially block content of their articles, so we get only several sentences from them. This filter will help you get full content.
parent_url
array
One or more categorical URL to filter your search. It should be the normal form of the URL,
For example,
https://www.washingtonpost.com/politics
,
https://www.washingtonpost.com/technology,https://www.washingtonpost.com/business
theme
string
[Available only if NLP enabled for your plan]
Accepted values:
Business
, Economics
, Entertainment
, Finance
, Health
, Politics
, Science
, Sports
, Tech
, Crime
, Lifestyle
, Automotive
, Travel
, Weather
, General
Comma-separated string or a list/array.
Multiple themes can be selected.
For example:
Business
Business
, Finance
Topic labelling is based on the actual content of an article.
word_count_min
integer
Set a minimum number of words that an article must contain.
word_count_max
integer
Set a maximum number of words that an article must contain.
page_size
integer
[1:100]
How many articles to return per page.page
integer
The number of the page. Use it to scroll through the results.
This parameter is used to paginate: scroll through results because one API response cannot return more than 100 articles.
include_nlp_data
boolean
[Available only if NLP is enabled for your plan]
When set to
True
, adds to each article an NLP layer.
Not available for all plans. Please get in touch with us to enable it.
has_nlp
boolean
[Available only if NLP is enabled for your plan]
When set to
True
, filter data only to articles with an NLP layer.title_sentiment_min
float
[Available only if NLP is enabled for your plan]
You can narrow your search to only positive or negative news based on the article's title sentiment.
The value can vary from
-1
to 1
.title_sentiment_max
float
[Available only if NLP is enabled for your plan]
You can narrow your search to only positive or negative news based on the article's title sentiment.
The value can vary from
-1
to 1
content_sentiment_min
float
[Available only if NLP is enabled for your plan]
Narrow your search to only positive or negative news based on the article's content sentiment.
The value can vary from
-1
to 1
. content_sentiment_max
float
[Available only if NLP is enabled for your plan]
Narrow your search to only positive or negative news based on the article's content sentiment.
The value can vary from
-1
to 1
. Header
x-api-token
string
Your unique authentication token
Responses
200
Success
400: Bad Request
API Call without "x-api-key" in headers
401
Invalid API Key
406: Not Acceptable
Unsupported Parameters
408: Request Timeout
Request Timeout
429: Too Many Requests
Too many API calls
post
https://v3-api.newscatcherapi.com/api/
latest_headlines
Get Latest Headlines
JSON format query input
Parameters
Query
when
string
The time period you want to get the latest headlines for.
Accepted forms:
-
7d
=> Dailly Form (last 7 days time period), 30d
(last 30 days time period)
- 1h
=> Hourly Form (last hour), 24h
(last 24 hours)
Default: The number of historic data available for your subscription planby_parse_date
boolean
When set to
True
, transforms your when parameters to filter by parse_date instead of published_date.
Be aware that a new variable parse_date will be added to the output list with each article.
lang
array
Specifies the languages of the search. For example,
en
.
The only accepted format is ISO 639-1 — 2 letter code.
Refer to the Allowed Languages section for more details.countries
array
Countries where the news publisher is located.
Important: This parameter is not responsible for the countries mentioned in the news article.
One or multiple countries can be used in the search.
The only acceptable format is ISO 3166-1 alpha-2
For example,
US,CA,MX
or just US
not_countries
array
The inverse of the
countries
parameter.sources
array
One or more news resources to filter your search. It should be the normal form of the URL,
For example,
nytimes.com,theguardian.com
predefined_sources
string
Use our TOP predefined sources per country.
Later, we will improve it and add more functionality, like top categories.
The format should be strictly like this:
-starting with the word
top
-put the number of desired sources on top source
For example:
top 100 US
top 33 AT
top 5 GB
It is also possible to put multiple countries with a custom number of top sources, which should be comma-separated.
For example:
top 100 US, GB
top 33 AT, 55 IT
not_sources
array
One or more sources to be excluded from the search.
Comma-separated list. For example,
wsj.com
ranked_only
string
Default:
True
Limit the search only for the sources which are in the top 1 million online websites. Unranked sources are assigned a rank that equals 999999
is_headline
boolean
When set to
True
, only articles that were posted on the home page of a given news domain will be shown.is_paid_content
boolean
[Still in development phase]
When set to
False
, only articles that publish full public available content will be shown.
Some news publishers partially block content of their articles, so we get only several sentences from them. This filter will help you get full content.
parent_url
array
One or more categorical URL to filter your search. It should be the normal form of the URL,
For example,
https://www.washingtonpost.com/politics
,
https://www.washingtonpost.com/technology,https://www.washingtonpost.com/business
theme
string
[Available only if NLP enabled for your plan]
Accepted values:
Business
, Economics
, Entertainment
, Finance
, Health
, Politics
, Science
, Sports
, Tech
, Crime
, Lifestyle
, Automotive
, Travel
, Weather
, General
Comma-separated string or a list/array.
Multiple themes can be selected.
For example:
Business
Business
, Finance
Topic labelling is based on the actual content of an article.
word_count_min
word_count_max
page_size
integer
[1:100]
How many articles to return per page.page
integer
The number of the page. Use it to scroll through the results.
This parameter is used to paginate: scroll through results because one API response cannot return more than 100 articles.
include_nlp_data
boolean
[Available only if NLP is enabled for your plan]
When set to
True
, adds to each article an NLP layer.
Not available for all plans. Please get in touch with us to enable it.
has_nlp
boolean
[Available only if NLP is enabled for your plan]
When set to
True
, filter data only to articles with an NLP layer.title_sentiment_min
float
[Available only if NLP is enabled for your plan]
You can narrow your search to only positive or negative news based on the article's title sentiment.
The value can vary from
-1
to 1
.title_sentiment_max
float
[Available only if NLP is enabled for your plan]
You can narrow your search to only positive or negative news based on the article's title sentiment.
The value can vary from
-1
to 1
content_sentiment_min
float
[Available only if NLP is enabled for your plan]
Narrow your search to only positive or negative news based on the article's content sentiment.
The value can vary from
-1
to 1
. content_sentiment_max
float
[Available only if NLP is enabled for your plan]
Narrow your search to only positive or negative news based on the article's content sentiment.
The value can vary from
-1
to 1
. Header
x-api-token
string
Your unique authentication token
Responses
200
Success
400: Bad Request
API Call without "x-api-key" in headers
401
Invalid API Key
406: Not Acceptable
Unsupported Parameters
408: Request Timeout
Request Timeout
429: Too Many Requests
Too many API calls
{
"status": "ok",
"total_hits": 10000,
"page": 1,
"total_pages": 100,
"page_size": 100,
"articles": [
{
"title": "Închisoare cu suspendare pentru poliţistul care beat fiind a provocat un accident mortal la ieşirea din Sfântu Gheorghe",
"author": "webmagnat",
"authors": [
"webmagnat"
],
"published_date": "2023-09-19 07:12:37",
"published_date_precision": "timezone unknown",
"updated_date": "2023-09-19 07:12:37",
"updated_date_precision": "timezone unknown",
"link": "https://www.ziarulevenimentul.ro/stiri/actualitate/inchisoare-cu-suspendare-pentru-politistul-care-beat-fiind-a-provocat-un-accident-mortal-la-iesirea-din-sfantu-gheorghe--217551875.html",
"domain_url": "ziarulevenimentul.ro",
"full_domain_url": "ziarulevenimentul.ro",
"name_source": "Ziarul Evenimentul",
"is_headline": false,
"paid_content": false,
"parent_url": "https://www.ziarulevenimentul.ro/stiri",
"country": "RO",
"rights": "ziarulevenimentul.ro",
"rank": 248945,
"media": "https://www.ziarulevenimentul.ro/app/gethumbnew.php?id=1076758&w=800&h=600",
"language": "ro",
"description": "Judecatoria Sfantu Gheorghe a publicat saptamana trecuta sentinta in cazul accidentului mortal care a avut loc pe data de 2 decembrie 2021 la iesir",
"content": "OMV forțează azi la Palatul Victoria modificarea legii offshore Premierul Ciolacu o aburește cu importurile de cereale din Ucraina Un general SIE și 2 șefi ai Electrica vând curent Bani pentru agricultorii ieşeni afectaţi de secetă Încă 200 de bolnavi de COVID, la Iaşi Mijloacele de transport ale CTP vor avea sisteme anti-coliziune Studenţii de la USV au început cursurile Orientation Days, în acest weekend, la UMF Iașul nu ia în calcul interzicerea trotinetelor electrice Cum să-ți dai singur foc la valiza...nucleară Politehnica Iași, ca un om beat într-o noapte de sâmbătă Alimente 'rele' care te ajută să dormi bine Ministrul Sănătății, atacat pe Facebook 5 tipuri de rochii pe care trebuie să le ai în garderobă Se schimbă Legea pensiilor de serviciu Tenorul Ştefan von Korch cântă la Nuremberg în concertul DOR Sporurile bugetarilor vor fi plafonate Ce este Dorje și cum se folosește Expoziție de pictură și obiect, la Palatul Culturii Glăsuiri din trecut. Tainele meseriilor uitate",
"word_count": 159,
"is_opinion": false,
"twitter_account": null,
"all_links": [
"https://twitter.com/ZiarEvenimentul",
"https://www.facebook.com/ZiarEvenimentul/",
"https://carflexicredit.ro/imprumuturi/",
"https://www.cramahermeziu.ro/struguri-must/ ",
"https://ec.europa.eu/consumers/odr/main/index.cfm?event=main.home2.show&lng=RO",
"https://anpc.ro/ce-este-sal/",
"https://www.linkedin.com/company/ziarul-evenimentul/about/",
"https://ro.pinterest.com/evenimentul/",
"https://twitter.com/ziarevenimentul",
"https://www.instagram.com/ziarul_evenimentul/"
],
"all_domain_links": [
"linkedin.com",
"twitter.com",
"facebook.com",
"europa.eu",
"instagram.com",
"anpc.ro",
"cramahermeziu.ro",
"carflexicredit.ro",
"pinterest.com"
],
"id": "a8fb6ec10bef83c0216ec6f798685294",
"score": 0
},
...
],
'user_input': {
...}}
Last modified 3d ago