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. You can obtain an API key by contacting our support team or through your account dashboard.
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 has rate limits to ensure fair usage:
- REST API: 100 requests per minute per API key
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();
Next Steps
- Explore the REST API documentation for detailed endpoint information
- Read more about Rate Limits and Authentication for more detailed information