B3 Profiles API
Free unified onchain identity aggregation service with social identity data from B3, Basement, ENS, Lens, and Farcaster
Overview
The B3 Profiles service serves as a data API for resolving decentralized user identities across the EVM ecosystem. It aggregates profile data from multiple sources and protocols, providing developers with a single API endpoint to access comprehensive user information and social context.
Key Features
Supported Data Sources
- ENS (Ethereum Name Service)
- Lens Protocol
- Farcaster
- B3.ID
- Basement profiles
API Endpoints
Check out the API reference for more details.
Profile Lookup
Retrieve aggregated profile information for any wallet address or username.
bashGET https://profiles.b3.fun/?address=0x1234567890abcdef1234567890abcdef12345678GET https://profiles.b3.fun/?name=vitalik.ethGET https://profiles.b3.fun/?name=sean.b3.fun
Set Profile Preferences
Allow users to specify their preferred profile source through cryptographic signatures.
bashPOST /preference
Custom Display Names
Enable users to set custom display names that override all other sources.
bashPOST /display-name
Response Format
The service returns a unified profile object that combines data from all sources:
json{ "name": "vitalik.eth", "address": "0x1234567890abcdef1234567890abcdef12345678", "avatar": "https://example.com/avatar.jpg", "bio": "Ethereum co-founder", "displayName": "Vitalik Buterin", "profiles": [ { "type": "ensdata", "address": "0x123...", "name": "vitalik.eth", "avatar": "https://...", "bio": null, "displayName": null }, { "type": "thirdweb-farcaster", "address": "0x123...", "name": "vitalik", "avatar": "https://...", "bio": "Ethereum co-founder", "displayName": "Vitalik Buterin" } ]}
Use Cases
Example Usage
Basic Profile Lookup
javascript// Fetch profile by addressconst response = await fetch('https://profiles.b3.fun/?address=0x123...');const profile = await response.json();console.log(profile.displayName); // "Vitalik Buterin"console.log(profile.profiles.length); // Number of sources found
ENS Name Resolution
javascript// Fetch profile by ENS nameconst response = await fetch('https://profiles.b3.fun/?name=vitalik.eth');const profile = await response.json();console.log(profile.address); // Resolved wallet addressconsole.log(profile.avatar); // ENS avatar URL
Setting User Preferences
javascript// Set preferred profile source with signatureconst message = `SetProfilePreference:${address}:thirdweb-farcaster:${timestamp}`;const signature = await wallet.signMessage(message);await fetch('https://profiles.b3.fun/preference', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ key: address, preferredType: 'thirdweb-farcaster', signature, signer: address, timestamp })});
Performance & Caching
- Cache Duration: 1 hour for profile data
- Fresh Data: Use
?fresh=trueto bypass cache - Global CDN: Powered by Cloudflare's edge network
- KV Storage: Efficient key-value storage for preferences
Rate Limits
The service inherits Cloudflare's built-in DDoS protection and rate limiting. For high-volume applications, consider implementing client-side caching or contact the B3 team for enterprise access.
Building onchain made easy
Check out the API reference for more details.