Earlier this month I discovered News API, a service that provides just what its name implies: a handful of API endpoints that result in JSON-based summaries of current news stories from around the world. You can get a stream of new headlines, or search through all recent stories in its database, filtering on various criteria. Its documentation includes some example output.

Using the service requires an API key; one can obtain a free key that allows modestly rate-limited queries for personal or open-source-project use, which earns my attention and my respect for sure. The rather mysterious organization behind the service — its official website has no “About Us” page that I can find — does offer higher-throughput commercial-access plans with monthly pricing that starts in the low hundreds.

News API’s enigmatic nature (Who runs it, exactly? What else do they do, and what’s their overall mission?) prompts me to not assume its future availability as indefinite. But its tight focus, clear documentation, and friendliness towards open-source use encouraged me nonetheless to gamble a couple of afternoons writing the first version of Web::NewsAPI, a new code library that lets you work with News API via Perl. Its source is on GitHub, and I humbly offer the library for consideration as an addition to News API’s officially endorsed implementations.

I plan on using this new module with a near-future release of Brickfielder, my exercise timer. I have, since that program’s inception, had a notion of adding a multiple-sourced “on-board entertainment” system to it, and News API immediately struck me as an excellent resource for this questionable purpose. I look forward to completing and announcing this work later in the year.

This article was also posted to the “code” section of Indieweb.xyz.

How to respond to this post.

Next post: How to support Fogknife

Previous post: I read Under the Knife

Loading responses...

Share a response

To share a response that links to this page from somewhere else on the web, paste its URL here.