> ## Documentation Index
> Fetch the complete documentation index at: https://docs.gitlocalize.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Introduction

> Authentication, pagination, and the endpoints exposed by the GitLocalize API.

The GitLocalize API is a JSON over HTTPS API. It exposes the repositories connected to an account
and the translation progress of each target language.

> [!NOTE]
>
> **The API is in preview.** The specification is at version `0.1.0`: endpoints, parameters and
> response shapes may still change. Let us know what you are building with it through the
> [contact form](https://gitlocalize.com/inquiries/new).

> [card] Base URL
>
> `https://api.gitlocalize.com`

## Authentication

Every endpoint requires an **API key**. Create one under
[API keys](https://gitlocalize.com/settings/api_keys) in your GitLocalize settings, then send it as a
bearer token in the `Authorization` header:

```bash cURL theme={null}
curl https://api.gitlocalize.com/v1/repositories \
  -H "Authorization: Bearer $GITLOCALIZE_API_KEY"
```

```js Node.js theme={null}
const res = await fetch("https://api.gitlocalize.com/v1/repositories", {
  headers: { Authorization: `Bearer ${process.env.GITLOCALIZE_API_KEY}` },
});
const repositories = await res.json();
```

```python Python theme={null}
import os, requests

res = requests.get(
    "https://api.gitlocalize.com/v1/repositories",
    headers={"Authorization": f"Bearer {os.environ['GITLOCALIZE_API_KEY']}"},
)
repositories = res.json()
```

> [!WARNING]
>
> An API key carries the access of the account that created it. Keep it in an environment variable or
> a secret store — never commit it to a repository or ship it in client-side code.

## Pagination

[List repositories](https://docs.gitlocalize.com/api-reference/repositories/list.md) is cursor-paginated by repository id.
Pass `limit` to set the page size (up to `1000`), and `after` to continue from where the previous
page ended — set it to the `id` of the last repository you received. Results are ordered by `id`.

```bash theme={null}
# first page
curl "https://api.gitlocalize.com/v1/repositories?limit=100" \
  -H "Authorization: Bearer $GITLOCALIZE_API_KEY"

# next page, continuing after the last id from the previous response
curl "https://api.gitlocalize.com/v1/repositories?limit=100&after=4242" \
  -H "Authorization: Bearer $GITLOCALIZE_API_KEY"
```

> [!NOTE]
>
> Repository ids are 64-bit integers, so they may be returned as strings. Use a 64-bit safe type in
> languages where the default number type can't hold them — JavaScript included.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.