API Documentationv1
api.md

DarwinTrack API

Telegram OSINT and user analytics via REST API

API Key Auth
One header, instant access
7 Endpoints
User, resolve, messages, groups, interests, profile, full-report
Credit-based
Pay per request, cached data is free

Authentication

All requests require an X-API-Key header. Generate your key in the Dashboard menu.

bash
curl -X GET https://darwintrack.com/api/v1/user \
  -H "X-API-Key: YOUR_API_KEY"
Keep your API key secret. Never expose it in client-side code. Use server-to-server requests only.

Typical workflow

Step 1
Resolve
Convert @username to user_id
Step 2
Fetch data
Call messages, groups, interests, or profile
Step 3
Or use Full Report
Single call for everything

Endpoints

GET/api/v1/user

Account & Balance

Returns your account info, current balance, and pricing for all services.

bash
curl -X GET https://darwintrack.com/api/v1/user \
  -H "X-API-Key: YOUR_API_KEY"
POST/api/v1/resolve

Resolve Username

Resolve a Telegram @username or phone to an internal user_id. Required before fetching data.

Body{ "username": "@durov" }
bash
curl -X POST https://darwintrack.com/api/v1/resolve \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"username": "@durov"}'
POST/api/v1/messages

Messages

Get public messages of a resolved Telegram user from open groups and channels.

Body{ "user_id": "123456789" }
bash
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"}'
POST/api/v1/groups

Groups & Channels

Get all public groups and channels a user belongs to.

Body{ "user_id": "123456789" }
bash
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"}'
POST/api/v1/interests

Interests

AI-detected interests based on user activity in channels and groups.

Body{ "user_id": "123456789" }
bash
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"}'
POST/api/v1/profile

AI Profile

Full AI-generated behavioral profile based on all collected data. Takes up to 30 seconds.

Body{ "user_id": "123456789" }
bash
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"}'
POST/api/v1/full-report

Full Report

Single call that resolves a username and returns messages, groups, interests, and AI profile.

Body{ "username": "@durov" }
bash
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

HTTPCodeDescription
401MISSING_API_KEYX-API-Key header is missing
401INVALID_API_KEYThe API key format is invalid
401API_KEY_NOT_FOUNDNo account matches this key
400INVALID_USERNAMEMissing or invalid username / user_id
402INSUFFICIENT_BALANCENot enough credits on your balance
404USER_NOT_FOUNDTelegram user could not be resolved
500INTERNAL_ERRORUnexpected server error
json
{
  "error": {
    "code": "INSUFFICIENT_BALANCE",
    "message": "Not enough credits"
  }
}

Pricing (credits)

Cached requests (repeat queries for the same user) are free or heavily discounted.

EndpointFirst requestCached
Resolveenv-configuredfree or reduced
Messagesenv-configuredfree or reduced
Groupsenv-configuredfree or reduced
Interestsenv-configuredfree or reduced
AI Profileenv-configuredfree or reduced
Full Reportsum 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_id in 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

python
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"])
DarwinTrack API v1 -- Need help? Contact support