API: Fetch translations

Last updated: September 11, 2024Author: Jakub Pomykała

SimpleLocalize REST API offers filter and query options, and uses your API Key which can be used also for modifying translations, so it should be used only in server-side applications and integrations. If you are looking for a way to fetch translations for client-side applications, use Translation Hosting.

This section is about using REST API to fetch translations. It's possible to use it in server-side applications and integrations. If you are using this endpoint, the authorization is required. Add API Key for your project as a X-SimpleLocalize-Token request header.

Querying translations

GET
https://api.simplelocalize.io
/api/v2/translations

Available query parameters

Query parameterDescription
textquery for translated text, uses 'contains with ignore case'
textStatussearch for empty or not empty translations, allowed values: EMPTY, NOT_EMPTY
reviewsStatusfilter by review status, allowed values: REVIEWED, NOT_REVIEWED
keyfilter by given translation key, uses 'equals'
namespacefilter by given translation namespace, uses 'equals'
languagefilter by given language key, uses 'equals'
customerIdfilter by given customer id, uses 'equals'; see customer-specific translations
pagepage for pagination
sizesize for pagination, max size: 500

Sample request

GET
https://api.simplelocalize.io
/api/v2/translations?language=en&key=HELLO_WORLD

Response

{
    "msg": "OK",
    "status": 200,
    "data":  [
            {
                "key": "HELLO_WORLD",
                "namespace": "common",
                "language": "en",
                "text": "Hello world!",
                "reviewStatus": "REVIEWED",
                "lastModifiedAt": "2021-01-01T00:00:00.000Z"
            }
        ]
}
Was this helpful?