Default module
Base URLs: https://api.alkimi.org
Authentication
public
GET Get Data
GET /api/v1/public/data
Community Data API Documentation
Overview
The Community Data API provides access to aggregated community statistics including transaction counts, impression counts, and revenue data. Access to the API is rate-limited to ensure fair usage for all clients.
Endpoint
GET /api/v1/public/data
Query Parameters
| Parameter | Required | Description | Format |
|---|---|---|---|
| startDate | Yes | Start date of the requested period | YYYY-MM-DD |
| endDate | Yes | End date of the requested period | YYYY-MM-DD |
Rate Limiting
To ensure fair usage, the API implements rate limiting. Current limits are tracked via response headers:
X-RateLimit-Remaining: Number of requests remaining in the current time windowX-RateLimit-Reset: Unix timestamp when the rate limit resetsX-Daily-Quota-Remaining: Number of requests remaining for the current day
Constraints
- Maximum date range: 31 days
- End date must not be before start date
- Dates must be in YYYY-MM-DD format
Response Format
Success Response (200 OK)
{
"status": "Success",
"data": [
{
"date": "2024-12-18",
"txn_count": 1000,
"impr_count": 5000,
"alkimi_revenue": 150.75
}
]
}
Response Fields
| Field | Type | Description |
|---|---|---|
| date | string | Date in YYYY-MM-DD format |
| txn_count | number | Number of transactions |
| impr_count | number | Number of impressions |
| alkimi_revenue | number | Revenue amount |
Error Responses
Invalid Request (400)
Returned when the request parameters are invalid.
{
"code": "ALK1005",
"message": "Invalid Request Parameter – One or more parameters in the request are invalid."
}
Rate Limit Exceeded (429)
Returned when rate limit or daily quota is exceeded.
{
"code": "ALK1010",
"message": "Rate Limit Exceeded – Too many requests in a given amount of time."
}
Example Requests
cURL
curl -X GET 'https://api.alkimi.org/api/v1/public/data?startDate=2024-12-01&endDate=2024-12-18'
JavaScript
const response = await fetch(
"https://api.alkimi.org/api/v1/public/data?startDate=2024-12-01&endDate=2024-12-18"
)
const data = await response.json()
Python
import requests
response = requests.get(
'https://api.alkimi.org/api/v1/public/data',
params={
'startDate': '2024-12-01',
'endDate': '2024-12-18'
}
)
data = response.json()
Best Practices
- Monitor rate limit headers to avoid hitting limits
- Implement exponential backoff when rate limits are hit
- Keep date ranges within the 31-day limit
- Always use YYYY-MM-DD format for dates
- Cache responses when appropriate
Support
For API support or questions, please contact support
Params
| Name | Location | Type | Required | Description |
|---|---|---|---|---|
| startDate | query | string | no | starting date from which you want to fetch data |
| endDate | query | string | no | ending date upto which you want to fetch data |
Response Examples
200 Response
{
"status": "string",
"data": [
{
"date": "string",
"txn_count": 0,
"impr_count": 0,
"alkimi_revenue": 0
}
]
}
Responses
| HTTP Status Code | Meaning | Description | Data schema |
|---|---|---|---|
| 200 | OK | none | Inline |
Responses Data Schema
HTTP Status Code 200
Resposne
| Name | Type | Required | Restrictions | Title | description |
|---|---|---|---|---|---|
| » status | string | true | none | sucess status | |
| » data | [object] | true | none | array of transaction count , impression count and alkimi revenue | |
| »» date | string | false | none | date for which data is shown | |
| »» txn_count | integer | false | none | transaction count for same day | |
| »» impr_count | integer | false | none | impression count for day | |
| »» alkimi_revenue | number | false | none | alkmi revenue for date |