Real-time crypto data is incredibly useful, but most of the time, price movements happen because of specific events or news. Understanding the news behind a price action is equally as important as catching the price movement itself. This is where a crypto news API becomes essential for any developer building trading tools, portfolio trackers, or market dashboards.
In this guide, we'll show you how to use the CoinGecko API's crypto news endpoint to fetch real-time crypto news data, including the latest headlines and news specific to individual coins. We'll also walk through how to practically use it to build a trending crypto news dashboard and run sentiment analysis with a large language model. Let's dive in!

What Is a Crypto News API?
A crypto news API is an endpoint that returns structured, machine-readable news articles about cryptocurrencies without requiring you to build or maintain your own scrapers. Each response includes the article title, source, publication timestamp, URL, and thumbnail image, giving you everything you need to display or process news programmatically.
Unlike a generic news API, a cryptocurrency news API is designed specifically for the crypto ecosystem. The CoinGecko API, for example, provides a crypto news endpoint where you can filter news based on specific coins and also see which other coins each article is related to. You also get real-time curated news from over 100+ trusted sources like CoinTelegraph, Decrypt, and Lookonchain, which helps filter out the noise in a fast-moving market.
One important thing to note is that the CoinGecko crypto news API endpoint returns article headlines, metadata, and URLs to the original source. It does not return the full text content of each article. This makes it ideal for building news feeds, dashboards, and notification systems where you surface headlines and link out to the full news article.
Prerequisites
Before getting started, you will need a CoinGecko API key. The CoinGecko API crypto news endpoint is available on the Analyst plan and above, which also gives you access to 500,000 monthly API call credits, 500 calls per minute, and exclusive endpoints for market data, on-chain analytics, and more. If you do not have one yet, you can subscribe to an Analyst API plan to get started.
You will also need Python 3.8+ installed on your machine. Install the required dependencies with pip.
pip install requests python-dotenvNext, create a .env file in your project root to store your API key securely.
Setting Up Your API Configuration
Before making any API calls, create a shared configuration module that loads your API key and provides reusable helper functions for all the scripts in this tutorial.
Every script in this tutorial imports from config.py, so your API key and base URL are defined in one place. If you ever need to rotate your key or change your setup, you only update this file.
How to Fetch the Latest Crypto News in Python
The CoinGecko crypto news API endpoint returns the latest cryptocurrency news articles from over 100+ sources, including CoinTelegraph, Decrypt, and Lookonchain. Each article includes the title, source name, publication timestamp, URL, thumbnail image, and a list of related coins. By default, the endpoint returns 10 articles in English and updates every minute.
Let's make our first API call.
Running this script produces output like the following:

