Keys / NewsAPI
NEWS_API_KEY
The NewsAPI key your app searches news articles and headlines with. The Developer plan is free, 100 requests a day, for development only.
- Expires
- the docs don't say
- API
- none
Get it
Create one on newsapi.org/register. The steps aren't recorded yet.
Set it
NEWS_API_KEY=...
NewsAPI's C# client takes the key from your app, as new NewsApiClient(apiKey); its Node.js and Python libraries are unofficial. Over HTTP, send it in the X-Api-Key header. Or keep it out of .env with keypin: keypin run -- npm run dev
Replace it
- NewsAPI's docs don't say how to replace a key. Registering gives you one, and the docs link no page to change it.
- If you get a new key, deploy it everywhere that reads
NEWS_API_KEY. - Check that requests succeed. A
401withapiKeyInvalidorapiKeyDisabledmeans the key isn't accepted.
Set rotate_every on the key in keypin.toml and a rotated date on its vault item, and keypin status shows when it's due.