curl --request POST \
--url https://local-news.newscatcherapi.com/api/latest_headlines \
--header 'Content-Type: application/json' \
--header 'x-api-token: <api-key>' \
--data '
{
"when": "7d",
"locations": [
"New York City, New York",
"Los Angeles, California"
],
"detection_methods": [
"dedicated_source",
"proximity_mention",
"ai_extracted"
],
"lang": [
"en",
"es"
],
"countries": [
"US",
"CA"
],
"sources": [
"nytimes.com",
"theguardian.com"
],
"not_sources": [
"cnn.com",
"wsj.com"
],
"parent_url": [
"wsj.com/politics",
"wsj.com/tech"
],
"is_paid_content": false,
"page": 2,
"page_size": 100,
"word_count_min": 300,
"word_count_max": 1000,
"clustering": true,
"theme": [
"Business",
"Finance"
],
"content_type": [
"news"
],
"PER_entity_name": "\"Elon Musk\" OR \"Jeff Bezos\"",
"LOC_entity_name": "\"San Francisco\" OR \"New York City\"",
"MISC_entity_name": "AWS OR \"Microsoft Azure\"",
"ORG_entity_name": "\"Apple Inc\" OR Microsoft",
"title_sentiment_min": -0.5,
"title_sentiment_max": 0.5,
"content_sentiment_min": -0.5,
"content_sentiment_max": 0.5,
"include_translation_fields": true
}
'import requests
url = "https://local-news.newscatcherapi.com/api/latest_headlines"
payload = {
"when": "7d",
"locations": ["New York City, New York", "Los Angeles, California"],
"detection_methods": ["dedicated_source", "proximity_mention", "ai_extracted"],
"lang": ["en", "es"],
"countries": ["US", "CA"],
"sources": ["nytimes.com", "theguardian.com"],
"not_sources": ["cnn.com", "wsj.com"],
"parent_url": ["wsj.com/politics", "wsj.com/tech"],
"is_paid_content": False,
"page": 2,
"page_size": 100,
"word_count_min": 300,
"word_count_max": 1000,
"clustering": True,
"theme": ["Business", "Finance"],
"content_type": ["news"],
"PER_entity_name": "\"Elon Musk\" OR \"Jeff Bezos\"",
"LOC_entity_name": "\"San Francisco\" OR \"New York City\"",
"MISC_entity_name": "AWS OR \"Microsoft Azure\"",
"ORG_entity_name": "\"Apple Inc\" OR Microsoft",
"title_sentiment_min": -0.5,
"title_sentiment_max": 0.5,
"content_sentiment_min": -0.5,
"content_sentiment_max": 0.5,
"include_translation_fields": True
}
headers = {
"x-api-token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
when: '7d',
locations: ['New York City, New York', 'Los Angeles, California'],
detection_methods: ['dedicated_source', 'proximity_mention', 'ai_extracted'],
lang: ['en', 'es'],
countries: ['US', 'CA'],
sources: ['nytimes.com', 'theguardian.com'],
not_sources: ['cnn.com', 'wsj.com'],
parent_url: ['wsj.com/politics', 'wsj.com/tech'],
is_paid_content: false,
page: 2,
page_size: 100,
word_count_min: 300,
word_count_max: 1000,
clustering: true,
theme: ['Business', 'Finance'],
content_type: ['news'],
PER_entity_name: '"Elon Musk" OR "Jeff Bezos"',
LOC_entity_name: '"San Francisco" OR "New York City"',
MISC_entity_name: 'AWS OR "Microsoft Azure"',
ORG_entity_name: '"Apple Inc" OR Microsoft',
title_sentiment_min: -0.5,
title_sentiment_max: 0.5,
content_sentiment_min: -0.5,
content_sentiment_max: 0.5,
include_translation_fields: true
})
};
fetch('https://local-news.newscatcherapi.com/api/latest_headlines', 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://local-news.newscatcherapi.com/api/latest_headlines",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'when' => '7d',
'locations' => [
'New York City, New York',
'Los Angeles, California'
],
'detection_methods' => [
'dedicated_source',
'proximity_mention',
'ai_extracted'
],
'lang' => [
'en',
'es'
],
'countries' => [
'US',
'CA'
],
'sources' => [
'nytimes.com',
'theguardian.com'
],
'not_sources' => [
'cnn.com',
'wsj.com'
],
'parent_url' => [
'wsj.com/politics',
'wsj.com/tech'
],
'is_paid_content' => false,
'page' => 2,
'page_size' => 100,
'word_count_min' => 300,
'word_count_max' => 1000,
'clustering' => true,
'theme' => [
'Business',
'Finance'
],
'content_type' => [
'news'
],
'PER_entity_name' => '"Elon Musk" OR "Jeff Bezos"',
'LOC_entity_name' => '"San Francisco" OR "New York City"',
'MISC_entity_name' => 'AWS OR "Microsoft Azure"',
'ORG_entity_name' => '"Apple Inc" OR Microsoft',
'title_sentiment_min' => -0.5,
'title_sentiment_max' => 0.5,
'content_sentiment_min' => -0.5,
'content_sentiment_max' => 0.5,
'include_translation_fields' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://local-news.newscatcherapi.com/api/latest_headlines"
payload := strings.NewReader("{\n \"when\": \"7d\",\n \"locations\": [\n \"New York City, New York\",\n \"Los Angeles, California\"\n ],\n \"detection_methods\": [\n \"dedicated_source\",\n \"proximity_mention\",\n \"ai_extracted\"\n ],\n \"lang\": [\n \"en\",\n \"es\"\n ],\n \"countries\": [\n \"US\",\n \"CA\"\n ],\n \"sources\": [\n \"nytimes.com\",\n \"theguardian.com\"\n ],\n \"not_sources\": [\n \"cnn.com\",\n \"wsj.com\"\n ],\n \"parent_url\": [\n \"wsj.com/politics\",\n \"wsj.com/tech\"\n ],\n \"is_paid_content\": false,\n \"page\": 2,\n \"page_size\": 100,\n \"word_count_min\": 300,\n \"word_count_max\": 1000,\n \"clustering\": true,\n \"theme\": [\n \"Business\",\n \"Finance\"\n ],\n \"content_type\": [\n \"news\"\n ],\n \"PER_entity_name\": \"\\\"Elon Musk\\\" OR \\\"Jeff Bezos\\\"\",\n \"LOC_entity_name\": \"\\\"San Francisco\\\" OR \\\"New York City\\\"\",\n \"MISC_entity_name\": \"AWS OR \\\"Microsoft Azure\\\"\",\n \"ORG_entity_name\": \"\\\"Apple Inc\\\" OR Microsoft\",\n \"title_sentiment_min\": -0.5,\n \"title_sentiment_max\": 0.5,\n \"content_sentiment_min\": -0.5,\n \"content_sentiment_max\": 0.5,\n \"include_translation_fields\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-token", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://local-news.newscatcherapi.com/api/latest_headlines")
.header("x-api-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"when\": \"7d\",\n \"locations\": [\n \"New York City, New York\",\n \"Los Angeles, California\"\n ],\n \"detection_methods\": [\n \"dedicated_source\",\n \"proximity_mention\",\n \"ai_extracted\"\n ],\n \"lang\": [\n \"en\",\n \"es\"\n ],\n \"countries\": [\n \"US\",\n \"CA\"\n ],\n \"sources\": [\n \"nytimes.com\",\n \"theguardian.com\"\n ],\n \"not_sources\": [\n \"cnn.com\",\n \"wsj.com\"\n ],\n \"parent_url\": [\n \"wsj.com/politics\",\n \"wsj.com/tech\"\n ],\n \"is_paid_content\": false,\n \"page\": 2,\n \"page_size\": 100,\n \"word_count_min\": 300,\n \"word_count_max\": 1000,\n \"clustering\": true,\n \"theme\": [\n \"Business\",\n \"Finance\"\n ],\n \"content_type\": [\n \"news\"\n ],\n \"PER_entity_name\": \"\\\"Elon Musk\\\" OR \\\"Jeff Bezos\\\"\",\n \"LOC_entity_name\": \"\\\"San Francisco\\\" OR \\\"New York City\\\"\",\n \"MISC_entity_name\": \"AWS OR \\\"Microsoft Azure\\\"\",\n \"ORG_entity_name\": \"\\\"Apple Inc\\\" OR Microsoft\",\n \"title_sentiment_min\": -0.5,\n \"title_sentiment_max\": 0.5,\n \"content_sentiment_min\": -0.5,\n \"content_sentiment_max\": 0.5,\n \"include_translation_fields\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://local-news.newscatcherapi.com/api/latest_headlines")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"when\": \"7d\",\n \"locations\": [\n \"New York City, New York\",\n \"Los Angeles, California\"\n ],\n \"detection_methods\": [\n \"dedicated_source\",\n \"proximity_mention\",\n \"ai_extracted\"\n ],\n \"lang\": [\n \"en\",\n \"es\"\n ],\n \"countries\": [\n \"US\",\n \"CA\"\n ],\n \"sources\": [\n \"nytimes.com\",\n \"theguardian.com\"\n ],\n \"not_sources\": [\n \"cnn.com\",\n \"wsj.com\"\n ],\n \"parent_url\": [\n \"wsj.com/politics\",\n \"wsj.com/tech\"\n ],\n \"is_paid_content\": false,\n \"page\": 2,\n \"page_size\": 100,\n \"word_count_min\": 300,\n \"word_count_max\": 1000,\n \"clustering\": true,\n \"theme\": [\n \"Business\",\n \"Finance\"\n ],\n \"content_type\": [\n \"news\"\n ],\n \"PER_entity_name\": \"\\\"Elon Musk\\\" OR \\\"Jeff Bezos\\\"\",\n \"LOC_entity_name\": \"\\\"San Francisco\\\" OR \\\"New York City\\\"\",\n \"MISC_entity_name\": \"AWS OR \\\"Microsoft Azure\\\"\",\n \"ORG_entity_name\": \"\\\"Apple Inc\\\" OR Microsoft\",\n \"title_sentiment_min\": -0.5,\n \"title_sentiment_max\": 0.5,\n \"content_sentiment_min\": -0.5,\n \"content_sentiment_max\": 0.5,\n \"include_translation_fields\": true\n}"
response = http.request(request)
puts response.read_body{
"status": "ok",
"total_hits": 123,
"page": 123,
"total_pages": 123,
"page_size": 123,
"articles": [],
"user_input": {}
}{
"message": "Invalid JSON in request body",
"status_code": 400,
"status": "Bad request"
}{
"message": "Invalid api key: INVALID_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 ErrorRetrieve latest headlines
Retrieves the most recent news headlines for the specific locations and times. You can filter results by language, source, theme, and more.
curl --request POST \
--url https://local-news.newscatcherapi.com/api/latest_headlines \
--header 'Content-Type: application/json' \
--header 'x-api-token: <api-key>' \
--data '
{
"when": "7d",
"locations": [
"New York City, New York",
"Los Angeles, California"
],
"detection_methods": [
"dedicated_source",
"proximity_mention",
"ai_extracted"
],
"lang": [
"en",
"es"
],
"countries": [
"US",
"CA"
],
"sources": [
"nytimes.com",
"theguardian.com"
],
"not_sources": [
"cnn.com",
"wsj.com"
],
"parent_url": [
"wsj.com/politics",
"wsj.com/tech"
],
"is_paid_content": false,
"page": 2,
"page_size": 100,
"word_count_min": 300,
"word_count_max": 1000,
"clustering": true,
"theme": [
"Business",
"Finance"
],
"content_type": [
"news"
],
"PER_entity_name": "\"Elon Musk\" OR \"Jeff Bezos\"",
"LOC_entity_name": "\"San Francisco\" OR \"New York City\"",
"MISC_entity_name": "AWS OR \"Microsoft Azure\"",
"ORG_entity_name": "\"Apple Inc\" OR Microsoft",
"title_sentiment_min": -0.5,
"title_sentiment_max": 0.5,
"content_sentiment_min": -0.5,
"content_sentiment_max": 0.5,
"include_translation_fields": true
}
'import requests
url = "https://local-news.newscatcherapi.com/api/latest_headlines"
payload = {
"when": "7d",
"locations": ["New York City, New York", "Los Angeles, California"],
"detection_methods": ["dedicated_source", "proximity_mention", "ai_extracted"],
"lang": ["en", "es"],
"countries": ["US", "CA"],
"sources": ["nytimes.com", "theguardian.com"],
"not_sources": ["cnn.com", "wsj.com"],
"parent_url": ["wsj.com/politics", "wsj.com/tech"],
"is_paid_content": False,
"page": 2,
"page_size": 100,
"word_count_min": 300,
"word_count_max": 1000,
"clustering": True,
"theme": ["Business", "Finance"],
"content_type": ["news"],
"PER_entity_name": "\"Elon Musk\" OR \"Jeff Bezos\"",
"LOC_entity_name": "\"San Francisco\" OR \"New York City\"",
"MISC_entity_name": "AWS OR \"Microsoft Azure\"",
"ORG_entity_name": "\"Apple Inc\" OR Microsoft",
"title_sentiment_min": -0.5,
"title_sentiment_max": 0.5,
"content_sentiment_min": -0.5,
"content_sentiment_max": 0.5,
"include_translation_fields": True
}
headers = {
"x-api-token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
when: '7d',
locations: ['New York City, New York', 'Los Angeles, California'],
detection_methods: ['dedicated_source', 'proximity_mention', 'ai_extracted'],
lang: ['en', 'es'],
countries: ['US', 'CA'],
sources: ['nytimes.com', 'theguardian.com'],
not_sources: ['cnn.com', 'wsj.com'],
parent_url: ['wsj.com/politics', 'wsj.com/tech'],
is_paid_content: false,
page: 2,
page_size: 100,
word_count_min: 300,
word_count_max: 1000,
clustering: true,
theme: ['Business', 'Finance'],
content_type: ['news'],
PER_entity_name: '"Elon Musk" OR "Jeff Bezos"',
LOC_entity_name: '"San Francisco" OR "New York City"',
MISC_entity_name: 'AWS OR "Microsoft Azure"',
ORG_entity_name: '"Apple Inc" OR Microsoft',
title_sentiment_min: -0.5,
title_sentiment_max: 0.5,
content_sentiment_min: -0.5,
content_sentiment_max: 0.5,
include_translation_fields: true
})
};
fetch('https://local-news.newscatcherapi.com/api/latest_headlines', 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://local-news.newscatcherapi.com/api/latest_headlines",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'when' => '7d',
'locations' => [
'New York City, New York',
'Los Angeles, California'
],
'detection_methods' => [
'dedicated_source',
'proximity_mention',
'ai_extracted'
],
'lang' => [
'en',
'es'
],
'countries' => [
'US',
'CA'
],
'sources' => [
'nytimes.com',
'theguardian.com'
],
'not_sources' => [
'cnn.com',
'wsj.com'
],
'parent_url' => [
'wsj.com/politics',
'wsj.com/tech'
],
'is_paid_content' => false,
'page' => 2,
'page_size' => 100,
'word_count_min' => 300,
'word_count_max' => 1000,
'clustering' => true,
'theme' => [
'Business',
'Finance'
],
'content_type' => [
'news'
],
'PER_entity_name' => '"Elon Musk" OR "Jeff Bezos"',
'LOC_entity_name' => '"San Francisco" OR "New York City"',
'MISC_entity_name' => 'AWS OR "Microsoft Azure"',
'ORG_entity_name' => '"Apple Inc" OR Microsoft',
'title_sentiment_min' => -0.5,
'title_sentiment_max' => 0.5,
'content_sentiment_min' => -0.5,
'content_sentiment_max' => 0.5,
'include_translation_fields' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://local-news.newscatcherapi.com/api/latest_headlines"
payload := strings.NewReader("{\n \"when\": \"7d\",\n \"locations\": [\n \"New York City, New York\",\n \"Los Angeles, California\"\n ],\n \"detection_methods\": [\n \"dedicated_source\",\n \"proximity_mention\",\n \"ai_extracted\"\n ],\n \"lang\": [\n \"en\",\n \"es\"\n ],\n \"countries\": [\n \"US\",\n \"CA\"\n ],\n \"sources\": [\n \"nytimes.com\",\n \"theguardian.com\"\n ],\n \"not_sources\": [\n \"cnn.com\",\n \"wsj.com\"\n ],\n \"parent_url\": [\n \"wsj.com/politics\",\n \"wsj.com/tech\"\n ],\n \"is_paid_content\": false,\n \"page\": 2,\n \"page_size\": 100,\n \"word_count_min\": 300,\n \"word_count_max\": 1000,\n \"clustering\": true,\n \"theme\": [\n \"Business\",\n \"Finance\"\n ],\n \"content_type\": [\n \"news\"\n ],\n \"PER_entity_name\": \"\\\"Elon Musk\\\" OR \\\"Jeff Bezos\\\"\",\n \"LOC_entity_name\": \"\\\"San Francisco\\\" OR \\\"New York City\\\"\",\n \"MISC_entity_name\": \"AWS OR \\\"Microsoft Azure\\\"\",\n \"ORG_entity_name\": \"\\\"Apple Inc\\\" OR Microsoft\",\n \"title_sentiment_min\": -0.5,\n \"title_sentiment_max\": 0.5,\n \"content_sentiment_min\": -0.5,\n \"content_sentiment_max\": 0.5,\n \"include_translation_fields\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-token", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://local-news.newscatcherapi.com/api/latest_headlines")
.header("x-api-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"when\": \"7d\",\n \"locations\": [\n \"New York City, New York\",\n \"Los Angeles, California\"\n ],\n \"detection_methods\": [\n \"dedicated_source\",\n \"proximity_mention\",\n \"ai_extracted\"\n ],\n \"lang\": [\n \"en\",\n \"es\"\n ],\n \"countries\": [\n \"US\",\n \"CA\"\n ],\n \"sources\": [\n \"nytimes.com\",\n \"theguardian.com\"\n ],\n \"not_sources\": [\n \"cnn.com\",\n \"wsj.com\"\n ],\n \"parent_url\": [\n \"wsj.com/politics\",\n \"wsj.com/tech\"\n ],\n \"is_paid_content\": false,\n \"page\": 2,\n \"page_size\": 100,\n \"word_count_min\": 300,\n \"word_count_max\": 1000,\n \"clustering\": true,\n \"theme\": [\n \"Business\",\n \"Finance\"\n ],\n \"content_type\": [\n \"news\"\n ],\n \"PER_entity_name\": \"\\\"Elon Musk\\\" OR \\\"Jeff Bezos\\\"\",\n \"LOC_entity_name\": \"\\\"San Francisco\\\" OR \\\"New York City\\\"\",\n \"MISC_entity_name\": \"AWS OR \\\"Microsoft Azure\\\"\",\n \"ORG_entity_name\": \"\\\"Apple Inc\\\" OR Microsoft\",\n \"title_sentiment_min\": -0.5,\n \"title_sentiment_max\": 0.5,\n \"content_sentiment_min\": -0.5,\n \"content_sentiment_max\": 0.5,\n \"include_translation_fields\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://local-news.newscatcherapi.com/api/latest_headlines")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"when\": \"7d\",\n \"locations\": [\n \"New York City, New York\",\n \"Los Angeles, California\"\n ],\n \"detection_methods\": [\n \"dedicated_source\",\n \"proximity_mention\",\n \"ai_extracted\"\n ],\n \"lang\": [\n \"en\",\n \"es\"\n ],\n \"countries\": [\n \"US\",\n \"CA\"\n ],\n \"sources\": [\n \"nytimes.com\",\n \"theguardian.com\"\n ],\n \"not_sources\": [\n \"cnn.com\",\n \"wsj.com\"\n ],\n \"parent_url\": [\n \"wsj.com/politics\",\n \"wsj.com/tech\"\n ],\n \"is_paid_content\": false,\n \"page\": 2,\n \"page_size\": 100,\n \"word_count_min\": 300,\n \"word_count_max\": 1000,\n \"clustering\": true,\n \"theme\": [\n \"Business\",\n \"Finance\"\n ],\n \"content_type\": [\n \"news\"\n ],\n \"PER_entity_name\": \"\\\"Elon Musk\\\" OR \\\"Jeff Bezos\\\"\",\n \"LOC_entity_name\": \"\\\"San Francisco\\\" OR \\\"New York City\\\"\",\n \"MISC_entity_name\": \"AWS OR \\\"Microsoft Azure\\\"\",\n \"ORG_entity_name\": \"\\\"Apple Inc\\\" OR Microsoft\",\n \"title_sentiment_min\": -0.5,\n \"title_sentiment_max\": 0.5,\n \"content_sentiment_min\": -0.5,\n \"content_sentiment_max\": 0.5,\n \"include_translation_fields\": true\n}"
response = http.request(request)
puts response.read_body{
"status": "ok",
"total_hits": 123,
"page": 123,
"total_pages": 123,
"page_size": 123,
"articles": [],
"user_input": {}
}{
"message": "Invalid JSON in request body",
"status_code": 400,
"status": "Bad request"
}{
"message": "Invalid api key: INVALID_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.
Body
Common parameters shared across standard endpoints.
The location detection methods to filter results by:
dedicated_source: Identifies locations based on sources exclusively covering a specific location.local_section: Identifies locations through location-specific sections within larger publications.regional_source: Identifies locations using regional context from state-level publications.standard_format: Identifies locations written in standard formats like "City, State" or "City, County".proximity_mention: Identifies cities and states mentioned within 15 words of each other.ai_extracted: Identifies locations through AI-based content analysis. Requires AI Extraction plan.
For detailed information, see Location detection methods.
dedicated_source, local_section, regional_source, standard_format, proximity_mention, ai_extracted [
"dedicated_source",
"proximity_mention",
"ai_extracted"
]
The language(s) of the search. The only accepted format is the two-letter ISO 639-1 code. To select multiple languages, use a comma-separated string or an array of strings.
To learn more, see Enumerated parameters > Language.
["en", "es"]
The countries where the news publisher is located. The accepted format is the two-letter ISO 3166-1 alpha-2 code. To select multiple countries, use a comma-separated string or an array of strings.
To learn more, see Enumerated parameters > Country.
["US", "CA"]
Filters articles by content completeness.
If false, returns only articles for which full-text content is publicly available. If true, returns all indexed articles, including those where only partial content is publicly available (e.g., headlines, summaries, or preview paragraphs from paywalled sources).
Note: NewsCatcher indexes content that is publicly accessible and available for crawling in accordance with publisher access controls (e.g., robots.txt and similar mechanisms). For paywalled sources, only content that publishers make publicly available (such as headlines, summaries, or preview text) is indexed. NewsCatcher does not bypass paywalls, authentication systems, or other technical access restrictions.
false
If true, groups similar articles into clusters and returns clustered results. If false, returns individual articles without clustering.
To learn more, see Clustering news articles.
true
Filters articles based on their general topic, as determined by NLP analysis. To select multiple themes, use a comma-separated string or an array of strings.
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.
["Business", "Finance"]
Filters articles by content type, the kind of page the article is, as determined by NLP analysis. To select multiple content types, use a comma-separated string or an array of strings. Values are case-insensitive. If not set, articles of all content types are returned.
Shortcuts:
news:news_report,analysis, andinterview.all: no content type filter.
Note: Content type labels are available for articles from October 17, 2026. Later in Q4 2026, articles back to January 1, 2026, will be labelled too. Articles without a label are not returned when this filter is set. An unknown value returns a 422 error.
To learn more, see Content types.
Available options: news_report, analysis, interview, opinion, press_release, listicle, service, commerce, review, autogen, seo_spam, obituary, ugc, non_article, news, all.
["news"]
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 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 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 the latest headlines since the specified time. The response may include clustering information if enabled.
- Latest Headlines Response
- Clustered Latest Headlines Response
The response model for the Latest headlines request.
Was this page helpful?

