
NPM Scraper
- epctex/npm-scraper
- Modified
- Users 3
- Runs 274
- Created by
epctex
One of the most crucial JavaScript communities is at your fingertips. Extract all the package information right away from NPM. Title, maintainers, readme, downloads per version, dependent libraries, and many other information can be retrieved directly! No limits! Get JSON, Excel, XML, and more!
To run the code examples, you need to have an Apify account. Replace <YOUR_API_TOKEN> in the code with your API token. For a more detailed explanation, please read about running Actors via the API in Apify Docs.
# Set API token
API_TOKEN=<YOUR_API_TOKEN>
# Prepare Actor input
cat > input.json <<'EOF'
{
"startUrls": [
"https://www.npmjs.com/package/lodash",
"https://www.npmjs.com/~ljharb",
"https://www.npmjs.com/search?q=keywords:front-end&page=0&ranking=optimal",
"https://www.npmjs.com/search?q=keywords:modules",
"https://www.npmjs.com/search?q=axios"
],
"maxItems": 20,
"endPage": 1,
"customMapFunction": "(object) => { return {...object} }",
"proxy": {
"useApifyProxy": true
}
}
EOF
# Run the Actor
curl "https://api.apify.com/v2/acts/epctex~npm-scraper/runs?token=$API_TOKEN" \
-X POST \
-d @input.json \
-H 'Content-Type: application/json'