Information

Free API Client packages

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)LimitBucket name
/batch20/minbatch

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:

HeaderExampleMeaning
X-RateLimit-Limit300Maximum number of requests allowed in the current window.
X-RateLimit-Remaining300Amount of requests still available in the current rate-limit window.
X-RateLimit-Reset1234567890When 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

CodeNameDescription
200OKThe request was successfully completed.
400Bad RequestThe request is invalid due to client error.
401UnauthorizedAuthentication is required.
403ForbiddenYou do not have permission to view this page or perform this action.
429Too Many RequestsToo many requests in a short period.
500Internal Server ErrorAn internal server error occurred, try again later or report it here.
502Bad GatewayThe gateway encountered an error while processing the request, try again later.
503Service UnavailableThe server is temporarily unavailable, try again later.
504Gateway TimeoutThe 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.