Free API Client packages
| Language | GitHub | Documentation |
|---|---|---|
| Python (AS7RIDENIED) | AS7RIDENIED/LOLZTEAM | Market.md |
| Python (medovi40k) | medovi40k/lolzteam-py | README.md |
| TypeScript | liwidale/lolzteam-api-ts | README.md |
| PHP | kyo-lzt/lolzteam-php | README.md |
| Go (fantolla123) | fantolla123/lzt-api-go | — |
| Rust | Mlinec/lolzteam-api-rs | README.md |
| Java | Mlinec/lolzteam-api-java | README.md |
| Dart | recate-rat237/lzt-dart | — |
| C# | dexsper/Lolzteam.Api | README.md |
API Rate Limits
The API enforces rate limits to protect the service. Every response includes headers that tell you your current limit status, and exceeding any limit returns a 429 Too Many Requests error.
Base Limits
Base limits apply to all requests unless an endpoint has its own counter:
- GET – 300r/60s
- non-GET – 30r/60s
Endpoints With Independent Limits
These endpoints have their own counters and are not counted toward the base limits:
| Endpoint(s) | Limit | Bucket name |
|---|---|---|
| /batch | 20/min | batch |
Note on /batch: each nested request still counts against its own endpoint's limit independently. For example, batching 10 calls to GET /threads consumes 10 from the GET limit and 1 from the /batch limit.
Exceeding any limit returns a 429 error.
Get Current Rate Limit Info
Each response carries rate-limit metadata in its headers and response body:
| Header | Example | Meaning |
|---|---|---|
X-RateLimit-Limit | 300 | Maximum number of requests allowed in the current window. |
X-RateLimit-Remaining | 300 | Amount of requests still available in the current rate-limit window. |
X-RateLimit-Reset | 1234567890 | When the limit resets, as a Unix timestamp. |
{
"system_info": {
"rate_limit": {
"limit": 300,
"remaining": 300,
"reset": 1234567890,
"bucket": "bucket_name"
},
"visitor_id": 1234567890,
"time": 1234567890,
"log_id": 1234567890
}
}
Token configuration
You must pass the token in the request headers
- Header: "Authorization: Bearer token"
Discoverability
System information and availability can be determined by sending a GET request to / (index route). A list of resources will be returned. If the request is authenticated, the revisions of API system and installed modules will also made available for further inspection.
Status codes
| Code | Name | Description |
|---|---|---|
| 200 | OK | The request was successfully completed. |
| 400 | Bad Request | The request is invalid due to client error. |
| 401 | Unauthorized | Authentication is required. |
| 403 | Forbidden | You do not have permission to view this page or perform this action. |
| 429 | Too Many Requests | Too many requests in a short period. |
| 500 | Internal Server Error | An internal server error occurred, try again later or report it here. |
| 502 | Bad Gateway | The gateway encountered an error while processing the request, try again later. |
| 503 | Service Unavailable | The server is temporarily unavailable, try again later. |
| 504 | Gateway Timeout | The gateway timed out waiting for a response, try again later. |
SSL Verification Errors
If you encounter an SSL verification error, disable SSL/TLS certificate verification in your http client.
Common Parameters
i18n
All API requests accept locale parameter to switch user facing messages to specified language. The value must be a valid language code (ISO 639-1) with optional inclusion of a valid country code (ISO 3166-1 alpha 2) separated by a hyphen ("-"). If no complete match can be found, a language with the same language code (even with different country code) will be used. In the worst case that there are no installed languages of requested language code, the default language will be used.
Fields filtering
For API method with resource data like a forum or a thread, the data can be filtered to get interested fields only. The general format is "key.sub_key.deep_key" if you want to include/exclude a specific field. The including rules take precedence over excluding ones.
- fields_include: comma-separated list of fields of a resource. For additional fields, it is possible to use wildcard (*****) to include all default fields before specifying additional ones.
- fields_exclude: comma-separated list of fields of a resource to exclude in the response. It is possible to use wildcard as a prefix (e.g. "*.key") to exclude the field everywhere.
Resource ordering
For API method with list of resources, the resources can be ordered differently with the parameter order. List of supported orders will be specified for each method. The default order will always be natural. Most of the time, the natural order is the order of which each resource is added to the system (resource ID for example).
Encryption
For sensitive information like password, encryption can be used to increase data security. For all encryption with key support, the client_secret will be used as the key.
List of supported encryptions:
- aes128: AES 128-bit encryption (mode: ECB, padding: PKCS#7). Because of algorithm limitation, the binary md5 hash of key will be used instead of the key itself.
Headers
- Api-Bb-Code-Chr: !youtube: Replace multimedia tags (except youtube) in bbcode html with tools/chr link.
- Api-Username-Inline-Style: Return rich username for username fields.
Content-Type
API always returns the response as application/json (With few exceptions). You should send requests to API with application/json or application/x-www-form-urlencoded content type.
OpenAPI JSON
You can import the API into Postman using this file.