Appearance
Crypto Historical Articles
The Historical Articles endpoint works like Crypto Articles but covers longer time windows — from 2 days up to 30 days back. Use it when you need to analyse trends, build charts, or backfill a dataset beyond the 24-hour window of the standard articles endpoint.
Use this to:
- Build sentiment trend charts over the past week or month
- Backfill a database with historical crypto news data
- Compare how coverage of a coin or topic has evolved over time
- Export large CSV datasets for offline analysis or ML training
Base URL
https://crypto-news51.p.rapidapi.comRapidAPI key required
Include your RapidAPI credentials on every request. See Authentication.
Get historical articles
GET/api/v1/crypto/historical_articles
Returns a paginated array of news articles published within the selected historical time frame. Results are sorted by published descending (newest first).
Authentication
| Header | Value |
|---|---|
X-RapidAPI-Key | Your RapidAPI secret key |
X-RapidAPI-Host | crypto-news51.p.rapidapi.com |
Query parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
| time_frame | string | 30d | Historical lookback window. Accepted values:2d — last 2 days3d — last 3 days4d — last 4 days5d — last 5 days6d — last 6 days7d — last 7 days30d — last 30 days |
| page | integer | 1 | Page number for pagination. Use together with limit to walk through all results. |
| limit | integer | 10 | Number of articles per page. Maximum: 100. |
| source | string | — | Filter articles to a single publisher. Accepts one value only. See Sources for all valid identifiers. |
| format | string | json | Response format: json or csv. Use csv for bulk data export. |
Example requests
bash
curl "https://crypto-news51.p.rapidapi.com/api/v1/crypto/historical_articles?page=1&limit=10&time_frame=30d&format=json" \
-H "X-RapidAPI-Key: YOUR_RAPIDAPI_KEY" \
-H "X-RapidAPI-Host: crypto-news51.p.rapidapi.com"bash
curl "https://crypto-news51.p.rapidapi.com/api/v1/crypto/historical_articles?time_frame=7d&source=coindesk&limit=50" \
-H "X-RapidAPI-Key: YOUR_RAPIDAPI_KEY" \
-H "X-RapidAPI-Host: crypto-news51.p.rapidapi.com"bash
curl "https://crypto-news51.p.rapidapi.com/api/v1/crypto/historical_articles?time_frame=30d&limit=100&format=csv" \
-H "X-RapidAPI-Key: YOUR_RAPIDAPI_KEY" \
-H "X-RapidAPI-Host: crypto-news51.p.rapidapi.com" \
-o historical-articles.csvjavascript
const params = new URLSearchParams({
page: '1',
limit: '10',
time_frame: '30d',
format: 'json',
})
const response = await fetch(
`https://crypto-news51.p.rapidapi.com/api/v1/crypto/historical_articles?${params}`,
{
headers: {
'X-RapidAPI-Key': process.env.RAPIDAPI_KEY,
'X-RapidAPI-Host': 'crypto-news51.p.rapidapi.com',
},
}
)
const articles = await response.json()
for (const article of articles) {
const date = article.published.slice(0, 10)
const { label, score } = article.sentiment
console.log(`${date} [${label.toUpperCase()} ${(score * 100).toFixed(1)}%] ${article.title}`)
}javascript
async function fetchAllHistorical(timeFrame = '30d', source = null) {
const headers = {
'X-RapidAPI-Key': process.env.RAPIDAPI_KEY,
'X-RapidAPI-Host': 'crypto-news51.p.rapidapi.com',
}
const all = []
let page = 1
const limit = 100
while (true) {
const params = new URLSearchParams({ page, limit, time_frame: timeFrame, format: 'json' })
if (source) params.set('source', source)
const res = await fetch(
`https://crypto-news51.p.rapidapi.com/api/v1/crypto/historical_articles?${params}`,
{ headers }
)
const batch = await res.json()
if (!Array.isArray(batch) || batch.length === 0) break
all.push(...batch)
console.log(`Page ${page}: fetched ${batch.length} articles (total so far: ${all.length})`)
if (batch.length < limit) break
page++
}
return all
}
const articles = await fetchAllHistorical('30d')
console.log(`Backfill complete: ${articles.length} articles`)python
import os
import requests
response = requests.get(
"https://crypto-news51.p.rapidapi.com/api/v1/crypto/historical_articles",
params={
"page": 1,
"limit": 10,
"time_frame": "30d",
"format": "json",
},
headers={
"X-RapidAPI-Key": os.environ["RAPIDAPI_KEY"],
"X-RapidAPI-Host": "crypto-news51.p.rapidapi.com",
},
)
response.raise_for_status()
articles = response.json()
for article in articles:
date = article["published"][:10]
s = article["sentiment"]
confidence = round(s["score"] * 100, 1)
print(f"{date} [{s['label'].upper():8} {confidence:5.1f}%] {article['title'][:70]}")python
import os, requests
from collections import defaultdict
def fetch_all_historical(time_frame="30d", source=None):
session = requests.Session()
session.headers.update({
"X-RapidAPI-Key": os.environ["RAPIDAPI_KEY"],
"X-RapidAPI-Host": "crypto-news51.p.rapidapi.com",
})
all_articles, page, limit = [], 1, 100
while True:
params = {"page": page, "limit": limit, "time_frame": time_frame, "format": "json"}
if source:
params["source"] = source
resp = session.get(
"https://crypto-news51.p.rapidapi.com/api/v1/crypto/historical_articles",
params=params,
)
resp.raise_for_status()
batch = resp.json()
if not batch:
break
all_articles.extend(batch)
print(f"Page {page}: {len(batch)} articles (total: {len(all_articles)})")
if len(batch) < limit:
break
page += 1
return all_articles
# Backfill and group by date + sentiment
articles = fetch_all_historical("30d")
daily = defaultdict(lambda: {"positive": 0, "neutral": 0, "negative": 0})
for a in articles:
date = a["published"][:10]
daily[date][a["sentiment"]["label"]] += 1
print("\nDate Positive Neutral Negative")
for date in sorted(daily):
d = daily[date]
print(f"{date} {d['positive']:8} {d['neutral']:7} {d['negative']:8}")Response
A JSON array of article objects, identical in structure to Crypto Articles.
json
[
{
"title": "XRP Active Wallets Show 41% Average Loss as MVRV Drops to 2022 Lows",
"summary": "The post XRP Active Wallets Show 41% Average Loss as MVRV Drops to 2022 Lows appeared on BitcoinEthereumNews.com.",
"media": [
"https://i1.wp.com/res.coinpaper.com/coinpaper/image/upload/v1774983575/X1_9c4f034964.webp"
],
"link": "https://bitcoinethereumnews.com/tech/xrp-active-wallets-show-41-average-loss-as-mvrv-drops-to-2022-lows/",
"authors": [
{ "name": "Bitcoin Ethereum News" }
],
"published": "2026-04-07T13:29:15+00:00",
"category": "financial",
"subCategory": "cryptocurrency",
"language": "en",
"timeZone": "UTC",
"sentiment": {
"label": "negative",
"score": 0.9732691645622253
}
}
]For a full field-by-field breakdown see Article object fields.
Error responses
| Status | Code | Description |
|---|---|---|
| 400 | bad_request | Invalid time_frame value or limit exceeds 100 |
| 401 | unauthorized | X-RapidAPI-Key is missing or invalid |
| 403 | forbidden | Your RapidAPI plan does not include access to this endpoint |
| 429 | too_many_requests | RapidAPI rate limit exceeded |
| 500 | internal_error | Server error — safe to retry after a short delay |
Related endpoints
| Endpoint | Description |
|---|---|
| Crypto Articles | Recent articles — up to 24 hours |
| Articles Search | Search articles by title keyword |
| Crypto Sentiment | Aggregated sentiment counts for a time interval |
| Sources | List of active publisher identifiers |