Adding RSS feed

Allows you to add an RSS feed URL to a domain.

Request format

POST https://api.webmaster.yandex.net/v4/user/{user_id}/hosts/{host}/content-feeds/add/

user-id

Type: int64. User ID. Required when calling all Yandex.Webmaster API resources. To get it, use the GET /v4/user method.

host-id

Type: host id (string). The site ID. To get it, use the GET /v4/user/{user-id}/hosts method.

Example

  {
    "url": "https://www.example.com/rss/feed.xml"
  }
  <Data>
    <url>https://www.example.com/rss/feed.xml</url>
  </Data>
Name Required Type Description
url Yes string The URL of the feed. Pass the login and password together with the URL where it is accessible. For example: https://yandex:WE9h4FfBml@example.com/feed.yml.

Response format

Example

{}
<?xml version="1.0" encoding="UTF-8"?>
<response>
</response>

Name

Required

Type

Description

status

Yes

string

HTTP status code. 200 OK indicates the request was successful.

Response codes

Code

Reason

Description

200

OK

The request is successful.

400

FEED_ALREADY_EXISTS

The feed already exists for this domain.

{
  "error_message": "Feed already exists",
  "error_code": "FEED_ALREADY_EXISTS"
}
<?xml version="1.0" encoding="UTF-8"?>
<error>
  <error_message>Feed already exists</error_message>
  <error_code>FEED_ALREADY_EXISTS</error_code>
</error>

400

INVALID_URL

The feed URL is invalid.

{
  "error_message": "Feed's url is invalid",
  "error_code": "INVALID_URL"
}
<?xml version="1.0" encoding="UTF-8"?>
<error>
  <error_message>Feed's url is invalid</error_message>
  <error_code>INVALID_URL</error_code>
</error>

400

LIMIT_EXCEEDED

The domain has reached its maximum number of feeds.

{
  "error_message": "Domain's feeds limit is exceeded",
  "error_code": "LIMIT_EXCEEDED"
}
<?xml version="1.0" encoding="UTF-8"?>
<error>
  <error_message>Domain's feeds limit is exceeded</error_message>
  <error_code>LIMIT_EXCEEDED</error_code>
</error>