๐ 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