RSS feeds list

Returns the list of RSS feeds for a domain.

Request format

GET https://api.webmaster.yandex.net/v4/user/{user-id}/hosts/{host-id}/content-feeds/list/

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.

Response format

The API returns HTTP status code 200 OK for successful requests.

Example

{
  "feeds": [
    {
      "domain": "example.com",
      "url": "https://www.example.com/main.xml",
      "feed_status": "OK",
      "state": "ACTIVE",
      "validation_errors": null
    },
    {
      "domain": "example.com",
      "url": "https://www.example.com/regions/town.xml",
      "feed_status": "OK",
      "state": "ACTIVE",
      "validation_errors": null
    }
  ]
}
<?xml version="1.0" encoding="UTF-8"?>
<response>
  <feeds>
    <feed>
      <domain>example.com</domain>
      <url>https://www.example.com/main.xml</url>
      <feed_status>OK</feed_status>
      <state>ACTIVE</state>
      <validation_errors></validation_errors>
    </feed>
    <feed>
      <domain>example.com</domain>
      <url>https://www.example.com/regions/town.xml</url>
      <feed_status>OK</feed_status>
      <state>ACTIVE</state>
      <validation_errors></validation_errors>
    </feed>
  </feeds>
</response>

Response structure

The response contains a single field feeds, which is an array of feed objects.

Each feed object includes:

Field Type Description
domain string The user's domain.
url string The feed URL including login and password if provided.
feed_status string Feed status: REJECTED (failed technical validation), IN_PROGRESS (validation in progress), or OK (validation passed).
state string Feed activation status controlled by the user: INACTIVE or ACTIVE.
validation_errors object null Technical errors found during feed validation (null if there are no errors).

Validation errors structure

If validation_errors is not null, it contains a code field with one of error values.

Depending on the code value, one of the following fields will be available:

  • fetch_error
  • parse_error
  • content_error

Error value

Description

FETCH_ERROR

Indicates that the feed data could not be downloaded.

fetch_error has a single field error_code with possible values:

  • STATUS_IS_NOT_200: the URL does not respond with HTTP status code 200.
  • URL_SYNTAX_ERROR: the URL is invalid.

PARSE_ERROR

Indicates that the feed could not be parsed.

parse_error has four fields:

  • context: error context string.
  • line: line number where the error occurred.
  • column: column number where the error occurred.
  • errorCode: one of the error codes defined in the system.
Parse errors description
  • ATTRIBUTE_MISMATCH: Missing " or '.
  • ATTRIBUTE_REDEFINED: HTTP header incorrectly redefined.
  • CDATA_NOT_FINISHED: CData block incorrectly terminated.
  • CHAR_OUT_OF_RANGE: Invalid character.
  • CHAR_REF_INVALID: Invalid character code.
  • COMMENT_NOT_TERMINATED: Comment not terminated.
  • DOCTYPE_NOT_TERMINATED: DOCTYPE declaration incorrectly terminated.
  • DOCUMENT_EMPTY: Document is empty.
  • ENTITY_NOT_DEFINED: Entity not defined in xml.
  • ENTITY_REF_EXPECTING_SEMICOLON: Entity reference must end with ';'.
  • EXTRA_CONTENT: Unexpected content at the end of document.
  • INVALID_UTF8: Document cannot be read in UTF-8, correct encoding needed.
  • OPENING_ENDING_TAG_MISMATCH: Opening and closing tags don't match.
  • PC_DATA_INVALID_CHAR: Unknown character code in PCDATA block.
  • PREMATURE_END_OF_DATA: Premature end of data in tag.
  • SEQUENCE_NOT_ALLOWED: Disallowed sequence.
  • SPACE_REQUIRED_AFTER_PUBLIC: Space required after PUBLIC declaration.
  • SPECIFICATION_MANDATES_VALUE: Attribute must have a value.
  • START_TAG_EXPECTED: Opening tag not found.
  • UNESCAPED_CHAR_NOT_ALLOWED: Character in attribute value must be escaped.
  • UNSUPPORTED_VERSION: Unsupported xml version.
  • XML_DECLARATION_ONLY_AT_START: XML declaration allowed only at the beginning of document.
  • ATTRIBUTES_CONSTRUCT_ERROR: Incorrectly formed attributes.
  • ERROR_PARSING_ATTRIBUTE_NAME: Failed to read attribute name.
  • EXPECTED_GREATER_THAN_SIGN: '>' character not found.
  • DOC_TYPE_NAME_EXPECTED: Incorrect DOCTYPE declaration.
  • ENTITY_REF_NO_NAME: Entity name not specified. Check that the URL contains RSS, not HTML. Verify that '&' is encoded as '&'.
  • PI_NO_TARGET_NAME: Document type not specified.
  • START_TAG_NAME_EXPECTED: Invalid opening tag name.
  • ENDTAG_EXPECTED: Missing closing tag.

CONTENT_ERROR

Indicates that the RSS feed content is invalid.

content_error has a single field items (array), where each item contains:

  • url: the news URL.
  • title: the news title.
  • publicationDate: the publication date.
  • orderId: the sequential number of the news item.
  • errors: array of error objects, each with:
    • errorCode: the error code.
    • context: additional error context.
