News search
News search results as JSON.
GET /v1/newsRequires a valid API key, an active membership, and available API credit.
Query parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
q |
string | yes | — | The search query. |
safe |
string | no | moderate |
Safe-search level: off, moderate, or strict. |
gl |
string | no | (auto) | Two-letter region/country code (e.g. us, gb). |
hl |
string | no | (auto) | Two-letter language code (e.g. en, fr). |
time |
string | no | any |
Recency filter: any, hour, day, week, month, year. Especially useful for news. |
num |
integer | no | (provider default) | Desired result count. Clamped to 5–100 (out-of-range → 20). |
Response
{
"query": "mars mission",
"kind": "news",
"results": [
{
"title": "New rover lands on Mars",
"url": "https://news.example.com/mars-rover",
"description": "The spacecraft touched down early this morning…",
"thumbnail": "https://news.example.com/mars-thumb.jpg",
"price": null,
"meta": "Example News",
"extra": "2 hours ago"
}
]
}
| Field | Type | Description |
|---|---|---|
query |
string | The query that was executed. |
kind |
string | Always news for this endpoint. |
results[].title |
string | Headline. |
results[].url |
string | Article URL. |
results[].description |
string | null | Article snippet. |
results[].thumbnail |
string | null | Thumbnail image URL, when available. |
results[].meta |
string | null | Publisher / source. |
results[].extra |
string | null | Published date / relative time, when available. |
results[].price |
string | null | Not used for news. |
Examples
curl -G "https://api.neuji.com/v1/news" \ -H "Authorization: Bearer $NEUJI_API_KEY" \ --data-urlencode "q=mars mission" \ --data-urlencode "time=day"
using var http = new HttpClient(); http.DefaultRequestHeaders.Authorization = new("Bearer", Environment.GetEnvironmentVariable("NEUJI_API_KEY")); var url = "https://api.neuji.com/v1/news?q=" + Uri.EscapeDataString("mars mission") + "&time=day"; Console.WriteLine(await http.GetStringAsync(url));
const params = new URLSearchParams({ q: "mars mission", time: "day" }); const res = await fetch(`https://api.neuji.com/v1/news?${params}`, { headers: { Authorization: `Bearer ${process.env.NEUJI_API_KEY}` }, }); const data = await res.json(); for (const r of data.results) console.log(r.meta, "—", r.title, `(${r.extra})`);