๐Ÿ“š Code Examples

Ready-to-use code examples for integrating the Free Crypto News API. No API keys required โ€” just copy, paste, and run!

Choose an Example

๐Ÿš

cURL / Shell

Basic shell script using cURL to fetch news

bash
curl.sh
#!/bin/bash
# Free Crypto News API - curl examples
# No API key required!

API="https://news-crypto.vercel.app"

echo "๐Ÿ“ฐ Latest News"
curl -s "$API/api/news?limit=3" | jq '.articles[] | {title, source, timeAgo}'

echo -e "\n๐Ÿ” Search for 'ethereum'"
curl -s "$API/api/search?q=ethereum&limit=3" | jq '.articles[] | {title, source}'

echo -e "\n๐Ÿ’ฐ DeFi News"
curl -s "$API/api/defi?limit=3" | jq '.articles[] | {title, source}'

echo -e "\nโ‚ฟ Bitcoin News"
curl -s "$API/api/bitcoin?limit=3" | jq '.articles[] | {title, source}'

echo -e "\n๐Ÿšจ Breaking News"
curl -s "$API/api/breaking?limit=3" | jq '.articles[] | {title, source, timeAgo}'

echo -e "\n๐Ÿ“ก Sources"
curl -s "$API/api/sources" | jq '.sources[] | {name, status}'
๐Ÿ’ก No API key required โ€” works out of the box!View on GitHub