QUICKSTART · ABOUT 5 MINUTES
Your first API call
Get a free key, search the news for "climate" and print the headlines. You need a terminal, nothing else.
Get a free API key
Sign in, open API keys in the console and create a key. Copy it right away: the full key is only shown once. Keys start with
gna_live_.The Free plan needs no card. See Plans for the credits and capabilities each plan includes.
Store it in an environment variable
Keep the key out of your code so it never ends up in Git.
export NEWSSEARCHAPI_API_KEY="gna_live_your_key_here"$env:NEWSSEARCHAPI_API_KEY = "gna_live_your_key_here"Make a request
Search English-language articles that mention "climate", newest first:
curl "https://apis.newssearchapi.com/v1/articles?q=climate&language=en&page_size=5" \ -H "X-Api-Key: $NEWSSEARCHAPI_API_KEY"// Node.js 18+ (built-in fetch) const response = await fetch("https://apis.newssearchapi.com/v1/articles?q=climate&language=en&page_size=5", { headers: { "X-Api-Key": process.env.NEWSSEARCHAPI_API_KEY }, }); const body = await response.json(); if (body.status !== "ok") throw new Error(`${body.code}: ${body.message}`); for (const article of body.articles) console.log(article.title);import os import requests response = requests.get( "https://apis.newssearchapi.com/v1/articles?q=climate&language=en&page_size=5", headers={"X-Api-Key": os.environ["NEWSSEARCHAPI_API_KEY"]}, timeout=10, ) body = response.json() if body["status"] != "ok": raise RuntimeError(f"{body['code']}: {body['message']}") for article in body["articles"]: print(article["title"])For a quick browser test, add
&apiKey=YOUR_API_KEYto the URL. Both methods are supported; use theX-Api-Keyheader on servers to keep keys out of URLs and logs.qmatches every word (case-insensitive) in the title or description. Add filters such ascountry,category,sourceorfrom; the article search reference lists them all and lets you run them live.Read the response
Successful responses have
"status": "ok", the results inarticles, andtotalResults,pageandpageSizefor paging:200 OK{ "status": "ok", "totalResults": 1342, "page": 1, "pageSize": 10, "articles": [ { "id": "-4210765838120375291", "title": "Central bank holds rates steady amid cooling inflation", "description": "Policymakers voted 7–2 to keep the benchmark rate unchanged.", "content": "Policymakers voted 7–2 on Thursday to keep the benchmark rate unchanged, citing a steady decline in core inflation over the past quarter. The decision was widely expected by markets. …", "contentTruncated": true, "url": "https://www.dailyledger.example/business/rates-hold", "imageUrl": "https://cdn.dailyledger.example/img/rates.jpg", "author": "Jane Smith", "publishedAt": "2026-10-31T09:15:00Z", "language": "en", "country": "gb", "region": "Europe", "categories": [ "business", "economy" ], "source": { "name": "The Daily Ledger", "domain": "dailyledger.example" }, "indexedAt": "2026-10-31T09:15:02Z", "storyId": "story-2026-10-31-001", "trustScore": 0.94, "corroboratedBy": 8 } ] }Something went wrong?401 apiKeyMissingorapiKeyInvalidmeans neither the header nor query key arrived or the key was mistyped; check the variable is set in the same terminal.429means you hit a rate limit or your daily quota. See error codes.
Next steps
- Explore every filterTry queries live from the reference page.
- Page through resultsFetch more than one page safely.
- Use an SDKTyped TypeScript and Python clients.
- Connect an AI agentLive news in Claude, Cursor or VS Code via MCP.