> For the complete documentation index, see [llms.txt](https://docs.sort-me.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sort-me.org/api/archives.md).

# Archives

API Methods at /archives route

## Get available archives

<mark style="color:blue;">`GET`</mark> `https://sort-me.org/api//archives/getPublic`

:sa: [Localization applies](/tricky/localization.md).

#### Query Parameters

| Name   | Type   | Description                                                                 |
| ------ | ------ | --------------------------------------------------------------------------- |
| query  | string | Text to search through archive descriptions                                 |
| offset | int    | <p>Pagination parameter.<br>Use <strong><code>id</code></strong> field.</p> |

{% tabs %}
{% tab title="200: OK " %}

```javascript
{
    "archives": [
        {
            "id": 19,
            "names": {
                "ru": "Полуфинал ICPC в Северной Евразии",
                "en": "Northern Eurasia ICPC Semi-Finals"
            },
            "org": {
                "ru": "Университет ИТМО и Комитет ICPC",
                "en": "ITMO University and ICPC Committee"
            },

            "seasons": 3,
            "seasons_info": {
                "ru": "с 2011 г.",
                "en": "2011 - Present"
            },

            "stats": { // can be not presented if you are not logged in
                "solved_problems": 4,
                "total_problems": 21
            }
        }
    ]
}
```

{% endtab %}
{% endtabs %}

## Get archive by ID

<mark style="color:blue;">`GET`</mark> `https://api.sort-me.org/api/archives/getByID`

:sa: [Localization applies](/tricky/localization.md).

Get single archive by its id.

{% tabs %}
{% tab title="200: OK " %}

```json
{
    "id": 1,
    "names": {
        "en": "Northern Eurasia ICPC Semi-Finals",
        "ru": "Полуфинал ICPC в Северной Евразии"
    },
    "org": {
        "en": "ITMO University and ICPC Committee",
        "ru": "Университет ИТМО и Комитет ICPC"
    },
    "seasons_info": {
        "en": "2011 - Present",
        "ru": "с 2011 г."
    },
    "seasons": [
        {
            "codename": "2011-2012",
            "problems": [
                {
                    "id": 1,
                    "names": {
                        "en": "A+B",
                        "ru": "A+B"
                    },
                    "difficulty": 2,
                    "solved_by": 0,
                    "tags": [
                        1
                    ]
                }
            ]
        }
    ]
}
```

{% endtab %}

{% tab title="404: Not Found Arhive not found" %}

```json
{
    "error": "archive not found"
}
```

{% endtab %}
{% endtabs %}
