Skip to content
OSINTtools.io

mediastack API

News API from APILayer: filter articles by keyword, source, country, language, category and date, and get headlines and links as JSON.

Base URL
https://api.mediastack.com/v1
Sign-in
API key
Free tier
Free tier
Format
REST
Endpoints
2

Compiled by OSINTtools.io editors from docs.apilayer.com · updated Nov 29, 2026Work on this API? Claim it to keep these docs currentReport a mistake

Introduction

mediastack, from APILayer, is a REST API that returns live and historical news articles as JSON, filterable by keyword, country, language, category, source and date. An investigator can use it to find press coverage of a name or topic.

Base URL is https://api.mediastack.com/v1. The access key goes in the access_key query parameter. The docs say there are free and paid plans; on the free plan live news is delayed 30 minutes, and historical news needs the Standard plan or higher.

The docs pages read do not list error codes or rate limits.

Quick start

  1. Get a key

    Create an account with mediastack and copy your api key (free tier). Where to get it

  2. Make your first request

    Search live news, or historical news when date is given.. Replace YOUR_API_KEY and run it in a terminal, or use Try it on the endpoint.

    curl 'https://api.mediastack.com/v1/news?access_key=YOUR_API_KEY'
  3. Read the response

    A 200 response looks like this.

    {
      "pagination": {
        "limit": 25,
        "offset": 0,
        "count": 1,
        "total": 1
      },
      "data": [
        {
          "author": "Jane Example",
          "title": "Example headline",
          "description": "Example summary.",
          "url": "https://example.com/news/1",
          "image": "https://example.com/1.jpg",
          "category": "business",
          "language": "en",
          "country": "us",
          "published_at": "2026-01-02T10:00:00+00:00"
        }
      ]
    }

Authentication

Send your API key in the access_key query parameter of every request.

The key is in the account dashboard.

Get a key from mediastack

Try it on this page keeps your key in your browser; it is never sent to OSINTtools.io.

Rate limits and pricing

Not stated in the docs

Free tier.

News

  • Takes: Name
  • Passive: the target is not contacted
  • Plan: Historical news needs Standard or higher

For historical news, date is required in YYYY-MM-DD form and a Standard plan or higher is needed. Prefix a value with - to exclude it.

Query parameters

keywordsstringtakes your name

Search phrase; prefix a word with - to exclude it

Example: example corp
sourcesstring

Comma-separated source IDs

Example: cnn,-bbc
categoriesstring

Comma-separated categories

Example: business,technology
countriesstring

Comma-separated country codes

Example: us,gb
languagesstring

Comma-separated language codes

Example: en,de
datestring

YYYY-MM-DD, or two dates separated by a comma

Example: 2026-01-01,2026-01-31
sortstring

Sort order

Example: published_descDefault: published_descOne of: published_desc, published_asc, popularity
limitinteger

Results per page, maximum 100

Example: 25Default: 25
offsetinteger

Number of results to skip

Example: 0Default: 0
Response fields · 13Show

limitinteger

Page size used

offsetinteger

Offset used

countinteger

Results on this page

totalinteger

Total results available

authorstring

Article author

titlestring

Article title

descriptionstring

Article summary

urlstring

Article URL

imagestring

Image URL

categorystring

Category

languagestring

Language code

countrystring

Country code

published_atstring

Publication time

curl 'https://api.mediastack.com/v1/news?access_key=YOUR_API_KEY'
Replace YOUR_API_KEY with your key
Response
{
  "pagination": {
    "limit": 25,
    "offset": 0,
    "count": 1,
    "total": 1
  },
  "data": [
    {
      "author": "Jane Example",
      "title": "Example headline",
      "description": "Example summary.",
      "url": "https://example.com/news/1",
      "image": "https://example.com/1.jpg",
      "category": "business",
      "language": "en",
      "country": "us",
      "published_at": "2026-01-02T10:00:00+00:00"
    }
  ]
}

Sources

  • Passive: the target is not contacted

Use the returned id in the sources parameter of /news.

Query parameters

searchstringrequired

Search text

Example: example
countriesstring

Country codes

Example: us
languagesstring

Language codes

Example: en
categoriesstring

Categories

Example: general
limitinteger

Results per page

Example: 25
offsetinteger

Results to skip

Example: 0
Response fields · 6Show

idstring

Source ID to pass to the sources parameter

namestring

Source name

categorystring

Category

countrystring

Country code

languagestring

Language code

urlstring

Source website

curl 'https://api.mediastack.com/v1/sources?search=example&access_key=YOUR_API_KEY'
Replace YOUR_API_KEY with your key
Response
{
  "data": [
    {
      "id": "examplenews",
      "name": "Example News",
      "category": "general",
      "country": "us",
      "language": "en",
      "url": "https://example.com"
    }
  ]
}