# Crypto News Sentiment Analyzer (`gochujang/crypto-news-sentiment`) Actor

Aggregates crypto news from CoinDesk, CoinTelegraph, The Block, Decrypt and more. Claude analyzes each article for sentiment (bullish/bearish/neutral), mentioned tickers, impact score, and a 1-line summary. Perfect for AI trading agents that need real-time news signal. BYO Anthropic API key.

- **URL**: https://apify.com/gochujang/crypto-news-sentiment.md
- **Developed by:** [Hojun Lee](https://apify.com/gochujang) (community)
- **Categories:** AI
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-usage

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## Crypto News Sentiment Analyzer

Aggregates crypto news from CoinDesk, CoinTelegraph, The Block, Decrypt, and more. Uses Claude AI to analyze each article for sentiment (bullish/bearish/neutral), mentioned tickers, impact score, and a one-line summary. Perfect for AI trading agents that need real-time news signal. Bring your own Anthropic API key.

### Features

- **Multi-source aggregation** — CoinDesk, CoinTelegraph, The Block, Decrypt, Blockworks
- **AI sentiment analysis** — Claude scores each article: bullish / bearish / neutral
- **Ticker extraction** — Automatically identifies mentioned cryptocurrencies (BTC, ETH, SOL, etc.)
- **Impact scoring** — 1–10 score indicating market-moving significance
- **Filter by sentiment** — Return only bullish or bearish signals
- **Lookback window** — Control how many hours of news history to analyze

### Input

| Field | Type | Default | Description |
|-------|------|---------|-------------|
| `anthropicApiKey` | string | *(required)* | Your Anthropic API key |
| `sources` | array | all | Sources to include: `coindesk`, `cointelegraph`, `theblock`, `decrypt`, `blockworks` |
| `maxArticles` | integer | 50 | Maximum articles to analyze |
| `lookbackHours` | integer | 24 | Hours of news history to fetch |
| `tickerFilter` | array | all | Filter by ticker symbols (e.g. `["BTC", "ETH"]`) |
| `minImpactScore` | integer | 0 | Minimum impact score (1–10) to include |
| `sentimentFilter` | string | all | `bullish`, `bearish`, or `neutral` |
| `model` | string | `claude-haiku-4-5` | Claude model to use for analysis |

### Output

Each article is a JSON object:

```json
{
  "title": "Bitcoin ETF sees record $1B inflows",
  "url": "https://coindesk.com/...",
  "source": "coindesk",
  "published_at": "2025-01-15T10:30:00Z",
  "sentiment": "bullish",
  "impact_score": 8,
  "tickers": ["BTC"],
  "summary": "Spot Bitcoin ETF records largest single-day inflow since launch, signaling strong institutional demand.",
  "analyzed_at": "2025-01-15T11:00:00Z"
}
````

### Example

```json
{
  "anthropicApiKey": "sk-ant-...",
  "sources": ["coindesk", "cointelegraph"],
  "maxArticles": 20,
  "lookbackHours": 6,
  "tickerFilter": ["BTC", "ETH"],
  "minImpactScore": 6,
  "sentimentFilter": "bullish"
}
```

### Pricing

Charged per article analyzed (`article-analyzed` event). Cost depends on the Claude model used — Haiku is cheapest.

### Use Cases

- Real-time news signal for algorithmic trading
- Morning briefing automation for crypto portfolios
- Sentiment dashboard for DeFi protocols
- Automated social media posting based on market sentiment

# Actor input Schema

## `anthropicApiKey` (type: `string`):

Your Anthropic API key. Get one at console.anthropic.com/keys.

## `sources` (type: `array`):

Which feeds to fetch: coindesk, cointelegraph, theblock, decrypt, bitcoinmagazine, cryptobriefing. Leave empty for all.

## `maxArticles` (type: `integer`):

Max articles to analyze across all sources.

## `lookbackHours` (type: `integer`):

Only include articles published in the last N hours.

## `tickerFilter` (type: `array`):

Only return articles mentioning these tickers (e.g. BTC, ETH). Empty = all.

## `minImpactScore` (type: `integer`):

Only return articles with impact score >= this value (1-5). 0 = all.

## `sentimentFilter` (type: `string`):

Only return articles with this sentiment. Leave empty for all.

## `model` (type: `string`):

Haiku is recommended (fastest + cheapest). Opus for max accuracy.

## Actor input object example

```json
{
  "sources": [
    "coindesk",
    "cointelegraph",
    "theblock"
  ],
  "maxArticles": 50,
  "lookbackHours": 24,
  "tickerFilter": [],
  "minImpactScore": 0,
  "sentimentFilter": "",
  "model": "claude-haiku-4-5"
}
```

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "sources": [
        "coindesk",
        "cointelegraph",
        "theblock"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("gochujang/crypto-news-sentiment").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/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "sources": [
        "coindesk",
        "cointelegraph",
        "theblock",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("gochujang/crypto-news-sentiment").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "sources": [
    "coindesk",
    "cointelegraph",
    "theblock"
  ]
}' |
apify call gochujang/crypto-news-sentiment --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=gochujang/crypto-news-sentiment",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Crypto News Sentiment Analyzer",
        "description": "Aggregates crypto news from CoinDesk, CoinTelegraph, The Block, Decrypt and more. Claude analyzes each article for sentiment (bullish/bearish/neutral), mentioned tickers, impact score, and a 1-line summary. Perfect for AI trading agents that need real-time news signal. BYO Anthropic API key.",
        "version": "0.1",
        "x-build-id": "YchEt97TAVZJXPwPZ"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/gochujang~crypto-news-sentiment/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-gochujang-crypto-news-sentiment",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/gochujang~crypto-news-sentiment/runs": {
            "post": {
                "operationId": "runs-sync-gochujang-crypto-news-sentiment",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/gochujang~crypto-news-sentiment/run-sync": {
            "post": {
                "operationId": "run-sync-gochujang-crypto-news-sentiment",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "anthropicApiKey"
                ],
                "properties": {
                    "anthropicApiKey": {
                        "title": "Anthropic API Key",
                        "type": "string",
                        "description": "Your Anthropic API key. Get one at console.anthropic.com/keys."
                    },
                    "sources": {
                        "title": "News Sources",
                        "type": "array",
                        "description": "Which feeds to fetch: coindesk, cointelegraph, theblock, decrypt, bitcoinmagazine, cryptobriefing. Leave empty for all.",
                        "default": [],
                        "items": {
                            "type": "string"
                        }
                    },
                    "maxArticles": {
                        "title": "Max Articles",
                        "minimum": 1,
                        "maximum": 200,
                        "type": "integer",
                        "description": "Max articles to analyze across all sources.",
                        "default": 50
                    },
                    "lookbackHours": {
                        "title": "Lookback (hours)",
                        "minimum": 1,
                        "maximum": 168,
                        "type": "integer",
                        "description": "Only include articles published in the last N hours.",
                        "default": 24
                    },
                    "tickerFilter": {
                        "title": "Ticker Filter",
                        "type": "array",
                        "description": "Only return articles mentioning these tickers (e.g. BTC, ETH). Empty = all.",
                        "default": [],
                        "items": {
                            "type": "string"
                        }
                    },
                    "minImpactScore": {
                        "title": "Min Impact Score",
                        "minimum": 0,
                        "maximum": 5,
                        "type": "integer",
                        "description": "Only return articles with impact score >= this value (1-5). 0 = all.",
                        "default": 0
                    },
                    "sentimentFilter": {
                        "title": "Sentiment Filter",
                        "enum": [
                            "",
                            "bullish",
                            "bearish",
                            "neutral"
                        ],
                        "type": "string",
                        "description": "Only return articles with this sentiment. Leave empty for all.",
                        "default": ""
                    },
                    "model": {
                        "title": "Claude Model",
                        "enum": [
                            "claude-haiku-4-5",
                            "claude-sonnet-4-6",
                            "claude-opus-4-7"
                        ],
                        "type": "string",
                        "description": "Haiku is recommended (fastest + cheapest). Opus for max accuracy.",
                        "default": "claude-haiku-4-5"
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
