This example shows how to scrape CryptoPanic news using a pre-built Apify actor — no scraper setup required. Just call the actor via the Apify API and get structured crypto news data back in seconds.
- Calls the
piotrv1001/cryptopanic-news-scraperApify actor - Passes an input configuration to the actor
- Waits for the run to complete
- Fetches results from the actor's dataset
- Prints each news item to the console
- Node.js v18 or higher
- An Apify account (free tier works)
- An Apify API token
npm installCopy .env.example to .env and add your Apify API token:
cp .env.example .envThen open .env and replace your_apify_token_here with your actual token from the Apify console.
npm startimport { ApifyClient } from 'apify-client';
import 'dotenv/config';
// Initialize the ApifyClient with your Apify API token
// Set APIFY_TOKEN in your .env file (copy .env.example to get started)
const client = new ApifyClient({
token: process.env.APIFY_TOKEN,
});
// Prepare Actor input
const input = {};
// Run the Actor and wait for it to finish
const run = await client.actor("piotrv1001/cryptopanic-news-scraper").call(input);
// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
console.dir(item);
});
// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docsSee sample-output.json for a full example. Each result item contains:
| Field | Description |
|---|---|
title |
Headline of the news article |
date |
Relative publication date (e.g. "4w", "2d") |
coins |
Array of related coin ticker symbols (e.g. ["BTC", "ETH"]) |
votes |
Array of vote counts by category (positive, negative, important, etc.) |
source |
Domain of the original article |
- Crypto sentiment analysis — aggregate vote data across news items to gauge market sentiment
- Coin-specific news feeds — filter results by coin ticker to build targeted feeds for BTC, ETH, or any altcoin
- Trading signal pipelines — feed scraped headlines and vote counts into NLP or ML models
- Portfolio monitoring — track news mentions for coins you hold and get alerts on high-vote articles
- Research and journalism — collect structured crypto news data at scale for analysis or reporting
Open the CryptoPanic News Scraper on Apify
MIT
