
π Documentation & Examples
Everything you need to integrate with News Catcher API
π Quick Start Examples
// News Catcher API API Example
const response = await fetch('https://newscatcherapi.com/', {
method: 'GET',
headers: {
'Content-Type': 'application/json'
}
});
const data = await response.json();
console.log(data);Introducing Newscatcher API
Newscatcher API is a public API that allows you to easily retrieve news articles from all over the web. With its simple syntax and powerful capabilities, this API is a must-have for anyone looking to stay up-to-date on the latest happenings in the world.
How to Get a NewsCatcher API Key
NewsCatcher now splits access into two products:
- Web Search API β self-serve. Sign up at platform.newscatcherapi.com and you get free credits to start searching immediately, with a key issued on the spot.
- News API / Local News API β NewsCatcher's flagship enterprise products. These require a sales consultation; you book a demo at newscatcherapi.com and receive a trial API key afterward.
Whichever product you use, authenticate by sending your key in the x-api-key request header:
curl "https://api.newscatcherapi.com/v2/search?q=politics&lang=en" \
-H "x-api-key: YOUR_API_KEY"
For quick experiments, start with the self-serve Web Search API; for large-scale historical news, full-text search and enrichment, go through the enterprise route. Check the docs for the exact base URL and version tied to your plan β endpoints differ between the v2 and newer v3 APIs.
Searching for News Articles
To search for news articles using Newscatcher API, you will need to specify your search query and any relevant parameters. Here is an example of how to search for articles on the topic of "politics":
const query = 'politics';
const params = {
lang: 'en',
sort_by: 'relevancy',
page: 1,
page_size: 10
};
const searchUrl = `${apiUrl}q=${query}&lang=${params.lang}&sort_by=${params.sort_by}&page=${params.page}&page_size=${params.page_size}&media=True`;
fetch(searchUrl, {headers: {'x-api-key': apiKey}})
.then((response) => response.json())
.then((data) => console.log(data))
.catch((error) => console.log(error));
In the above example, we are searching for news articles that contain the keyword "politics" and are in English. We are also sorting the results by relevancy, and limiting the results to the first page with only 10 articles.
Retrieving Top Headlines
Newscatcher API also allows you to retrieve the top headlines from around the world. Here's an example of how to do that in JavaScript:
const topHeadlinesUrl = `${apiUrl}lang=en&page=1&page_size=10`;
fetch(topHeadlinesUrl, {headers: {'x-api-key': apiKey}})
.then((response) => response.json())
.then((data) => console.log(data))
.catch((error) => console.log(error));
The above example retrieves the top 10 headlines from around the world, sorted by relevancy, and limited to the first page.
Conclusion
Newscatcher API is a powerful tool that allows you to easily retrieve news articles from all over the web. With its simple syntax and powerful capabilities, this API is a must-have for anyone looking to stay up-to-date on the latest happenings in the world. So, what are you waiting for? Sign up for your API key today and start exploring the world of news!









