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

# Профиль

Информация о текущем пользователе: профиль, баланс, статистика запросов, реферальная программа, курсы валют и настройки аккаунта.

## Current user profile

> Returns full profile information for the authenticated user.\
> \
> Requires header: \`Authorization: Bearer \<API\_KEY>\`

```json
{"openapi":"3.1.0","info":{"title":"GoData API","version":"1.0.0"},"tags":[{"name":"Профиль","description":"Информация о текущем пользователе: профиль, баланс, статистика запросов, реферальная программа, курсы валют и настройки аккаунта."}],"security":[{"HTTPBearer":[]}],"components":{"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer"}},"schemas":{"ProfileMeResponse":{"properties":{"user_id":{"type":"integer","title":"User Id","description":"Числовой идентификатор аккаунта"},"uuid":{"type":"string","title":"Uuid","description":"UUID аккаунта"},"username":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Username","description":"Имя пользователя (username, без @)"},"first_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Name","description":"Имя пользователя"},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Name","description":"Фамилия пользователя"},"avatar":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Avatar","description":"URL аватара пользователя"},"balance":{"type":"number","title":"Balance","description":"Денежный баланс аккаунта (USD)"},"partner_balance":{"type":"number","title":"Partner Balance","description":"Партнёрский баланс (USD)"},"requests_balance":{"type":"integer","title":"Requests Balance","description":"Количество поисковых запросов на балансе"},"tariff":{"type":"string","title":"Tariff","description":"Текущий тариф пользователя"},"status":{"type":"string","title":"Status","description":"Статус аккаунта: active, banned, trial"},"subscription":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subscription","description":"Дата окончания подписки в ISO 8601 (None — нет активной подписки)"},"registration":{"type":"string","title":"Registration","description":"Дата регистрации в ISO 8601"},"currency":{"type":"string","title":"Currency","description":"Предпочитаемая валюта: USD, RUB, UAH, KZT, BYN","default":"USD"},"is_lifetime":{"type":"boolean","title":"Is Lifetime","description":"Бессрочная (lifetime) подписка","default":false},"api_access":{"type":"boolean","title":"Api Access","description":"Доступ к программному API (тариф BUSINESS)","default":false},"price_per_request":{"type":"number","title":"Price Per Request","description":"Цена за 1 запрос сверх недельного лимита (USD, по тарифу)","default":0},"weekly_limit":{"type":"integer","title":"Weekly Limit","description":"Бесплатных запросов в неделю (по тарифу)","default":0},"weekly_used":{"type":"integer","title":"Weekly Used","description":"Использовано запросов недельного лимита на этой неделе","default":0},"weekly_remaining":{"type":"integer","title":"Weekly Remaining","description":"Остаток недельного бесплатного лимита","default":0},"week_resets_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Week Resets At","description":"Когда сбросится недельный лимит (ISO 8601, ближайший понедельник 00:00 МСК)"}},"type":"object","required":["user_id","uuid","balance","partner_balance","requests_balance","tariff","status","registration"],"title":"ProfileMeResponse","description":"Полная информация о профиле текущего пользователя."},"ErrorResponse":{"properties":{"detail":{"type":"string","title":"Detail","description":"Человекочитаемое сообщение об ошибке"}},"type":"object","required":["detail"],"title":"ErrorResponse","description":"Стандартный ответ с ошибкой."}}},"paths":{"/profile/me":{"get":{"tags":["Профиль"],"summary":"Current user profile","description":"Returns full profile information for the authenticated user.\n\nRequires header: `Authorization: Bearer <API_KEY>`","operationId":"get_my_profile_profile_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileMeResponse"}}}},"401":{"description":"Не авторизован — отсутствует или недействителен API-ключ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}}}
```

## Request statistics for a period

> Returns search request statistics for the specified period.\
> \
> \- Maximum range: \*\*365 days\*\*\
> \- All days in the period are present in \`daily\_stats\`, including days with no requests (\`requests\_count = 0\`)

```json
{"openapi":"3.1.0","info":{"title":"GoData API","version":"1.0.0"},"tags":[{"name":"Профиль","description":"Информация о текущем пользователе: профиль, баланс, статистика запросов, реферальная программа, курсы валют и настройки аккаунта."}],"security":[{"HTTPBearer":[]}],"components":{"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer"}},"schemas":{"StatsDetailResponse":{"properties":{"period":{"$ref":"#/components/schemas/StatsPeriod","description":"Запрошенный период"},"daily_stats":{"items":{"$ref":"#/components/schemas/DailyStatItem"},"type":"array","title":"Daily Stats","description":"Разбивка по дням (включает дни без запросов с requests_count=0)"},"total_requests":{"type":"integer","title":"Total Requests","description":"Суммарное количество запросов за весь период"}},"type":"object","required":["period","daily_stats","total_requests"],"title":"StatsDetailResponse","description":"Статистика поисковых запросов пользователя за период."},"StatsPeriod":{"properties":{"start":{"type":"string","title":"Start","description":"Начало периода в формате YYYY-MM-DD"},"end":{"type":"string","title":"End","description":"Конец периода в формате YYYY-MM-DD"}},"type":"object","required":["start","end"],"title":"StatsPeriod","description":"Период запрошенной статистики."},"DailyStatItem":{"properties":{"date":{"type":"string","title":"Date","description":"Дата в формате YYYY-MM-DD"},"requests_count":{"type":"integer","title":"Requests Count","description":"Количество запросов за этот день"}},"type":"object","required":["date","requests_count"],"title":"DailyStatItem","description":"Статистика запросов за один день."},"ErrorResponse":{"properties":{"detail":{"type":"string","title":"Detail","description":"Человекочитаемое сообщение об ошибке"}},"type":"object","required":["detail"],"title":"ErrorResponse","description":"Стандартный ответ с ошибкой."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/profile/stats":{"get":{"tags":["Профиль"],"summary":"Request statistics for a period","description":"Returns search request statistics for the specified period.\n\n- Maximum range: **365 days**\n- All days in the period are present in `daily_stats`, including days with no requests (`requests_count = 0`)","operationId":"get_stats_profile_stats_get","parameters":[{"name":"start","in":"query","required":true,"schema":{"type":"string","maxLength":50,"description":"Start date in **dd.mm.yyyy** format","title":"Start"},"description":"Start date in **dd.mm.yyyy** format"},{"name":"end","in":"query","required":true,"schema":{"type":"string","maxLength":50,"description":"End date in **dd.mm.yyyy** format","title":"End"},"description":"End date in **dd.mm.yyyy** format"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatsDetailResponse"}}}},"401":{"description":"Не авторизован — отсутствует или недействителен API-ключ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```

## Referral program statistics

> Returns referral program statistics for the current user.\
> \
> \- \`invited\_count\` - breakdown by acquisition channel (ref link / bot)\
> \- \`earnings\` - total referral commissions (USD) from paid deposits of invited users

```json
{"openapi":"3.1.0","info":{"title":"GoData API","version":"1.0.0"},"tags":[{"name":"Профиль","description":"Информация о текущем пользователе: профиль, баланс, статистика запросов, реферальная программа, курсы валют и настройки аккаунта."}],"security":[{"HTTPBearer":[]}],"components":{"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer"}},"schemas":{"ReferralStatsResponse":{"properties":{"invited_count":{"$ref":"#/components/schemas/InvitedCount","description":"Количество приглашённых пользователей с разбивкой по каналу"},"earnings":{"type":"number","title":"Earnings","description":"Сумма реферальных отчислений (USD) по оплаченным депозитам приглашённых"}},"type":"object","required":["invited_count","earnings"],"title":"ReferralStatsResponse","description":"Статистика реферальной программы текущего пользователя."},"InvitedCount":{"properties":{"by_ref_link":{"type":"integer","title":"By Ref Link","description":"Приглашено по реферальной ссылке"},"by_bot":{"type":"integer","title":"By Bot","description":"Приглашено через партнёрский канал"},"total":{"type":"integer","title":"Total","description":"Итого уникальных приглашённых пользователей"}},"type":"object","required":["by_ref_link","by_bot","total"],"title":"InvitedCount","description":"Разбивка приглашённых пользователей по каналу привлечения."},"ErrorResponse":{"properties":{"detail":{"type":"string","title":"Detail","description":"Человекочитаемое сообщение об ошибке"}},"type":"object","required":["detail"],"title":"ErrorResponse","description":"Стандартный ответ с ошибкой."}}},"paths":{"/profile/referral-stats":{"get":{"tags":["Профиль"],"summary":"Referral program statistics","description":"Returns referral program statistics for the current user.\n\n- `invited_count` - breakdown by acquisition channel (ref link / bot)\n- `earnings` - total referral commissions (USD) from paid deposits of invited users","operationId":"get_referral_stats_profile_referral_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReferralStatsResponse"}}}},"401":{"description":"Не авторизован — отсутствует или недействителен API-ключ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}}}
```

## Currency rates relative to USD

> Returns current exchange rates for supported currencies relative to USD.\
> \
> Supported currencies: \*\*RUB\*\*, \*\*UAH\*\*, \*\*KZT\*\*, \*\*BYN\*\*.\
> Rates are updated automatically every \*\*15 minutes\*\*.\
> No authorization required.

```json
{"openapi":"3.1.0","info":{"title":"GoData API","version":"1.0.0"},"tags":[{"name":"Профиль","description":"Информация о текущем пользователе: профиль, баланс, статистика запросов, реферальная программа, курсы валют и настройки аккаунта."}],"paths":{"/profile/currency-rates":{"get":{"tags":["Профиль"],"summary":"Currency rates relative to USD","description":"Returns current exchange rates for supported currencies relative to USD.\n\nSupported currencies: **RUB**, **UAH**, **KZT**, **BYN**.\nRates are updated automatically every **15 minutes**.\nNo authorization required.","operationId":"get_currency_rates_endpoint_profile_currency_rates_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CurrencyRatesResponse"}}}}}}}},"components":{"schemas":{"CurrencyRatesResponse":{"properties":{"base_currency":{"type":"string","title":"Base Currency","description":"Базовая валюта для всех курсов","default":"USD"},"rates":{"additionalProperties":{"$ref":"#/components/schemas/CurrencyInfo"},"type":"object","title":"Rates","description":"Курсы поддерживаемых валют. Ключи: RUB, UAH, KZT, BYN"},"updated_at":{"type":"string","title":"Updated At","description":"Время последнего обновления курсов в ISO 8601"}},"type":"object","required":["rates","updated_at"],"title":"CurrencyRatesResponse","description":"Актуальные курсы валют относительно USD. Обновляются каждые 15 минут."},"CurrencyInfo":{"properties":{"name":{"type":"string","title":"Name","description":"Полное название валюты на русском"},"rate":{"type":"number","title":"Rate","description":"Курс: сколько единиц этой валюты равно 1 USD"},"base":{"type":"string","title":"Base","description":"Базовая валюта (всегда USD)","default":"USD"}},"type":"object","required":["name","rate"],"title":"CurrencyInfo","description":"Информация об одной валюте."}}}}
```

## Update profile settings

> Updates user profile settings.\
> \
> Supported fields:\
> \- \`currency\` - preferred currency (\`USD\`, \`RUB\`, \`UAH\`, \`KZT\`, \`BYN\`)\
> \
> Only pass the fields you want to change.

```json
{"openapi":"3.1.0","info":{"title":"GoData API","version":"1.0.0"},"tags":[{"name":"Профиль","description":"Информация о текущем пользователе: профиль, баланс, статистика запросов, реферальная программа, курсы валют и настройки аккаунта."}],"security":[{"HTTPBearer":[]}],"components":{"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer"}},"schemas":{"UpdateProfileSettingsRequest":{"properties":{"currency":{"anyOf":[{"type":"string","maxLength":3,"pattern":"^(USD|RUB|UAH|KZT|BYN)$"},{"type":"null"}],"title":"Currency","description":"Предпочитаемая валюта. Допустимые значения: USD, RUB, UAH, KZT, BYN"}},"type":"object","title":"UpdateProfileSettingsRequest","description":"Запрос на обновление настроек профиля. Передайте только нужные поля."},"UpdateProfileSettingsResponse":{"properties":{"success":{"type":"boolean","title":"Success","description":"Признак успешности операции"},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Currency","description":"Установленная валюта (если передавалась в запросе)"}},"type":"object","required":["success"],"title":"UpdateProfileSettingsResponse","description":"Ответ на успешное обновление настроек профиля."},"ErrorResponse":{"properties":{"detail":{"type":"string","title":"Detail","description":"Человекочитаемое сообщение об ошибке"}},"type":"object","required":["detail"],"title":"ErrorResponse","description":"Стандартный ответ с ошибкой."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/profile/settings":{"put":{"tags":["Профиль"],"summary":"Update profile settings","description":"Updates user profile settings.\n\nSupported fields:\n- `currency` - preferred currency (`USD`, `RUB`, `UAH`, `KZT`, `BYN`)\n\nOnly pass the fields you want to change.","operationId":"update_profile_settings_profile_settings_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateProfileSettingsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateProfileSettingsResponse"}}}},"401":{"description":"Не авторизован — отсутствует или недействителен API-ключ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Ресурс не найден","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```

## Personal request pricing

> Returns the per-request price (by tariff) and weekly free-limit progress.\
> \
> \- \`price\_per\_request\` — price for requests \*\*beyond\*\* the weekly free limit,\
> &#x20; determined by the user's tariff (FREE $0.99 / HOBBY $0.49 / BUSINESS $0.0066)\
> \- \`weekly\_limit\` / \`weekly\_used\` / \`weekly\_remaining\` — free requests included\
> &#x20; per calendar week (Mon-Sun)\
> \- \`week\_resets\_at\` — when the weekly counter resets

```json
{"openapi":"3.1.0","info":{"title":"GoData API","version":"1.0.0"},"tags":[{"name":"Профиль","description":"Информация о текущем пользователе: профиль, баланс, статистика запросов, реферальная программа, курсы валют и настройки аккаунта."}],"security":[{"HTTPBearer":[]}],"components":{"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer"}},"schemas":{"RequestsPricingResponse":{"properties":{"tariff":{"type":"string","title":"Tariff","description":"Текущий тариф пользователя"},"price_per_request":{"type":"number","title":"Price Per Request","description":"Цена за 1 запрос сверх недельного лимита (USD, по тарифу)"},"weekly_limit":{"type":"integer","title":"Weekly Limit","description":"Бесплатных запросов в неделю (по тарифу)"},"weekly_used":{"type":"integer","title":"Weekly Used","description":"Использовано запросов недельного лимита на этой неделе"},"weekly_remaining":{"type":"integer","title":"Weekly Remaining","description":"Остаток недельного бесплатного лимита"},"week_resets_at":{"type":"string","title":"Week Resets At","description":"Когда сбросится недельный лимит (ISO 8601)"},"requests_balance":{"type":"integer","title":"Requests Balance","description":"Остаток предоплаченных запросов (пакеты)"},"min_quantity":{"type":"integer","title":"Min Quantity","description":"Минимальное количество запросов для покупки пакета"},"max_quantity":{"type":"integer","title":"Max Quantity","description":"Максимальное количество запросов для покупки пакета"}},"type":"object","required":["tariff","price_per_request","weekly_limit","weekly_used","weekly_remaining","week_resets_at","requests_balance","min_quantity","max_quantity"],"title":"RequestsPricingResponse","description":"Прайс на запросы по тарифу + прогресс недельного бесплатного лимита."},"ErrorResponse":{"properties":{"detail":{"type":"string","title":"Detail","description":"Человекочитаемое сообщение об ошибке"}},"type":"object","required":["detail"],"title":"ErrorResponse","description":"Стандартный ответ с ошибкой."}}},"paths":{"/profile/requests/pricing":{"get":{"tags":["Профиль"],"summary":"Personal request pricing","description":"Returns the per-request price (by tariff) and weekly free-limit progress.\n\n- `price_per_request` — price for requests **beyond** the weekly free limit,\n  determined by the user's tariff (FREE $0.99 / HOBBY $0.49 / BUSINESS $0.0066)\n- `weekly_limit` / `weekly_used` / `weekly_remaining` — free requests included\n  per calendar week (Mon-Sun)\n- `week_resets_at` — when the weekly counter resets","operationId":"get_requests_pricing_profile_requests_pricing_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestsPricingResponse"}}}},"401":{"description":"Не авторизован — отсутствует или недействителен API-ключ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}}}
```

## Buy requests with the money balance

> Buys \`quantity\` requests, charging the money balance at the tariff price.\
> \
> The price per request is determined by the user's tariff\
> (FREE $0.99 / HOBBY $0.49 / BUSINESS $0.0066). Bought requests are added to\
> \`requests\_balance\` and spent after the weekly free limit is exhausted.\
> Returns \`402\` if the balance is insufficient.

```json
{"openapi":"3.1.0","info":{"title":"GoData API","version":"1.0.0"},"tags":[{"name":"Профиль","description":"Информация о текущем пользователе: профиль, баланс, статистика запросов, реферальная программа, курсы валют и настройки аккаунта."}],"security":[{"HTTPBearer":[]}],"components":{"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer"}},"schemas":{"PurchaseRequestsRequest":{"properties":{"quantity":{"type":"integer","minimum":1,"title":"Quantity","description":"Количество запросов для покупки"}},"type":"object","required":["quantity"],"title":"PurchaseRequestsRequest","description":"Запрос на покупку запросов за денежный баланс."},"PurchaseRequestsResponse":{"properties":{"success":{"type":"boolean","title":"Success","description":"Признак успешной покупки"},"quantity":{"type":"integer","title":"Quantity","description":"Сколько запросов куплено"},"price_per_request":{"type":"number","title":"Price Per Request","description":"Применённый прайс за 1 запрос (USD)"},"total":{"type":"number","title":"Total","description":"Списано с баланса (USD)"},"balance":{"type":"number","title":"Balance","description":"Новый денежный баланс (USD)"},"requests_balance":{"type":"integer","title":"Requests Balance","description":"Новый остаток запросов"}},"type":"object","required":["success","quantity","price_per_request","total","balance","requests_balance"],"title":"PurchaseRequestsResponse","description":"Результат покупки запросов."},"ErrorResponse":{"properties":{"detail":{"type":"string","title":"Detail","description":"Человекочитаемое сообщение об ошибке"}},"type":"object","required":["detail"],"title":"ErrorResponse","description":"Стандартный ответ с ошибкой."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/profile/requests/purchase":{"post":{"tags":["Профиль"],"summary":"Buy requests with the money balance","description":"Buys `quantity` requests, charging the money balance at the tariff price.\n\nThe price per request is determined by the user's tariff\n(FREE $0.99 / HOBBY $0.49 / BUSINESS $0.0066). Bought requests are added to\n`requests_balance` and spent after the weekly free limit is exhausted.\nReturns `402` if the balance is insufficient.","operationId":"purchase_requests_profile_requests_purchase_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurchaseRequestsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurchaseRequestsResponse"}}}},"401":{"description":"Не авторизован — отсутствует или недействителен API-ключ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```

## Subscription / tariff options

> Returns purchasable tariffs (HOBBY, BUSINESS) with their periods and prices,\
> plus the user's current tariff, subscription expiry and money balance.

```json
{"openapi":"3.1.0","info":{"title":"GoData API","version":"1.0.0"},"tags":[{"name":"Профиль","description":"Информация о текущем пользователе: профиль, баланс, статистика запросов, реферальная программа, курсы валют и настройки аккаунта."}],"security":[{"HTTPBearer":[]}],"components":{"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer"}},"schemas":{"SubscriptionOptionsResponse":{"properties":{"current_tariff":{"type":"string","title":"Current Tariff","description":"Текущий тариф пользователя"},"subscription":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subscription","description":"Дата окончания подписки (ISO 8601) или null"},"is_lifetime":{"type":"boolean","title":"Is Lifetime","description":"Бессрочная подписка","default":false},"balance":{"type":"number","title":"Balance","description":"Денежный баланс пользователя (USD)"},"tariffs":{"items":{"$ref":"#/components/schemas/SubscriptionTariffOption"},"type":"array","title":"Tariffs","description":"Тарифы, доступные к покупке"}},"type":"object","required":["current_tariff","balance","tariffs"],"title":"SubscriptionOptionsResponse","description":"Опции покупки подписки + текущее состояние пользователя."},"SubscriptionTariffOption":{"properties":{"tariff":{"type":"string","title":"Tariff","description":"Код тарифа: hobby, business"},"title":{"type":"string","title":"Title","description":"Название тарифа"},"emoji":{"type":"string","title":"Emoji","description":"Эмодзи тарифа"},"weekly_free":{"type":"integer","title":"Weekly Free","description":"Бесплатных запросов в неделю"},"price_per_request":{"type":"number","title":"Price Per Request","description":"Цена за запрос сверх лимита (USD)"},"monthly_price":{"type":"number","title":"Monthly Price","description":"Базовая цена за месяц (USD)"},"api_access":{"type":"boolean","title":"Api Access","description":"Доступ к программному API"},"periods":{"items":{"$ref":"#/components/schemas/SubscriptionPeriodOption"},"type":"array","title":"Periods","description":"Доступные периоды и цены"}},"type":"object","required":["tariff","title","emoji","weekly_free","price_per_request","monthly_price","api_access","periods"],"title":"SubscriptionTariffOption","description":"Тариф и его опции подписки."},"SubscriptionPeriodOption":{"properties":{"period":{"type":"string","title":"Period","description":"Ключ периода: 1m, 3m, 6m, 12m, lifetime"},"name":{"type":"string","title":"Name","description":"Название периода (человекочитаемое)"},"months":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Months","description":"Длительность в месяцах (null для lifetime)"},"price":{"type":"number","title":"Price","description":"Цена за период (USD)"}},"type":"object","required":["period","name","price"],"title":"SubscriptionPeriodOption","description":"Вариант периода подписки для тарифа."},"ErrorResponse":{"properties":{"detail":{"type":"string","title":"Detail","description":"Человекочитаемое сообщение об ошибке"}},"type":"object","required":["detail"],"title":"ErrorResponse","description":"Стандартный ответ с ошибкой."}}},"paths":{"/profile/subscription":{"get":{"tags":["Профиль"],"summary":"Subscription / tariff options","description":"Returns purchasable tariffs (HOBBY, BUSINESS) with their periods and prices,\nplus the user's current tariff, subscription expiry and money balance.","operationId":"get_subscription_options_profile_subscription_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionOptionsResponse"}}}},"401":{"description":"Не авторизован — отсутствует или недействителен API-ключ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}}}
```

## Buy a subscription (tariff) with the money balance

> Activates a tariff subscription (HOBBY/BUSINESS) for the chosen period\
> (\`1m\`, \`3m\`, \`6m\`, \`12m\`, \`lifetime\`), charging the money balance.\
> \
> Buying the \*\*same\*\* tariff while the subscription is still active extends it:\
> the new period is added on top of the current expiry date. Switching to a\
> different tariff replaces the subscription — the period starts now.\
> \
> Returns \`402\` if the balance is insufficient, \`400\` for a repeated purchase\
> on a lifetime subscription. \`lifetime\` never expires.

```json
{"openapi":"3.1.0","info":{"title":"GoData API","version":"1.0.0"},"tags":[{"name":"Профиль","description":"Информация о текущем пользователе: профиль, баланс, статистика запросов, реферальная программа, курсы валют и настройки аккаунта."}],"security":[{"HTTPBearer":[]}],"components":{"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer"}},"schemas":{"PurchaseSubscriptionRequest":{"properties":{"tariff":{"type":"string","title":"Tariff","description":"Код тарифа: hobby или business"},"period":{"type":"string","title":"Period","description":"Период: 1m, 3m, 6m, 12m, lifetime"}},"type":"object","required":["tariff","period"],"title":"PurchaseSubscriptionRequest","description":"Запрос на покупку подписки за денежный баланс."},"PurchaseSubscriptionResponse":{"properties":{"success":{"type":"boolean","title":"Success","description":"Признак успеха"},"tariff":{"type":"string","title":"Tariff","description":"Установленный тариф"},"period":{"type":"string","title":"Period","description":"Купленный период"},"price":{"type":"number","title":"Price","description":"Списано с баланса (USD)"},"balance":{"type":"number","title":"Balance","description":"Новый денежный баланс (USD)"},"subscription":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subscription","description":"Дата окончания подписки (ISO 8601), null для lifetime"},"is_lifetime":{"type":"boolean","title":"Is Lifetime","description":"Бессрочная подписка"}},"type":"object","required":["success","tariff","period","price","balance","is_lifetime"],"title":"PurchaseSubscriptionResponse","description":"Результат покупки подписки."},"ErrorResponse":{"properties":{"detail":{"type":"string","title":"Detail","description":"Человекочитаемое сообщение об ошибке"}},"type":"object","required":["detail"],"title":"ErrorResponse","description":"Стандартный ответ с ошибкой."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/profile/subscription":{"post":{"tags":["Профиль"],"summary":"Buy a subscription (tariff) with the money balance","description":"Activates a tariff subscription (HOBBY/BUSINESS) for the chosen period\n(`1m`, `3m`, `6m`, `12m`, `lifetime`), charging the money balance.\n\nBuying the **same** tariff while the subscription is still active extends it:\nthe new period is added on top of the current expiry date. Switching to a\ndifferent tariff replaces the subscription — the period starts now.\n\nReturns `402` if the balance is insufficient, `400` for a repeated purchase\non a lifetime subscription. `lifetime` never expires.","operationId":"purchase_subscription_profile_subscription_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurchaseSubscriptionRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurchaseSubscriptionResponse"}}}},"401":{"description":"Не авторизован — отсутствует или недействителен API-ключ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.go-data.app/profil.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
