Working code examples for the bluepages.fyi API - map Ethereum addresses to social profiles (Twitter, Farcaster, ENS).
Status: ✅ Tested and working
Batch lookup script using x402 micropayments:
- Reads addresses from CSV
- Checks which addresses exist ($0.04 per 50)
- Fetches full data only for found addresses ($2.00 per 50)
- Optimized two-phase approach saves money
Status: ✅ Tested and working
Shows the complete API key workflow:
- Authenticate with wallet signature
- Get your API key automatically
- View available credit packages
- Purchase credits with x402 payment
- Use API key for lookups (no per-request payment)
- Check your stats and regenerate keys
Status: ✅ Tested and working
Python version of the batch lookup script:
- Uses x402 library for per-request payments
- Two-phase optimization (check then fetch)
- Reads from CSV, outputs JSON
Status: ✅ Tested and working
Python version of the API key workflow:
- Authenticate and get API key
- View packages
- Use API key for lookups
- Check stats
- Regenerate keys
cd javascript/
npm install
echo "PAYMENT_PRIVATE_KEY=0xyour_key" > ../.env
npm startcd javascript/
npm install
echo "PAYMENT_PRIVATE_KEY=0xyour_key" > ../.env
node api-key-example.jscd python/
pip install -r requirements.txt
echo "PAYMENT_PRIVATE_KEY=0xyour_key" > ../.env
python3 fetch_twitter_data.pycd python/
pip install -r requirements.txt
echo "PAYMENT_PRIVATE_KEY=0xyour_key" > ../.env
python3 api-key-example.py- Node.js (for JavaScript)
- Python 3.8+ (for Python)
- USDC on Base mainnet (for purchases)
- Private key with USDC balance
Per-Request (x402):
batch/check: $0.04 per 50 addressesbatch/data: $2.00 per 50 addresses
API Key (Credits):
- Starter: 5,000 credits for $5
- Pro: 50,000 credits for $45
- Enterprise: 1,000,000 credits for $600
1 credit = 1 API call