Skip to main content
Info Crypto uses the CryptoCompare public API to power the market news feed. It is the only integration besides CoinGecko and is responsible solely for fetching news articles — no market price data is sourced from CryptoCompare.
No API key is required for basic news access via the CryptoCompare public endpoint. The integration uses the free tier without any authentication headers.

Endpoint

GET /data/v2/news/

Fetches the latest cryptocurrency news articles. The integration filters results to Spanish-language (lang=ES) articles to match the app’s target audience. Source file: src/services/newsApi.jsnewsApi()
GET https://min-api.cryptocompare.com/data/v2/news/?lang=ES

Query parameters

query.lang
string
default:"ES"
Language filter for returned news articles. Set to ES to return Spanish-language articles only. CryptoCompare also supports EN (English) and other ISO 639-1 language codes.

Source code

src/services/newsApi.js
export async function newsApi() {
  try {
    const response = await fetch(
      "https://min-api.cryptocompare.com/data/v2/news/?lang=ES"
    );

    if (!response.ok) {
      throw new Error(`News request failed with status ${response.status}`);
    }

    const data = await response.json();
    return data;
  } catch (error) {
    console.error("Error fetching news:", error);
    throw error;
  }
}
Unlike cryptoApi.js and historyApi.js, this function explicitly checks response.ok and throws a descriptive error on non-2xx HTTP responses before attempting to parse the body.

Spanish language filter

The lang=ES query parameter restricts the feed to Spanish-language articles. This is hardcoded in the service and reflects the app’s primary locale. If you need to support English or other languages, update the lang value in the URL or make it a parameter passed into newsApi().

Cache key

KeyTTL
getNewsCrypto5 minutes
The cache helper keepNews() in src/services/cache.js reads getNewsCrypto from localStorage and skips the network request if the entry is less than 5 minutes old.
src/services/cache.js
export async function keepNews() {
  const cache = localStorage.getItem("getNewsCrypto");
  const cacheDate = localStorage.getItem("getNewsCryptoDate");

  if (cache && cacheDate && Date.now() - Number(cacheDate) < 5 * 60 * 1000) {
    return JSON.parse(cache);
  } else {
    const data = await newsApi();
    localStorage.setItem("getNewsCrypto", JSON.stringify(data));
    localStorage.setItem("getNewsCryptoDate", Date.now());
    return data;
  }
}

Response shape

Type
number
required
CryptoCompare response type code. 100 indicates a successful response.
Message
string
required
Human-readable status message from the API (e.g. "News list successfully returned").
Data
array
required
Array of news article objects.

Example response

{
  "Type": 100,
  "Message": "News list successfully returned",
  "Data": [
    {
      "id": "982345",
      "title": "Bitcoin supera los $70,000 por primera vez en semanas",
      "url": "https://example.com/bitcoin-70k",
      "imageurl": "https://images.cryptocompare.com/news/default/btc.png",
      "body": "El precio de Bitcoin alcanzó un nuevo máximo reciente...",
      "source": "CriptoNoticias",
      "published_on": 1713744000,
      "categories": "BTC|Market|Trading",
      "lang": "ES"
    }
  ]
}

Build docs developers (and LLMs) love