Blog / Guide

Test a news API in your browser: the NewsAgent Data playground

GuideJuly 4, 2026· 5 min read

Reading API docs tells you what an endpoint should return. Actually seeing your query run — with real data, the exact request URL, and copy-paste code — tells you whether it fits your project in about thirty seconds. That's what the playground is for.

🔴 See it live: newsagentdata.com/demo/ — no signup to look, nothing to install.

What the playground does

It's an interactive console for the public NewsAgent Data endpoints. You set filters with dropdowns and sliders, hit Run request, and get three things at once: the scored article cards, the raw JSON response, and ready-to-run code in cURL, Python and JavaScript — all generated from the exact query you built.

Build a query

Pick a country and a topic, type a keyword, and drag the min urgency and results sliders. As you change any control, the request line updates live so you always see the real call being made:

GET https://api.newsagentdata.com/public/sample?country=us&topic=ai&q=sanctions&min_urgency=5&limit=6

Leave a filter on "Any" to widen the search, or search purely by keyword across every country. Flip the Endpoint toggle to Breaking to see the highest-urgency items from the last hour instead.

Read the results

Every item comes back already enriched — not raw text. Each card shows an urgency_score from 0–10 (colour-coded: routine → notable → elevated → breaking), the political_lean, the topic_tags, the language and how long ago it was fetched. Switch to the JSON tab to see the full response shape you'll parse in code, including the fields the docs describe.

Copy the code

The cURL, Python and JavaScript tabs contain the exact request for your current query, with a one-click copy button. Paste it into a terminal or a script and it runs as-is:

import requests

r = requests.get("https://api.newsagentdata.com/public/sample?country=us&topic=ai&limit=6")
print(r.json())

Share a query

Every query is captured in the page URL, so you can bookmark a useful view or send it to a teammate and they'll land on the same filters, pre-run. Handy for "here's exactly the slice I mean" instead of a screenshot.

From playground to production

The playground hits the public, source-masked endpoints — no key required — so you can evaluate the data freely. To go live, swap the path to /v1/… and add your X-API-Key header: same query shape, but you also get source names, article links, full text and every field. A free key gives you 100 requests/day of the full schema, no card.

Honest notes

The public endpoints are rate-limited per IP to keep the demo fair, so if you hammer it you'll briefly get a 429 — wait a moment and continue. Coverage is deepest for Russian and English. If you'd rather let an LLM agent query the same data as a tool, see the MCP server; for delivery options, see real-time news.

Try it free

Grab a free API key — no card — and query live data in under a minute.

Get a free API key