Getting Started with Elfa APIs
Welcome to the Elfa API documentation! This guide will help you get started with our REST API.
Authentication
All Elfa APIs require authentication using an API key. Get your API key from the Elfa Developer Portal.
REST API Authentication
For REST API calls, include your API key in the request header:
x-elfa-api-key: your_api_key_here
API Overview
REST API
Our REST API provides endpoints for querying historical data, including:
- Mentions with smart engagement
- Top mentions for specific tokens
- Trending tokens
- Account statistics
- Keyword searches
To learn more, visit the REST API documentation.
Rate Limits
REST API rate limits depend on your subscription tier:
- Free / Chill / PAYG: 60 requests per minute
- Grow: 120 requests per minute
See the Rate Limits page for full details on monthly call credits.
Example Applications
JavaScript/TypeScript Example
Here's a basic example of using the REST API in a Node.js application:
import axios from "axios";
// API key
const API_KEY = "your_api_key_here";
// REST API example - get trending tokens
async function getTrendingTokens() {
try {
const response = await axios.get("https://api.elfa.ai/v2/aggregations/trending-tokens", {
headers: {
"x-elfa-api-key": API_KEY,
},
params: {
timeWindow: "24h",
},
});
console.log("Trending tokens:", response.data);
} catch (error) {
console.error("Error fetching trending tokens:", error);
}
}
// Run example
getTrendingTokens();
Keyless Access (x402)
If you prefer pay-per-request access without an API key, Elfa supports the x402 protocol. Pay with USDC on Base — no registration required. This is ideal for AI agents and bots.
Next Steps
- Explore the REST API documentation for detailed endpoint information
- Read more about Rate Limits and Authentication for more detailed information
- Learn about x402 Payments for keyless, per-request access