REST APICategories

Get category translations

GET
/categories/{slug}/translations

Fetch all available translations for a category, its markets, and their outcomes for the requested languages in a single call.

languages is a comma-separated list of BCP 47 language codes (e.g. zh-CN,ja-JP,ko-KR). If a language code has no completed translations it is omitted from the response rather than returning an error.

Authorization

ApiKeyAuth
headerx-api-key<token>

API key authentication via the x-api-key header.

Path Parameters

slug*string

The category's slug.

Lengthlength <= 256

Query Parameters

languages?string

Language codes to return, comma-separated, as GET /v1/languages lists them. Without any, translations comes back empty.

Lengthlength <= 256

Response Body

application/json; charset=utf-8
  1. response

Response for GET /v1/categories/:slug/translations

translations*

Map from language code (e.g. "zh-CN") to its translations.

Example Request
curl -X GET 'https://api.predict.fun/v1/categories/string/translations'
Example Response
{  "translations": {    "property1": {      "category": {        "title": "string",        "shortTitle": "string"      },      "markets": [        {          "id": 0,          "title": "string",          "question": "string",          "description": "string",          "outcomes": [            {              "index": 0,              "name": "string"            }          ]        }      ]    },    "property2": {      "category": {        "title": "string",        "shortTitle": "string"      },      "markets": [        {          "id": 0,          "title": "string",          "question": "string",          "description": "string",          "outcomes": [            {              "index": 0,              "name": "string"            }          ]        }      ]    }  }}