curl --request GET \
--url https://v3-api.newscatcherapi.com/api/breaking_news \
--header 'x-api-token: <api-key>'import requests
url = "https://v3-api.newscatcherapi.com/api/breaking_news"
headers = {"x-api-token": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-token': '<api-key>'}};
fetch('https://v3-api.newscatcherapi.com/api/breaking_news', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://v3-api.newscatcherapi.com/api/breaking_news",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-token: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://v3-api.newscatcherapi.com/api/breaking_news"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-token", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://v3-api.newscatcherapi.com/api/breaking_news")
.header("x-api-token", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://v3-api.newscatcherapi.com/api/breaking_news")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-token"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"status": "<string>",
"total_hits": 123,
"page": 123,
"total_pages": 123,
"page_size": 123,
"breaking_news_events": [],
"user_input": {}
}{
"message": "Invalid JSON in request body",
"status_code": 400,
"status": "Bad request"
}{
"message": "The 'x-api-token' parameter has an invalid value. Please provide a valid API key.",
"status_code": 401,
"status": "Unauthorized"
}{
"message": "Your plan request date range cannot be greater than 400 days",
"status_code": 403,
"status": "Forbidden"
}{
"message": "Request timed out after 30 seconds",
"status_code": 408,
"status": "Request timeout"
}{
"message": "Invalid date format",
"status_code": 422,
"status": "Validation error"
}{
"message": "Max API requests concurrency reached",
"status_code": 429,
"status": "Too many requests"
}Internal Server ErrorGet breaking news
Retrieves breaking news articles and sorts them based on specified criteria.
curl --request GET \
--url https://v3-api.newscatcherapi.com/api/breaking_news \
--header 'x-api-token: <api-key>'import requests
url = "https://v3-api.newscatcherapi.com/api/breaking_news"
headers = {"x-api-token": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-token': '<api-key>'}};
fetch('https://v3-api.newscatcherapi.com/api/breaking_news', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://v3-api.newscatcherapi.com/api/breaking_news",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-token: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://v3-api.newscatcherapi.com/api/breaking_news"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-token", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://v3-api.newscatcherapi.com/api/breaking_news")
.header("x-api-token", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://v3-api.newscatcherapi.com/api/breaking_news")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-token"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"status": "<string>",
"total_hits": 123,
"page": 123,
"total_pages": 123,
"page_size": 123,
"breaking_news_events": [],
"user_input": {}
}{
"message": "Invalid JSON in request body",
"status_code": 400,
"status": "Bad request"
}{
"message": "The 'x-api-token' parameter has an invalid value. Please provide a valid API key.",
"status_code": 401,
"status": "Unauthorized"
}{
"message": "Your plan request date range cannot be greater than 400 days",
"status_code": 403,
"status": "Forbidden"
}{
"message": "Request timed out after 30 seconds",
"status_code": 408,
"status": "Request timeout"
}{
"message": "Invalid date format",
"status_code": 422,
"status": "Validation error"
}{
"message": "Max API requests concurrency reached",
"status_code": 429,
"status": "Too many requests"
}Internal Server ErrorAuthorizations
API Key to authenticate requests.
To access the API, include your API key in the x-api-token header.
To obtain your API key, complete the form or contact us directly.
Query Parameters
The page number to scroll through the results. Use for pagination, as a single API response can return up to 1,000 articles.
For details, see Retrieve large datasets
x >= 12
If true, includes an NLP object for each article in the response. This object provides results of NLP analysis, including article theme, summary, sentiment, tags, and named entity recognition if available.
Note: NLP data is only available for articles indexed from July 2023 onward. For articles indexed before July 2023, the nlp field is returned as an empty object {}.
To learn more, see NLP Enrichments.
true
If true, filters results to include only articles that have NLP data.
Note: NLP data is only available for articles indexed from July 2023 onward. Applying this filter to a date range that predates July 2023 returns zero results.
To learn more, see NLP Enrichments.
true
Filters articles based on their general topic, as determined by NLP analysis. To select multiple themes, use a comma-separated string.
To learn more, see NLP Enrichments.
Available options: Business, Economics, Entertainment, Finance, Health, Politics, Science, Sports, Tech, Crime, Financial Crime, Lifestyle, Automotive, Travel, Weather, General.
"Finance,Tech"
Inverse of the theme parameter. Excludes articles based on their general topic, as determined by NLP analysis. To exclude multiple themes, use a comma-separated string.
To learn more, see NLP Enrichments.
"Crime,Sports"
Filters articles by content type: the kind of page an article is, as determined by NLP analysis. To select multiple content types, use a comma-separated string. Values are case-insensitive, and an article is returned if it matches any of them.
Available options: news_report, analysis, interview, opinion, press_release, listicle, service, commerce, review, autogen, seo_spam, obituary, ugc, non_article. Shortcuts: news selects news_report, analysis, and interview; all applies no filter.
Note: Articles without a content type label are excluded whenever content_type is set. An unknown value returns a 422 error.
To learn more, see Content types.
"news"
Filters articles that mention specific organization names, as identified by NLP analysis.
- To specify multiple organizations, use
AND,OR,NOToperators, and\"escape literals for exact matches. - To search in translations, combine with the translation options of the
search_inparameter (e.g.,title_content_translated).
To learn more, see Search by entity.
"\"Apple Inc\" OR Microsoft"
Filters articles that mention specific person names, as identified by NLP analysis.
- To specify multiple names, use
AND,OR,NOToperators, and\"escape literals for exact matches. - To search in translations, combine with the translation options of the
search_inparameter (e.g.,title_content_translated).
To learn more, see Search by entity.
"\"Elon Musk\" OR \"Jeff Bezos\""
Filters articles that mention specific location names, as identified by NLP analysis.
- To specify multiple locations, use
AND,OR,NOToperators, and\"escape literals for exact matches. - To search in translations, combine with the translation options of the
search_inparameter (e.g.,title_content_translated).
To learn more, see Search by entity.
"\"San Francisco\" OR \"New York City\""
Filters articles that mention other named entities not falling under person, organization, or location categories. Includes events, nationalities, products, works of art, and more.
- To specify multiple entities, use
AND,OR,NOToperators, and\"escape literals for exact matches. - To search in translations, combine with the translation options of the
search_inparameter (e.g.,title_content_translated).
To learn more, see Search by entity.
"AWS OR \"Microsoft Azure\""
Filters articles based on the minimum sentiment score of their titles.
Range is -1.0 to 1.0, where:
- Negative values indicate negative sentiment.
- Positive values indicate positive sentiment.
- Values close to 0 indicate neutral sentiment.
To learn more, see NLP Enrichments.
-1 <= x <= 1-0.5
Filters articles based on the maximum sentiment score of their titles.
Range is -1.0 to 1.0, where:
- Negative values indicate negative sentiment.
- Positive values indicate positive sentiment.
- Values close to 0 indicate neutral sentiment.
To learn more, see NLP Enrichments.
-1 <= x <= 10.5
Filters articles based on the minimum sentiment score of their content.
Range is -1.0 to 1.0, where:
- Negative values indicate negative sentiment.
- Positive values indicate positive sentiment.
- Values close to 0 indicate neutral sentiment.
To learn more, see NLP Enrichments.
-1 <= x <= 1-0.5
Filters articles based on the maximum sentiment score of their content.
Range is -1.0 to 1.0, where:
- Negative values indicate negative sentiment.
- Positive values indicate positive sentiment.
- Values close to 0 indicate neutral sentiment.
To learn more, see NLP Enrichments.
-1 <= x <= 10.5
Response
A successful response containing breaking news articles with additional breaking news event information.
The response model for the breaking news requests. Response field behavior:
- Required fields are guaranteed to be present and non-null.
- Optional fields may be
nullorundefinedif the data point is not presented or couldn't be extracted during processing. - To access article properties in the
articlesresponse array, use array index notation. For example,articles[n].title, wherenis the zero-based index of the article object (0, 1, 2, etc.). - The
nlpproperty within the article objectarticles[n].nlpis only available with NLP-enabled subscription plans.
Was this page helpful?

