DarwinTrack API
Telegram OSINT and user analytics via REST API
Authentication
All requests require an X-API-Key header. Generate your key in the Dashboard menu.
curl -X GET https://darwintrack.com/api/v1/user \
-H "X-API-Key: YOUR_API_KEY"Typical workflow
Endpoints
/api/v1/userAccount & Balance
Returns your account info, current balance, and pricing for all services.
curl -X GET https://darwintrack.com/api/v1/user \
-H "X-API-Key: YOUR_API_KEY"/api/v1/resolveResolve Username
Resolve a Telegram @username or phone to an internal user_id. Required before fetching data.
{ "username": "@durov" }curl -X POST https://darwintrack.com/api/v1/resolve \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"username": "@durov"}'/api/v1/messagesMessages
Get public messages of a resolved Telegram user from open groups and channels.
{ "user_id": "123456789" }curl -X POST https://darwintrack.com/api/v1/messages \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"user_id": "123456789"}'/api/v1/groupsGroups & Channels
Get all public groups and channels a user belongs to.
{ "user_id": "123456789" }curl -X POST https://darwintrack.com/api/v1/groups \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"user_id": "123456789"}'/api/v1/interestsInterests
AI-detected interests based on user activity in channels and groups.
{ "user_id": "123456789" }curl -X POST https://darwintrack.com/api/v1/interests \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"user_id": "123456789"}'/api/v1/profileAI Profile
Full AI-generated behavioral profile based on all collected data. Takes up to 30 seconds.
{ "user_id": "123456789" }curl -X POST https://darwintrack.com/api/v1/profile \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"user_id": "123456789"}'/api/v1/full-reportFull Report
Single call that resolves a username and returns messages, groups, interests, and AI profile.
{ "username": "@durov" }curl -X POST https://darwintrack.com/api/v1/full-report \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"username": "@durov"}'Error codes
| HTTP | Code | Description |
|---|---|---|
| 401 | MISSING_API_KEY | X-API-Key header is missing |
| 401 | INVALID_API_KEY | The API key format is invalid |
| 401 | API_KEY_NOT_FOUND | No account matches this key |
| 400 | INVALID_USERNAME | Missing or invalid username / user_id |
| 402 | INSUFFICIENT_BALANCE | Not enough credits on your balance |
| 404 | USER_NOT_FOUND | Telegram user could not be resolved |
| 500 | INTERNAL_ERROR | Unexpected server error |
{
"error": {
"code": "INSUFFICIENT_BALANCE",
"message": "Not enough credits"
}
}Pricing (credits)
Cached requests (repeat queries for the same user) are free or heavily discounted.
| Endpoint | First request | Cached |
|---|---|---|
| Resolve | env-configured | free or reduced |
| Messages | env-configured | free or reduced |
| Groups | env-configured | free or reduced |
| Interests | env-configured | free or reduced |
| AI Profile | env-configured | free or reduced |
| Full Report | sum of all | - |
Rate limits & best practices
- No hard rate limit currently, but excessive requests may be throttled. Keep requests under 60 / minute.
- Always resolve first, then use the
user_idin subsequent calls. - Cached data is returned when available at reduced or zero cost. Use this to save credits.
- AI Profile endpoint may take up to 30 seconds. Set appropriate timeouts.
- Full Report endpoint may take up to 60 seconds. It combines all endpoints in one call.
Python example
import requests
API_KEY = "your_api_key_here"
BASE = "https://darwintrack.com/api/v1"
HEADERS = {"X-API-Key": API_KEY, "Content-Type": "application/json"}
# Step 1: Resolve username
r = requests.post(f"{BASE}/resolve", json={"username": "@durov"}, headers=HEADERS)
user_id = r.json()["user_id"]
# Step 2: Get messages
r = requests.post(f"{BASE}/messages", json={"user_id": user_id}, headers=HEADERS)
messages = r.json()["messages"]
print(f"Found {len(messages)} messages")
# Step 3: Get AI profile
r = requests.post(f"{BASE}/profile", json={"user_id": user_id}, headers=HEADERS, timeout=35)
print(r.json()["analysis"])