Skip to main content
GET
/
api
/
token
/
search
Search Tokens
curl --request GET \
  --url https://api.example.com/api/token/search

Overview

Search for tokens by keyword with fuzzy matching on token names.

Request Parameters

keyword
string
required
Search keyword, matches against token names

Response Format

{
  "success": true,
  "message": "",
  "data": [
    {
      "id": 5,
      "name": "Production",
      "key": "sk-xxxxxxxx",
      "status": 1,
      "remain_quota": 50000,
      "used_quota": 8000,
      "created_time": 1706000000
    }
  ]
}

Code Examples

import requests

headers = {
    "Authorization": "Bearer your_access_token",
    "New-Api-User": "1",
    "User-Agent": "Mozilla/5.0"
}

response = requests.get(
    "https://crazyrouter.com/api/token/search?keyword=production",
    headers=headers
)

tokens = response.json()["data"]
for token in tokens:
    print(f"[{token['id']}] {token['name']} - Remaining quota: {token['remain_quota']}")