Skip to content

Keys, limits and errors

How to send your key, which APIs your plan includes, how requests are counted and what errors mean.

On this page

Keys

Send the key in the Authorization header as Bearer <key>. The X-Api-Key header also works. Never put the key in the URL.

Authorization: Bearer tsm_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

  • Every plan allows one unrevoked API key per account. Expired keys still occupy the slot until revoked. Revoking or replacing a key does not reset your account’s daily usage.
  • Copy the secret when creating the key; it cannot be viewed again.
Key lifetime and changes
  • Your key expires on the date shown in the dashboard. Access always follows your account’s current plan, regardless of the key’s tsm_test_ or tsm_live_ prefix.
  • Plan and allowlist changes may take up to 60 seconds. Revoking a key takes effect immediately.

Response language

All public football endpoints accept locale=zh-HK, locale=zh-CN or locale=en. An explicit locale takes priority over a supported Accept-Language header. If neither selects a supported language, the API uses zh-HK. Empty, repeated or unsupported locale values return 400 invalid_parameter. The website language does not select the Playground response language.

GET /v1/football/matches/live
GET /v1/football/matches/live?locale=zh-CN
GET /v1/football/matches/live?locale=en

Human-readable names and labels, including nested raw JSON, follow the requested language. English responses omit untranslated Chinese fields or use an English unavailable label where a value is required. Original/name_ch fields containing Chinese text and private provider metadata are omitted. Public IDs, numeric values and fixed codes remain stable. AI reports require a published version in the requested language; otherwise the API returns 404.

Content-Language identifies the selected language, including exchange and HKJC responses. Numeric corner analysis and plan/limit metadata remain language neutral. For caching, keep locale in the URL cache key and honor Cache-Control and Vary, including Accept-Language and protected credential headers.

Daily quota and per-minute limit

Your account has a daily quota: the number of requests you can make each day. It resets at 00:00 Hong Kong time (16:00 UTC). Each key also has a per-minute limit. Replacing a key does not reset the daily count.

A rate limit returns 429 and Retry-After. Wait before retrying; refused requests do not use the daily allowance.

Free fixture-list requests each day

Every plan includes free daily requests to GET /v1/football/matches: Free 50, Plus 500, Pro 2000. These are used before your daily quota. /matches/live and match details use the daily quota. Both daily allowances reset at midnight Hong Kong time. Replacing a key does not reset usage, and per-minute limits still apply. X-Matches-Bonus-* headers show the free fixture-list allowance on that endpoint.

Response headers
HeaderMeaning
X-RateLimit-LimitRequests allowed this minute.
X-RateLimit-RemainingHow many are left this minute.
X-RateLimit-ResetSeconds until the minute rolls over.
X-Quota-LimitRequests per day allowed for the account; excludes the separate fixture-list allowance.
X-Quota-RemainingRequests left in the account’s daily quota. Usage with revoked keys still counts.
X-Quota-ResetSeconds until 00:00 Hong Kong time (16:00 UTC).
X-Matches-Bonus-LimitFree fixture-list requests per day for the account (GET /v1/football/matches). Present on that endpoint only.
X-Matches-Bonus-RemainingFree fixture-list requests left for the account today. Used before the daily quota.
X-Matches-Bonus-ResetSeconds until the fixture-list allowance resets at 00:00 Hong Kong time.

Need more requests? Compare the plans on pricing page.

IP allowlisting

An IP allowlist restricts a key to the addresses you add. It is optional: an empty list allows requests from any IP. To restrict access, add the public IP addresses your server uses to send requests.

  • Single addresses or CIDR blocks, no broader than /24 (IPv4) or /48 (IPv6).
  • Private and loopback ranges are rejected — this API never sees them.
  • If an IP restriction blocks a request, the response shows the public IP address the API received. Use it to check which address your server is sending from.

Responses and pagination

Most endpoints return JSON under data. /matches also includes pagination meta; /matches/live is not paginated. /odds/exchange returns its stored JSON directly. kickoffUtc is ISO-8601 UTC, while historical analysis dates retain their stored format. Missing optional properties are omitted. Follow the response schema for each endpoint.

"meta": { "page": 1, "pageSize": 300, "total": 650, "totalPages": 3 }

For /matches and /odds/betfairmatchids, page starts at 1; pageSize defaults to 300 and is capped at 400.

Errors

Errors come back as JSON with a code field. Check code in your program; the message text may change.

Example error response
429 · application/problem+json
{
  "type": "https://tipsme.hk/developers/docs/errors#quota_exceeded",
  "title": "Daily quota exceeded",
  "status": 429,
  "detail": "This account allows 5000 plan requests per day. The quota resets at 00:00 Hong Kong time (16:00 UTC).",
  "code": "quota_exceeded"
}

StatuscodeMeaning
400invalid_parameterA parameter failed validation; the body names which.
401unauthorizedNo key was sent.
401key_invalidUnknown or revoked key.
403key_expiredThe key has passed its expiry date.
403tier_insufficientAnalysis and structured Betfair summaries require a Plus or Pro API key. Free keys receive 403 without spending daily quota. Existing common odds APIs and Betfair match-ID discovery remain available on all plans.
403historical_access_requiredThe match is older than the last 30 Hong Kong calendar days including today. An active historical-access grant is required, in addition to the endpoint’s usual plan requirements. The refusal does not spend daily quota but counts toward the rate limit.
403ip_not_allowedThe calling address is not on this key’s allowlist.
404not_foundNo such resource.
409key_limit_reachedThis account already has its one allowed API key. Revoke it before creating another.
409allowlist_limit_reachedThis key already has the maximum allowlist entries.
429rate_limitedPer-minute limit exceeded. See Retry-After.
429quota_exceededThe account’s daily quota is spent. It resets at midnight Hong Kong time (16:00 UTC).
502upstream_malformedUpstream answered but the payload could not be parsed.
503upstream_unavailableA data source is temporarily unreachable. Retry.

Start on the free tier

One API key, 30 requests per day per account, plus 50 free fixture-list requests per day. Real data, no card required.

Was this page helpful?Contact support →