-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
33 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# Google News Scraper API | ||
|
||
This repository contains the source code of an API that scraps the [Google News](https://news.google.com/) page. | ||
It was created in Typescript (Node.js) using the Puppeteer library together with Express. | ||
|
||
You can use the API endpoint using: | ||
|
||
```ssh | ||
curl -X GET https://google-news-scraper-api.herokuapp.com/news?lang=<lang-code> | ||
``` | ||
|
||
Like | ||
|
||
```ssh | ||
curl -X GET https://google-news-scraper-api.herokuapp.com/news?lang=en-US | ||
``` | ||
|
||
The API will return a JSON with an array of objects containing the following structure: | ||
|
||
```JS | ||
{ | ||
"news_title": string, | ||
"news_url": string, | ||
"newspaper_name": string, | ||
"datetime": string | null, | ||
} | ||
``` | ||
|
||
**Important:** The API caches the information and keeps it for 20 minutes until the next refresh of the data. | ||
|
||
-- | ||
|
||
Created for study purposes. |