Are there APIs to scrape hackernews?

Yes. Some sites as well as apps use it (so scraping the web pages is not required).

See here:

https://github.com/HackerNews/API