12 comments

[ 0.26 ms ] story [ 38.7 ms ] thread
Hi HN! This is my side project. I needed to integrate the latest headlines and images from a range of popular news sources and blogs into my app, and found that there wasn't a single API available that brought all the metadata together in a simple and consistent way. So I made one. It sources data from individual APIs, RSS feeds, and plain old scraping, and outputs in JSON.

Here's some example responses:

TechCrunch: https://newsapi.org/v1/articles?source=techcrunch&sortBy=lat...

Reuters: https://newsapi.org/v1/articles?source=reuters&sortBy=latest...

BBC News: https://newsapi.org/v1/articles?source=bbcnews&sortBy=top&ap...

Why is the output format not RSS or Atom feeds? It could be trivially collected and re-used then without coding to your API.
Great suggestion. I'll put this on the road map.
Nice. I would suggest to always use Atom instead of RSS, as it can do everything RSS can and more (e.g. multiple enclosures).
Excellent! Well-executed design, and the service looks very useful, with a variety of potential applications. I love how this API provides simple access to a uniform data format for these news sources.

"It sources data from individual APIs, RSS feeds, and plain old scraping.." This is what many developers have had to do, solving it each in their own way, and I think it's valuable to have that layer abstracted. Although, I imagine it's not trivial to maintain these algorithms, to keep up with changes in each news source.

Since the chosen data format is so straight-forward, it'd probably require just a thin transformation step to produce RSS or Atom feeds from the API.

Would love to see an open-source, self-hosted option.

To add a minor point which might be improved: upon visiting the home page, there is a FOUC - flash of unstyled content; the whole list of news sources can be seen, before the "type writer" JavaScript effect kicks in. Probably can be solved by hiding the text until the effect is loaded.
Good spot, I'll fix this shortly :)
Thanks! I'm sure you're right - in the past developers will have simply consumed each source's API within their app, which is exactly what I did to begin with.

The algorithms will need maintaining, especially in the case of the scraped sites. I'll be relying on this service for my main project so it's something I'd need to keep track of anyway.

so thats a solid no to open sourcing it?
It's not something I had intended to do, but I could do. That would make it much more manageable to scale because the community could maintain the algorithms, which takes long enough for the 24 sources I already have that I'm hesitant to add more right now.

It's written in C# though, I can see that being a problem.

I dont see it being a problem considering the big pushes that Microsoft has been making in to getting people into their language ecosystem.