Each article in the response includes the headline, source publisher, timestamp, article URL, thumbnail image, and a list of CoinGecko coin IDs that the article mentions. This structured data makes it straightforward to build news feeds, filter articles by coin, or feed headlines into downstream pipelines without any parsing or scraping.
How to Filter Crypto News by Coin
To filter crypto news for a specific cryptocurrency, pass the coin's CoinGecko ID to the CoinGecko crypto news API endpoint and it will return only articles relevant to that coin. For example, passing bitcoin as the coin ID returns news that mentions Bitcoin, while passing ethereum returns Ethereum-specific coverage.
The important prerequisite here is that the endpoint requires the CoinGecko ID string (such as "bitcoin") rather than the ticker symbol (such as "BTC"). Most developers work with ticker symbols in their applications, so you need a way to convert symbols into CoinGecko IDs before making news queries. There are two approaches for this.
-
Approach 1 (Recommended): Using the /search endpoint. This returns results sorted by market cap rank, so searching for "BTC" returns Bitcoin (rank #1) first.
-
Approach 2: Using the /coins/list endpoint. This returns all coins alphabetically. Searching for "btc" may return other tokens before Bitcoin because the results are not ranked by popularity.
For production use, /search is the recommended approach for correct symbol resolution. Here is a helper function that takes a ticker symbol and returns the correct CoinGecko ID.
Fetching News for a Specific Coin
Now combine the resolver with the news fetcher to pull Bitcoin-specific headlines.
One behavior worth noting is that the related coins field in the response can include coins beyond the one you filtered for. A single article tagging both ETH and BTC will appear in both queries. This is useful to know if you are building a pipeline that deduplicates articles across multiple coin watchlists.
Fetching Guides Instead of News
The type parameter also supports "guides", which returns CoinGecko's own editorial guides rather than third-party news articles. This is useful for building an educational content section in a wallet or portfolio app where users can learn about specific assets they hold. Note that using type="guides" requires a coin ID parameter. Calling it without one returns a 400 error.
# Fetch CoinGecko editorial guides for Ethereum
params = {
"coin_id": "ethereum",
"type": "guides",
"per_page": 5,
}Paginating Through More Results
If you need more than the default 10 articles, the CoinGecko crypto news API endpoint supports up to 20 results per page and up to 20 pages. Below is an example of how you can easily paginate through the results.
How to Build a Trending Crypto News Dashboard
To build a real-time trending crypto news dashboard, we will combine the CoinGecko crypto news API endpoint with the trending coins and top gainers/losers endpoints to create a unified interface that shows not just what is trending, but why it is trending.
Step 1: Fetch Trending Coins, Gainers, and Losers
We use /search/trending to get the most-searched coins in the last 24 hours, and /coins/top_gainers_losers to get the biggest market movers by price change.
Step 2: Fetch News for Each Coin
Next, loop through the trending coins, gainers, and losers, and fetch related news for each one. We also call the /coins/{id} endpoint to fetch coin logo URLs for the dashboard display.
Step 3: Build the Dashboard
The build_dashboard method ties everything together by collecting trending coins, gainers, losers, and their related news into a single data structure.
Run the dashboard builder with:
python market_trends_dashboard.py
Frontend Demo
The GitHub repository includes a full interactive HTML dashboard that renders the trending crypto news data as a web page. Generate it with:
python market_trends_dashboard.py --htmlThis produces output/html/market_trends_demo.html with the following features:
-
Trending Coins section where you can click any coin to expand and see its related news headlines
-
Top Gainers (24h) section showing the biggest price movers, each with expandable news explaining why they are moving
-
Top Losers (24h) section showing the steepest decliners, each with expandable news for context
-
Latest Crypto News grid displaying a list of real-time articles with thumbnails, hyperlinked titles, source names, and related coin logos
-
Filter by coin dropdown that dynamically fetches and displays news for a selected coin

This is a complete, production-ready example of what a crypto news dashboard integration looks like, combining CoinGecko's trending, market movers, and crypto news endpoints into a unified view.
How to Use Crypto News for Sentiment Analysis
To build a crypto news sentiment analysis pipeline, you can use the CoinGecko crypto news API endpoint to fetch the latest article titles and source names for any coin, then pass them directly into a large language model prompt. The endpoint also returns a related coins field for each article, which lists all the cryptocurrencies mentioned in that story. This is helpful because you can batch-process news across an entire watchlist and automatically tag each article to every relevant coin in a single pass, rather than querying one coin at a time.
Here is a minimal pattern that fetches headlines for a coin and builds a prompt ready for any LLM API or SDK.

This script intentionally does not include a specific LLM SDK as a dependency. It generates the prompt string, which you can pass to OpenAI, Anthropic, Google, or any other provider your stack already uses.

Conclusion
You now have a working Python integration that pulls structured, coin-specific crypto news from over 100+ sources, filtered to whatever coins you care about, and ready to feed into any interface or pipeline you are building.
The dashboard example shows how powerful this becomes when you combine trending data, market movers, and news into a single view. Whether you are building a portfolio tracker, a trading terminal, or an AI sentiment pipeline, the CoinGecko crypto news API endpoint provides the content layer that compliments real-time price data for a more informed understanding of the fast moving markets.
To get started quickly with all the code from this tutorial, you can clone the GitHub repository which includes every script and the interactive HTML dashboard.
If you built the trending news dashboard and want to push those headlines to users automatically, building a crypto Telegram bot is the most natural next step since you already have the data layer and the bot is simply the delivery mechanism on top of it. If the sentiment analysis section caught your attention, our guide on developing a trading strategy based on sentiment signals goes much deeper into scoring and acting on those signals rather than just generating a summary.
Ready to start building? Subscribe to a CoinGecko API Analyst plan to unlock the crypto news endpoint, top gainers and losers data, and production-grade rate limits with 500,000 monthly API call credits. If you are not ready to subscribe yet, you can get a free Demo API key to explore over 50 crypto data endpoints with 10,000 free monthly API calls and see whether the CoinGecko API is the right fit for what you are building.
Subscribe to the CoinGecko Daily Newsletter!
Ethereum Mainnet
Base Mainnet
BNB Smart Chain
Arbitrum
Avalanche
Fantom
Flare
Gnosis
Linea
Optimism
Polygon
Polygon zkEVM
Scroll
Stellar
Story
Syscoin
Telos
X Layer
Xai