The Guardian API: Search news
Searches Guardian articles by keyword through the public Google News feed for theguardian.com, optionally within publication dates, ordered newest first or by relevance, and returns each article's headline, summary, authors, section and publication time from its Guardian page.
Unofficial. Not affiliated with or endorsed by The Guardian.
Inputs
Values from the run on Oct 31, 2026, shown under Output.
- Page optional
page Results page, for example 2.
1 (default)
Whole number 1 or more.
- Sort optional
sort Order matches by newest date or search relevance, for example newest.
most_relevant
One of
newest,most_relevant. Defaultnewest.- Query, required
query Search words, for example Tesla.
Tesla
- To Date optional
to_date Latest publication date (YYYY-MM-DD), for example 2026-09-29.
2026-09-29
- From Date optional
from_date Earliest publication date (YYYY-MM-DD), for example 2026-09-01.
2026-09-20
- Max Results optional
max_results Maximum articles on a page, for example 20.
3
Whole number from 1 to 50. Default
20.
Input as JSON
{ "sort": "most_relevant", "query": "Tesla", "to_date": "2026-09-29", "from_date": "2026-09-20", "max_results": 3}Output
{ "articles": [ { "link": "https://www.theguardian.com/technology/2026/sep/21/black-employees-accuse-tesla-fostering-discrimination" , "authors": [ "Dara Kerr" ], "section": "Technology", "summary": "Lawyers say Black employees at Tesla experienced ‘rampant racism’ that was left unchecked for years at their flagship factory in California", "headline": "Black Tesla employees accuse company of fostering racial discrimination in major trial", "published_at": "2026-09-21T23:20:34+00:00" }, { "link": "https://www.theguardian.com/australia-news/2026/sep/24/beau-lamarre-condon-trial-surfboard-bag-double-murder-jesse-baird-luke-davies-ntwnfb" , "authors": [ "Kat Wong" ], "section": "Australia news", "summary": "Former NSW police officer has pleaded not guilty to murdering Jesse Baird and Luke Davies before concealing bodies in bags bought from sports store", "headline": "Beau Lamarre-Condon sized up surfboard bag against friend before allegedly murdering Sydney couple, court told", "published_at": "2026-09-24T10:22:44+00:00" }, { "link": "https://www.theguardian.com/technology/2026/sep/25/trump-xi-ai-arms-race" , "authors": [ "David Smith" ], "section": "Technology", "summary": "Xi’s state visit to the US emphasized personal rapport with the US president, rather than substantial agreements to pause their respective countries’ AI arms race", "headline": "Trump and Chinese president Xi end summit without major agreement on AI", "published_at": "2026-09-25T22:11:52+00:00" } ]}Code
curl https://api.fous.com/v1/runs \ -H "Authorization: Bearer $FOUS_API_KEY" \ -H "Content-Type: application/json" \ -d '{"method":"theguardian.com/search_news","input":{"sort":"most_relevant","query":"Tesla","to_date":"2026-09-29","from_date":"2026-09-20","max_results":3}}' # Save as fous.py, then run: python3 fous.pyimport json, os, timefrom urllib.error import HTTPErrorfrom urllib.request import Request, urlopenAPI = "https://api.fous.com/v1/runs" KEY = os.environ["FOUS_API_KEY"]HEADERS = { "Authorization": f"Bearer {KEY}", "Content-Type": "application/json" ,}def call(url, body=None): data = json.dumps(body).encode() if body else None request = Request(url, data, HEADERS) try: with urlopen(request, timeout=120) as r: return r.status, json.load(r) except HTTPError as error: message = json.load(error)["error"]["message"] raise RuntimeError(message) from errorstatus, run = call(API, { "method": "theguardian.com/search_news" , "input": { "sort": "most_relevant", "query": "Tesla", "to_date": "2026-09-29", "from_date": "2026-09-20", "max_results": 3 }})# 202: still going after 30 s. Ask again until it ends.while status == 202: time.sleep(2) status, run = call(f"{API}/{run['id']}")print(json.dumps(run["data"], indent=2))// Save as fous.mjs, then run: node fous.mjsconst api = "https://api.fous.com/v1/runs" ;const headers = { Authorization: `Bearer ${process.env.FOUS_API_KEY}`, "Content-Type": "application/json" ,};let response = await fetch(api, { method: "POST", headers, body: JSON.stringify({ "method": "theguardian.com/search_news" , "input": { "sort": "most_relevant", "query": "Tesla", "to_date": "2026-09-29", "from_date": "2026-09-20", "max_results": 3 } }), signal: AbortSignal.timeout(120_000),});let run = await response.json();// 202: still going after 30 s. Ask again until it ends.while (response.status === 202) { await new Promise((done) => setTimeout(done, 2_000)); response = await fetch(`${api}/${run.id}`, { headers }); run = await response.json();}if (!response.ok) throw new Error(run.error.message);console.log(run.data);# Connect your agent to Fous once, over MCP (Streamable HTTP):# https://api.fous.com/mcp# Set FOUS_API_KEY first: create a key at https://app.fous.com/keys.# Claude Codeclaude mcp add \ --scope user \ --transport http fous https://api.fous.com/mcp \ --header "Authorization: Bearer ${FOUS_API_KEY:?Set FOUS_API_KEY to your Fous API key}"# Codexcodex mcp add fous \ --url https://api.fous.com/mcp \ --bearer-token-env-var FOUS_API_KEY# Cursor, VS Code, Windsurf, Cline and morenpx -y add-mcp https://api.fous.com/mcp -g -n fous \ --header "Authorization: Bearer ${FOUS_API_KEY:?Set FOUS_API_KEY to your Fous API key}"# Then ask your agent:# "Use Fous to run theguardian.com/search_news# with {"sort":"most_relevant","query":"Tesla","to_date":"2026-09-29","from_date":"2026-09-20","max_results":3}"Over HTTP, the answer’s data holds the output. A run still going after 30 seconds answers 202 with its id: ask GET /v1/runs/{id} until it ends.
Schema
Input schema
{ "type": "object", "required": [ "query" ], "properties": { "page": { "type": "integer", "default": 1, "minimum": 1, "description": "Results page, for example 2." }, "sort": { "enum": [ "newest", "most_relevant" ], "type": "string", "default": "newest", "description": "Order matches by newest date or search relevance, for example newest." }, "query": { "type": "string", "minLength": 1, "description": "Search words, for example Tesla." }, "to_date": { "type": "string", "description": "Latest publication date (YYYY-MM-DD), for example 2026-09-29." }, "from_date": { "type": "string", "description": "Earliest publication date (YYYY-MM-DD), for example 2026-09-01." }, "max_results": { "type": "integer", "default": 20, "maximum": 50, "minimum": 1, "description": "Maximum articles on a page, for example 20." } }}Output schema
{ "type": "object", "required": [ "articles" ], "properties": { "articles": { "type": "array", "items": { "type": "object", "required": [ "headline", "summary", "published_at", "authors", "section", "link" ], "properties": { "link": { "type": "string", "format": "uri" }, "authors": { "type": "array", "items": { "type": "string" } }, "section": { "type": [ "string", "null" ] }, "summary": { "type": [ "string", "null" ] }, "headline": { "type": "string" }, "published_at": { "type": "string", "format": "date-time" } }, "additionalProperties": false } } }, "additionalProperties": false}- Price
- 1 credit per completed run (1¢ with pay as you go); failed runs are free.
- Method
theguardian.com/search_news- Returns
- headline, summary, publication time, authors, section, link
Use it from your agent
Give your agent this line. It reads SKILL.md, gets a Fous API key and connects the Fous MCP server. Its run then takes the method theguardian.com/search_news with the inputs above.
Ask your agent
- Find the latest Guardian articles about the UK junior doctors' strike, newest first, with headlines and authors
- What did the Guardian publish about Arctic sea ice between 2025-03-01 and 2025-03-31? Give me headline, section and publish time for each.
- Pull the most relevant news coverage of OpenAI's board shake-up, up to 10 articles with summaries and bylines
- Show me page 2 of recent articles mentioning Keir Starmer and the housing crisis, 30 per page
- I need news pieces on the Paris Olympics opening ceremony published from July 20 to July 31, 2024, sorted by relevance, including links and which section each ran in
See more
All The Guardian methodsLists the stories on a Guardian section front (top stories, world, UK, US, business, environment, technology, sport or culture) in page order, with the summary and image shown on the front, the publication time (as displayed, else from the story page), and each story's section and authors from its page.
theguardian.com/list_headlinesReads one public Guardian article by link or headline and returns its details and available full-text paragraphs. Live blogs return the latest entries shown on the page; some older articles may be unavailable.
theguardian.com/read_articleFinds BBC News articles matching search words, newest first or by relevance, with publication time, authors, section and summary, optionally limited to a date range. Date filters and newest order apply to the first 180 search matches; older or less relevant matches may be missed.
bbc.com/search_newsSearches Reuters articles by keyword through Google News, with optional publication date range, order and page. Summaries and bylines are filled in when Reuters serves the article page.
reuters.com/search_newsSearches New York Times article headlines and summaries by keyword, optionally within a date range, and returns matching articles with dates, authors, sections and links, newest or most relevant first.
nytimes.com/search_newsSearches Daily Mail-published articles by keyword, newest first or by relevance, with optional publication dates and paging, and returns each article's headline, summary, time, authors and section. Covers up to the 200 matches Daily Mail search offers; syndicated wire stories are excluded.
dailymail.co.uk/search_newsSearches Yahoo News articles by keyword, newest first or by relevance, with optional publication dates and pages; returns only articles hosted on Yahoo News, with authors, original publisher and section.
yahoo.com/search_newsSearches Al Jazeera articles by keyword, newest first or by relevance, with optional publication dates, and returns each article's headline, summary, time, authors and section. Searches up to the 100 matches Al Jazeera's search offers.
aljazeera.com/search_news