API Indonesia news by scraping data from cnbc indonesia. This is unofficial API, feel free to use or rebuild it again. Here's my reference to build this API services rizki4106 / cnnindonesia-news-api.
- Get all list of news
- Show news content
- Search news by query / keywords
git clone https://github.com/vnurhaqiqi/scraping-cnbcindonesia-api
pip install -r requirements.txt
source /env/bin/activate
gunicorn app:app
No. | Description | Endpoint | Query Params | Method |
---|---|---|---|---|
1 | Return list of the latest news | /api/v1/cnbc-news-articles | - | GET |
2 | Return list of the latest news by category | /api/v1/cnbc-news-articles?category={category} | category | GET |
3 | Return specific news content | /api/v1/cnbc-news-detail?url={url} | url | GET |
4 | Search news by given query word | /api/v1/cnbc-news-search?query={keywords} | query | GET |
No. | Category |
---|---|
1 | market |
2 | investment |
3 | news |
4 | entrepreneur |
5 | syariah |
6 | tech |
7 | lifestyle |
8 | profil |
- Example: /api/v1/cnbc-news-articles
- Example: /api/v1/cnbc-news-articles?category={category}
- Example: /api/v1/cnbc-news-detail?url={url}
- Example: /api/v1/cnbc-news-search?query={keywords}
Copyright © 2021 by Viqi Nurhaqiqi