Current User API
The /api/me endpoints let an authenticated client introspect itself —
who it's connected as, which plan is active, what limits apply, and how much of those limits
the current calendar month has already consumed. They're the first call every well-behaved
integration should make.
AI agents check “do I still have search quota before issuing this query?”, dashboards surface plan status to end users, and debuggers settle “which key am I authenticated as right now?”.
Machine-readable spec: the always-current OpenAPI definition lives in the interactive Swagger UI and at /api/openapi.json.
Get current user, plan, and key info ¶
Returns the authenticated user, their current plan with per-resource limits, the API key that authenticated the request (if any), and the effective dated API version. Use this as the first call in any integration to verify credentials and discover capabilities.
# who am I connected as, on which plan, with which key?
curl "https://www.audioscrape.com/api/me" \
-H "Authorization: Bearer YOUR_API_KEY"{
"user": {
"id": 42,
"email": "[email protected]",
"name": "Ada Lovelace",
"member_since": "2024-09-12 14:03:11 UTC"
},
"plan": {
"name": "pro",
"limits": {
"searches_per_month": 50000,
"semantic_searches_per_month": 10000,
"data_calls_per_month": 100000,
"keyword_alerts": 25,
"webhooks_enabled": true,
"max_api_keys": 10,
"transcription_minutes_per_month": 600,
"storage_mb": 20480
}
},
"api_key": {
"id": 17,
"key_name": "agent-orchestrator-prod",
"pinned_version": "2026-02-01"
},
"api_version": "2026-02-01"
}Response fields
Plan limits
Every field in plan.limits describes a per-resource cap. A null
value means “unlimited”; a 0 on a quota field means the feature is
disabled on this plan. For a side-by-side comparison of plans, see
/pricing.
Get current usage and limits ¶
Returns this calendar month's usage counters (searches, semantic searches, data calls,
keyword alerts) alongside the plan's configured limits. Use it to handle 429
responses proactively — check usage before a heavy burst and back off if you're close
to a cap.
# how much of this month's quota is already gone?
curl "https://www.audioscrape.com/api/me/usage" \
-H "Authorization: Bearer YOUR_API_KEY"{
"period": "2026-05",
"searches": {
"used": 1284,
"limit": 50000
},
"semantic_searches": {
"used": 312,
"limit": 10000
},
"data_calls": {
"used": 9417,
"limit": 100000
},
"keyword_alerts": {
"used": 4,
"limit": 25
}
}Response fields
Counter shape
Each counter object has the same two fields:
Authentication ¶
Both endpoints require a valid bearer token. API-key auth is the normal path for
integrations and populates the api_key object in the response. A logged-in
browser session also satisfies auth, in which case api_key is null.
Missing or invalid credentials return 401 Unauthorized.
See Authentication
for issuing keys, header conventions, and the Audioscrape-Version resolution rules.
When to use it ¶
Agent pre-flight quota check
Before issuing an expensive semantic search, an agent can confirm there's headroom and fall back to keyword search (or defer the call) when close to the cap:
import requests
H = {"Authorization": f"Bearer {API_KEY}"}
usage = requests.get("https://www.audioscrape.com/api/me/usage", headers=H).json()
sem = usage["semantic_searches"]
if sem["limit"] is not None and sem["used"] >= sem["limit"] * 0.95:
# Within 5% of the cap — fall back to cheaper text search.
search_type = "text"
else:
search_type = "semantic"Connection sanity check
Surface the active identity and plan in a dashboard, CLI banner, or MCP server's startup logs so users know which credentials are in play:
curl -sf "https://www.audioscrape.com/api/me" \
-H "Authorization: Bearer $AUDIOSCRAPE_API_KEY" \
| jq -r '"Connected as \(.user.email) on \(.plan.name) plan (key: \(.api_key.key_name // "session"))"'
Tip: both endpoints are cheap, but /api/me
is effectively static within a billing period — cache it for the lifetime of your
process. /api/me/usage is dynamic; refresh it on demand or at a low cadence
(e.g. once per minute) when building real-time quota displays.