A web scraper and API built with Puppeteer and Nuxt 3 (powered by Nitro) to fetch news and crypto analysis from BeInCrypto. Deployed on Vercel.
(Simple sketch of the app flow)
To clone and run this application, you'll need Git and Node.js (which comes with npm) installed on your computer. From your command line:
# Clone this repository
$ git clone https://github.com/cn-2k/bic-api
# Go into the repository
$ cd bic-api
# Install dependencies
$ npm install
# Run the dev server
$ npm run dev
Note If you're using Linux Bash for Windows, see this guide or use
node
from the command prompt.
Finally, change the .env.example
filename to .env
and fulfill the BIC_URL
with a valid BeInCrypto URL that contain a list of articles, similar to: https://beincrypto.com/analysis/.
This project is basically an API so you can run locally or use the demo URL that I've provided on Vercel, see the endpoints avaiable to use:
/api/articles
- List the recent articles or news provided by the env. variable BIC_URL
, make sure to provide a correct URL, in my case I've used https://br.beincrypto.com/analise-bitcoin/.
/api/articles/content
- Extracts the content of a specific article by passing the article link as a query parameter.
This software uses the following open source packages:
MIT