Content errors description
  • BAD_ITEM_URL: Incorrect article URL.
  • DOCUMENT_TITLE_TOO_LONG: Article title is too long (maximum 200 characters).
  • NO_PUBDATE: Article publication date is missing.
  • NO_TITLE: Article title is missing.
  • NO_DOC_URL: Article URL is not specified.
  • PUBDATE_IN_FUTURE: Article publication date is in the future.
  • BAD_URL_ATTRIBUTE: Incorrect url attribute in tag.
  • CONTENT_MIME_TYPE_NOT_DETECTED: Failed to determine mime-type of media:content tag.
  • MEDIA_GROUP_NOT_FORMED_CORRECTLY: The media:group tag must contain at least one media:content or media:player tag.
  • BAD_DATE_FORMAT: Incorrect publication date format.
  • PDA_URL_INVALID: Invalid mobile version URL.
  • DUPLICATE_DOC_ATTRIBUTE: Duplicate attribute.
  • GOOD_NEWS_COUNT_SMALL: Too few good articles.
  • MULTIPLE_PLAYER_TAGS: The media:group tag contains more than one media:player tag.
  • NEWS_TOO_OLD: Content is outdated.
  • NEWS_TOO_NEW: Content is too recent.
  • URL_LENGTH_TOO_LARGE: Article URL is too long (maximum 243 characters).
  • BAD_LOGO_URL: Incorrect logo URL.
  • BAD_MEDIA_MIMETYPE: Incorrect MIME type in the "media" attribute of the "enclosure" tag.
  • BAD_MEDIA_URL: Invalid URL in the "enclosure" tag.
  • BAD_RELATED_URL: Invalid external link.
  • NO_PUBDATE_IGNORED: Article publication date is missing.
  • PUBDATE_IN_FUTURE_IGNORED: Article publication date is in the future.
  • POSSIBLE_PUBDATE_CHEATING: Potentially incorrect publication date for document.
  • NO_TEXT: Full article text is missing.
  • TOO_LITTLE_AMOUNT_OF_WORDS: Too few words in the document. Check the presence and content of the yandex:full-text tag.
  • NEWS_DELETION_NOT_PERMITTED: Document deletion is not allowed.
  • BAD_ONLINE_URL: Invalid live broadcast URL.
  • HTML_ESCAPED_TWICE: HTML escaping applied twice.
  • NO_LANG_ATTRIBUTE: Missing 'lang' attribute.
  • MEDIA_GROUP_INCORRECTLY_FORMED: Incorrectly formed media:group tag (contains media:group inside).
  • BAD_THUMBNAIL_URL: Invalid video thumbnail URL.
  • BAD_VIDEO_URL: Invalid video URL.
  • BAD_PLAYER_URL: Invalid video player URL.
  • BAD_LANG_URL: Invalid value for 'lang' attribute.
  • NO_FULLTEXT: The yandex:full-text tag is missing or empty. Check its presence and content.
  • CANNOT_CONNECT_TO_FEED_CHECKER: Failed to connect to feed checker.
  • INCORRECTLY_FORMED_YANDEX_LOGO: The yandex:logo tag should not contain nested tags.
  • UNKNOWN_LOGO_TYPE: Invalid value for the type attribute of the yandex:logo tag.
  • BAD_LOGO_URL_IGNORED: Incorrect logo URL.
  • UNMAPPED_CATEGORY_IGNORED: Unmapped category.
  • FORBIDDEN_CATEGORY_IGNORED: Forbidden category.

Errors examples

Fetch error

{
  "feeds": [
    {
      "domain": "example.com",
      "url": "https://www.example.com/rss.xml",
      "feed_status": "REJECTED",
      "state": "ACTIVE",
      "validation_errors": {
        "code": "FETCH_ERROR",
        "fetch_error": {
          "error_code": "STATUS_IS_NOT_200"
        },
        "parse_error": null,
        "content_error": null
      }
    }
  ]
}
<?xml version="1.0" encoding="UTF-8"?>
<response>
  <feeds>
    <feed>
      <domain>example.com</domain>
      <url>https://www.example.com/rss.xml</url>
      <feed_status>REJECTED</feed_status>
      <state>ACTIVE</state>
      <validation_errors>
        <code>FETCH_ERROR</code>
        <fetch_error>
          <error_code>STATUS_IS_NOT_200</error_code>
        </fetch_error>
      </validation_errors>
    </feed>
  </feeds>
</response>

Content error

{
  "feeds": [
    {
      "domain": "example.com",
      "url": "https://www.example.com/rss.xml",
      "feed_status": "REJECTED",
      "state": "ACTIVE",
      "validation_errors": {
        "code": "CONTENT_ERROR",
        "fetch_error": null,
        "parse_error": null,
        "content_error": {
          "items": [
            {
              "url": "https://www.example.com/news/2023-02-20/305913-classes-for-morning-shift-canceled-in-seattle-schools-today",
              "title": "Classes for morning shift canceled in Seattle schools today",
              "publicationDate": "2023-02-20T11:21:15+07:00",
              "orderId": 1,
              "errors": [
                {
                  "errorCode": "PUBLICATION_TIME_IN_FUTURE",
                  "context": "Publication time is in the future (time delta = 0.008 days)"
                }
              ]
            }
          ]
        }
      }
    }
  ]
}
<?xml version="1.0" encoding="UTF-8"?>
<response>
  <feeds>
    <feed>
      <domain>"example.com"</domain>
      <url>https://www.example.com/rss.xml</url>
      <feed_status>REJECTED</feed_status>
      <state>ACTIVE</state>
      <validation_errors>
        <code>CONTENT_ERROR</code>
        <content_error>
          <items>
            <item>
              <url>"https://www.example.com/news/2023-02-20/305913-classes-for-morning-shift-canceled-in-seattle-schools-today"</url>
              <title>Classes for morning shift canceled in Seattle schools today</title>
              <publicationDate>2023-02-20T11:21:15+07:00</publicationDate>
              <orderId>1</orderId>
              <errors>
                <error>
                  <errorCode>PUBLICATION_TIME_IN_FUTURE</errorCode>
                  <context>Publication time is in the future (time delta = 0.008 days)</context>
                </error>
              </errors>
            </item>
          </items>
        </content_error>
      </validation_errors>
    </feed>
  </feeds>
</response>