Before getting started, you need a API key. We provide free plans for development, open-source, and non-commercial use, you can apply here first.
You also need to know how to make web requests in your preferred programming language. We have included some basic ways to do in our examples below if you need a place to start. However, we also provide client libraries in Node.js, Python for quick start.
We will go through how our API using two examples:
1. Grab the latest news in your preferred language
2. Get historical data based on some filter params
Grab the latest news
Currents API provide info in 15 different languages across over 50 countries in forms of news, article, forum discussion topics.
In this example we will focus in getting the latest news from English using the endpoint /latest-news
Get historical data based on some filter params
We already demonstrate how to get the latest news, however sometimes you may want to access historical data based on some filtered value.
In this example, we will show how to access news that contain the keyword Amazon and sort them by published date.
Since we want to search based on some filters we can use the /search endpoint.
If you want to play around with the details you can check it out the endpoint page