Whatever the focus of your website, news delivery is key to keeping your readers engaged. You could source and write the news yourself---or you could rely on mediastack API to provide news direct to your readers, on a website or app.

Offering a free tier and packed with news from prominent, premium outlets, mediastack API could revolutionize your audience engagement.

An API for News?

Different data can be incorporated into websites and apps via an API. That's an application programming interface, basically software that lets you pipe the data it supplies into your own code.

For example, weather data, flight information, and markets data are all key examples of daily-produced public domain data. Usually issued by big-name providers through your TV or mainstream news website, this is the sort of premium information that readers typically leave your site to go and check up on.

As noted, mediastack API is an API for news. It works along the same lines, providing headlines from significant outlets such as Sky News, CNN, BBC, MSNBC, and Al Jazeera.

Mediastack API Features

Access to mediastack API comes with a host of impressive features that will impress and engage any audience.

mediastack API example

To start with, it gives access to news data feeds, trends, and headlines around the world as news breaks, 24/7. It's more than just a handful of providers too. Utilizing sources from 50 countries, over 7,500 media outlets feed data into mediastack API. Big names and small, updates can be as regular as minute-by-minute, and they're fully automated, in 13 languages.

The mediastack API utilizes a lightweight API layer, with content delivered from the cloud in easy-to-format JSON.

As noted, mediastack API also offers a free plan. This is notable for several reasons, not least the ability to develop your project with mediastack API without committing to a potentially costly subscription if you ultimately choose not to use it.

Subscribing to mediastack API

When you're ready to start, head to mediastack.com and hit the Sign Up Free button. Choose your pricing tier, click Sign Up, provide your information, and moments later you'll have access to the mediastack API.

Mediastack is available in five pricing tiers, each with different features.

mediastack API pricing

First is the free option. This gives you 500 API calls a month, access to all 7,500+ news sources, and all 13 languages. News sources provide delayed headlines, however. The free option is ideal for any development and testing project. Mediastack API basically gives you enough calls to build your website or app without paying for the full service.

The Standard package is $24.99 a month or $19.99 with annual billing. This comes with 10,000 API calls a month, live news, all 13 languages and 7,500+ news sources, HTTPS encryption, historical data, commercial use, and technical support.

Stepping things up further is the Professional package, offering all the same features as the Standard package but with 50,000 news requests per month. This is $99.99 a month or $79.99 if billed yearly.

A Business package is also available for mediastack API. This delivers up to 250,000 news requests a month on top of the same features as Standard and Professional. This costs $249.99 per month, or $199.99 if billed yearly.

Finally, mediastack also offers an Enterprise option, tailored to meet your site's requirements with custom pricing.

How to Integrate mediastack API into Your Site or App

Once signed up to mediastack API, you'll gain instant access to the control panel. Here you'll find the API access key, API endpoints, and detailed documentation about how to implement mediastack API and the development languages you may use with it.

Your API Key

Delivered at the top of the mediastack API control panel is the personal API key for each user. This is a generated collection of letters and numbers, each one individual. If necessary, the API key can be trashed and a new API key generated.

All API queries rely on the base URL:

        http://api.mediastack.com/v1/
    

The base URL, when used with the API key, generates a collection of the latest news details. Each string has a set of optional parameters available, covering everything from news sources to dates and sort order.

Note that the free tier doesn't support secure HTTPS API calls.

Endpoints

Two API endpoints are available to use on mediastack API: news data, and news sources.

News endpoints work with various parameters. News data uses:

  • sources---e.g. the BBC, CNN, etc
  • categories---news types, such as sport, business,
  • countries---standard country codes are used here, e.g. au for Australia, us for United States
  • languages---again, standard codes are required: en for English, de for German
  • keywords---use comma-separated keywords to provide specific topic focus
  • date---used primarily for historical news
  • sort---descending, ascending, and popularity order can be set
  • offset---used for displaying older news items from the same set of data
  • limit---the maximum data limit is 100, with 25 the default

Historical news data can be queried with the desired date specified. Meanwhile, news source endpoint parameters are limited to categories, countries, languages, offset, and limit. Specific parameters can be excluded using the "-" prefix. For example, exclude news from the US using

        http://api.mediastack.com/v1/news?access_key=YOUR_ACCESS_KEY&sources=au,-us
    

Use Five Development Languages With mediastack API

If you're planning to integrate mediastack API with your website or app, you'll need to know which languages are supported. Five key development languages can be used:

  • PHP
  • Python
  • jQuery
  • Go
  • Ruby

Each of these is supported by extensive documentation, with examples provided for each. Error messages for failed APIs are also listed here.

Specific parameter codes for countries, languages, search terms, and news categories are listed here too, along with everything else you need to bring your readers the news content they're looking for.

Give Your Readers the News They Crave With Mediastack

Mediastack API has the potential to deliver a vast collection of headlines to your website or app, whatever the niche. With a free tier for development and subscriptions for every level, this a straightforward solution to suit any budget.

PHP, Python, jQuery, Go, and Ruby are all supported by mediastack API, ensuring compatibility with virtually any online project. The wealth of parameters ensures that APIs deliver exactly the type of news your audience is looking for, with robust support and documentation.