The Guardian API
Access The Guardian's articles, tags and sections via an open API.
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
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 -s "https://content.guardianapis.com/search?q=climate%20change§ion=environment&show-fields=trailText,byline&api-key=$GUARDIAN_KEY"
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.status | ok or error |
| response.total / pages / currentPage | Pagination info |
| response.results[].webTitle / webUrl / webPublicationDate | Headline, link, timestamp |
| response.results[].fields.bodyText / trailText | Full text / standfirst (with show-fields) |
| response.results[].sectionName / pillarName | Section and top-level category |
Common errors
| 401 | Missing or invalid api-key. |
| 429 | Daily 500-call or 1/second limit exceeded. |
| 400 | Bad 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.