API Directory › 📰 News › The Guardian
API KeyHTTPSCORS

The Guardian API

Access The Guardian's articles, tags and sections via an open API.

Category
Auth
API Key
HTTPS
Yes
CORS
Yes
Open The Guardian docs ↗

What it does

The Guardian’s Open Platform is a content API for everything the Guardian has published since 1999: articles, liveblogs, galleries and video, with full text, tags, section data, contributor info and images. Search, filter by section/tag/date, and page through results.

Base URL

https://content.guardianapis.com

Authentication

Register for a free developer key and pass it as ?api-key=YOUR_KEY. Request extra data with show-fields=, show-tags=, show-elements=.

Code examples

curl
curl -s "https://content.guardianapis.com/search?q=climate%20change&section=environment&show-fields=trailText,byline&api-key=$GUARDIAN_KEY"
Python
import requests

r = requests.get("https://content.guardianapis.com/search", params={
    "q": "artificial intelligence", "order-by": "newest",
    "page-size": 5, "show-fields": "bodyText", "api-key": KEY}, timeout=10)
for a in r.json()["response"]["results"]:
    print(a["webPublicationDate"][:10], a["webTitle"])

Rate limits & quotas

Free developer key: 500 calls/day and 1 call/second, non-commercial use, and no reuse of the content beyond your app’s display (a ‘commercial’ key with different terms is available on request). Over the limit returns HTTP 429.

Key response fields

response.statusok or error
response.total / pages / currentPagePagination info
response.results[].webTitle / webUrl / webPublicationDateHeadline, link, timestamp
response.results[].fields.bodyText / trailTextFull text / standfirst (with show-fields)
response.results[].sectionName / pillarNameSection and top-level category

Common errors

401Missing or invalid api-key.
429Daily 500-call or 1/second limit exceeded.
400Bad date format (from-date must be YYYY-MM-DD) or unknown parameter.

When to use it (and alternatives)

Excellent when a single high-quality English-language source is enough — the full body text on the free tier is rare and valuable. For multi-source aggregation use newsdata.io or Currents; the NYT API is the US equivalent (without full text).

FAQ

Do I get the full article text for free?

Yes — add show-fields=bodyText (plain) or body (HTML). This is unusual among news APIs; most give you only a snippet.

Can I use it commercially?

The default developer key is non-commercial. Contact the Open Platform team for a commercial agreement if you need to monetise or redistribute content.

How do I browse by topic?

Use the tag system: /search?tag=technology/artificial-intelligence, or hit a section directly (/environment?api-key=). /tags?q= helps you find tag ids.

New to APIs?

Short guides for working with this API — and any other.

🛠️ Handy LarzOS tools

Free tools to help you work with this API.

JSON Formatter

Related News APIs

← Back

More News APIs · All 196 APIs