📚 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
🐚
bashcURL / Shell
Basic shell script using cURL to fetch news
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