---
metadata:
  - name: generator
    content: Diplodoc Platform v5.44.0
alternate:
  - https://yandex.ru/dev/webmaster/doc/en/reference/hosts-id.md
  - https://yandex.ru/dev/webmaster/doc/ru/reference/hosts-id.md
keywords:
  - s
  - i
  - t
  - e
---
> **Documentation Index:** Fetch the complete configuration index at https://yandex.ru/dev/webmaster/doc/en/llms.txt


# Getting site information

Returns information about the site.

## Request format

```
GET https://api.webmaster.yandex.net/v4/user/{[user-id](*user-id)}/hosts/{[host-id](*host-id)}
```

#|
||
`user-id`
|
<!-- source: en/_includes/popups.md -->
Type: `int64`. User ID. Required when calling all Yandex.Webmaster API resources. To get it, use the [GET /v4/user](https://yandex.ru/dev/webmaster/doc/en/reference/user.md) method.
<!-- endsource: en/_includes/popups.md -->
||
||
`host-id`
|
<!-- source: en/_includes/popups.md -->
Type: `host id (string)`. The site ID. To get it, use the [GET /v4/user/{user-id}/hosts](https://yandex.ru/dev/webmaster/doc/en/reference/hosts.md) method.
<!-- endsource: en/_includes/popups.md -->
||
|#

## Response format

### Example

> 
> {% list tabs %}
> 
> - JSON
> 
>   
>   ```javascript
>   {
>     "host_id": "https:ya.ru:443",
>     "verified": true,
>     "ascii_host_url": "https://ya.ru/",
>     "unicode_host_url": "https://ya.ru/",
>     "main_mirror": {
>       "host_id": "http:xn--d1acpjx3f.xn--p1ai:80",
>       "ascii_host_url": "http://xn--d1acpjx3f.xn--p1ai/",
>       "unicode_host_url": "http://яндекс.рф/",
>       "verified": false
>     },
>     "host_data_status": "[NOT_INDEXED](*NOT_INDEXED)",
>     "host_display_name": "Ya.ru"
>   }
>   ```
>   
> 
> - XML
> 
>   
>   ```xml
>   <Data>
>       <[host_id](*host_id_3)>https:ya.ru:443</host_id>
>       <[verified](*verified)>true</verified>
>       <[ascii_host_url](*ascii_host_url)>https://ya.ru/</ascii_host_url>
>       <[unicode_host_url](*unicode_host_url)>https://ya.ru/</unicode_host_url>
>       <[main_mirror](*main_mirror)>
>           <[host_id](*host_id_3)>http:xn--d1acpjx3f.xn--p1ai:80</host_id>
>           <[ascii_host_url](*ascii_host_url)>http://xn--d1acpjx3f.xn--p1ai/</ascii_host_url>
>           <[unicode_host_url](*unicode_host_url)>http://яндекс.рф/</unicode_host_url>
>           <[verified](*verified)>false</verified>
>       </main_mirror>
>       <[host_data_status](*host_data_status)>[NOT_INDEXED](*NOT_INDEXED)</host_data_status>
>       <[host_display_name](*host_display_name)>Ya.ru</host_display_name>
>   </Data>
>   ```
> 
> {% endlist %}

#|
|| **Name** | **Required** | **Type** | **Description** ||
|| `host_id` | Yes | `host id` (`string`) | ID of the requested site. ||
|| `ascii_host_url` | Yes | `string` | The site's ASCII URL ||
|| `unicode_host_url` | Yes | `string` | The site's UTF-8 URL. ||
|| `verified` | Yes | `boolean` | Whether the site is verified. ||
|| `main_mirror` | No |  | The site's main mirror, if there is one. ||
|| `host_data_status` | No | `string` ([ApiHostDataStatus](#indexing-status)) | Information about the site (shown if the site is verified). ||
|| `host_display_name` | No | `string` | The site name to display. ||
|#

<!-- source: en/_includes/reference/indexing-status.md -->
### Site indexing status (ApiHostDataStatus) {#indexing-status}

#|
|| **Source** | **Description** ||
|| `NOT_INDEXED` | The site isn't indexed yet. ||
|| `NOT_LOADED` | The site data isn't uploaded to Yandex.Webmaster yet. ||
|| `OK` | The site is indexed. The data is available in Yandex.Webmaster. ||
|#
<!-- endsource: en/_includes/reference/indexing-status.md -->

## Response codes

To view the response structure in detail, click the reason.

#|
||
**Code** | **Reason** | **Description**
||
||
200 | OK | 
||
||
403
|
[INVALID_USER_ID](https://yandex.ru/dev/webmaster/doc/en/reference/errors.md#invalid-user-id)
|
The ID of the user who issued the token differs from the one specified in the request. In the examples below, `{user_id}` shows the correct `uid` of the OAuth token owner.

{% list tabs %}

- JSON

  ```json 
  {   
      "error_code": "INVALID_USER_ID",   
      "available_user_id": 1,   
      "error_message": "Invalid user id. {user_id} should be used."
  }
  ```

- XML

  ```xml 
  <Data>     
      <[error_code](*error_code)>INVALID_USER_ID</error_code>     
      <[available_user_id](*available_user_id)>1</available_user_id>     
      <[error_message](*error_message)>Invalid user id. {user_id} should be used.</error_message> 
  </Data>
  ```

{% endlist %}
||
||
404
|
[HOST_NOT_FOUND](https://yandex.ru/dev/webmaster/doc/en/reference/errors.md#host-not-found)
|
The site is not in the list of the user's sites.

{% list tabs %}

- JSON

  ```javascript
  {   
      "error_code": "HOST_NOT_FOUND",   
      "host_id": "http:ya.ru:80",   
      "error_message": "explicit error message"
  }
  ```

- XML

  ```xml 
  <Data>     
      <[error_code](*error_code)>HOST_NOT_FOUND</error_code>     
      <[host_id](*host_id)>http:ya.ru:80</host_id>     
      <[error_message](*error_message)>explicit error message</error_message>
  </Data>
  ```

{% endlist %}
||
|#

### Related information

- [Error codes and statuses](https://yandex.ru/dev/webmaster/doc/en/reference/errors.md)




[*user-id]: Type: `int64`. User ID. Required when calling all Yandex.Webmaster API resources. To get it, use the [GET /v4/user](https://yandex.ru/dev/webmaster/doc/en/reference/user.md) method.

[*host-id]: Type: `host id (string)`. The site ID. To get it, use the [GET /v4/user/{user-id}/hosts](https://yandex.ru/dev/webmaster/doc/en/reference/hosts.md) method.

[*host_id_3]: **Required**

Yes

**Type**

`host id` (`string`)

**Description**

ID of the requested site.

[*verified]: **Required**

Yes

**Type**

`boolean`

**Description**

Whether the site is verified.

[*ascii_host_url]: **Required**

Yes

**Type**

`string`

**Description**

The site's ASCII URL

[*unicode_host_url]: **Required**

No

**Type**

`string`

**Description**

The site's UTF-8 URL.

[*main_mirror]: **Required**

Yes

**Type**

**Description**

The site's main mirror, if there is one.

[*host_data_status]: **Required**

No

**Type**

`string` ([ApiHostDataStatus](#indexing-status))

**Description**

Information about the site (shown if the site is verified).

[*host_display_name]: **Required**

No

**Type**

`string`

**Description**

The site name to display.

[*error_code]: **Description**

Error code.

[*available_user_id]: **Description**

ID of the user who allowed access.

[*host_id]: **Description**

ID of the requested site.

[*error_message]: **Description**

Error message.

[*NOT_INDEXED]: ### Site indexing status (ApiHostDataStatus) {#indexing-status}

#|
|| **Source** | **Description** ||
|| `NOT_INDEXED` | The site isn't indexed yet. ||
|| `NOT_LOADED` | The site data isn't uploaded to Yandex.Webmaster yet. ||
|| `OK` | The site is indexed. The data is available in Yandex.Webmaster. ||
|#