TheNewspapersDB's logo

Documentation

The API is super straightforward, with just two endpoints.
One to get the newspapers, and the other for the articles.

BASE URL api.thenewspapersdb.com/v1/

GET /newspaper

Retrieves a list of newsletters

Headers

- x-api-key: Your API Key (Required)

Query

- country: Filter newspapers by country code (example: ar/br/us/.../it/au)

Example cURL

curl --request GET \
--url https://api.thenewspapersdb.com/v1/newspaper \
--header 'x-api-key: **********'

Response

{"total": Integer, "data": Newspaper[]}

GET /article

Retrieves a list of articles that match given criteria

Headers

- x-api-key: Your API Key (Required)

Query

- title: String, it will look for a match in articles titles.
- newspaper: String, filter articles by the newspaper's name
- offset: Integer, default = 0
- limit: Integer, default = 10, min = 1, max = 100

Example cURL

curl --request GET \
--url https://api.thenewspapersdb.com/v1/article \
--header 'x-api-key: **********'

Response

{"total": Integer, "data": Article[]}

Schemas

Newspaper

{
id: integer
name: string
base_url: string
timezone: string
created_at: date
updated_at: date
}

Article

{
id: integer
url: string
title: string

author?: string
thumbnail?: string
description?: string

newspaper: Newspaper

published_at: datetime(utc)
created_at: datetime(utc)
}