
Show HN: NewsAPI – A free API for live news headlines and images - highace
https://newsapi.org
======
highace
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...](https://newsapi.org/v1/articles?source=techcrunch&sortBy=latest&apikey=3e22f2fcc1344975ae2b2e69379e2a6e)

Reuters:
[https://newsapi.org/v1/articles?source=reuters&sortBy=latest...](https://newsapi.org/v1/articles?source=reuters&sortBy=latest&apikey=3e22f2fcc1344975ae2b2e69379e2a6e)

BBC News:
[https://newsapi.org/v1/articles?source=bbcnews&sortBy=top&ap...](https://newsapi.org/v1/articles?source=bbcnews&sortBy=top&apikey=3e22f2fcc1344975ae2b2e69379e2a6e)

~~~
erlehmann_
Why is the output format not RSS or Atom feeds? It could be trivially
collected and re-used then without coding to your API.

~~~
highace
Great suggestion. I'll put this on the road map.

~~~
erlehmann_
Nice. I would suggest to always use Atom instead of RSS, as it can do
everything RSS can and more (e.g. multiple enclosures).

------
lioeters
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.

~~~
highace
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.

~~~
LaurenceW1
so thats a solid no to open sourcing it?

~~~
highace
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.

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

