Validation for URL

Request format

Alert

The request URL contains the version number of the Structured Data Validator API. To find out the current value, see the section API versions.

https://validator-api.semweb.yandex.ru/v1.1/url_parser
  ? apikey=<API key>
  & [[url](*url)=<document address>]
  & [lang=<language for error messages>]
  & [pretty=<response output format>]
  & [id=<request ID>]
  & [only_errors=<type of response>]
apikey *

Value of the API key. You can get a free API key in the Developer's Dashboard.

url

Address of the document being validated.

Note

Special symbols in the URL of the document to validate must be replaced with percent-encoding escape sequences. For example, the ampersand (&) must be replaced with the sequence "%26".

lang

The language for messages about errors in structured data.

Acceptable values:

  • «ru» — Russian
  • «en» — English
  • «uk» — Ukrainian
  • «tr» — Turkish

If the lang parameter is not set, error messages are given in English (the default value is «en»).

pretty

How to output the response to the request.

Acceptable values:

  • «false» — The request result is output as continuous text.
  • «true» — The request result is output in a human-readable adapted format.

If the pretty parameter is not set, the request result is output without line breaks (the default value is «false»).

id

ID of the request. Used when performing asynchronous requests.

It may contain:

  • uppercase and lowercase Latin letters
  • numbers
  • symbols: - (dash) and _ (underline)
only_errors

The type of response returned: standard or errors only.

Acceptable values:

  • «false» — Returns a standard response (contains all the fields and values in the document being validated).

  • «true» — The response returns only information about fields containing errors.

    If errors were not found when validating the document, the server returns the code «204 No Content».

If the only_errors parameter was not set, the standard response is returned (the default value is «false»).

* Required.

Example

Request to validate the document published at: https://en.wikipedia.org/wiki/Yandex.

The HTTP request method is GET.

The response output format is human-readable (pretty=true).

The request ID is 1 (id=1).

The language for error messages is English (lang=en).

The response type is errors only (only_errors=true).

https://validator-api.semweb.yandex.ru/v1.1/url_parser?apikey=12345a12-3b4c-5123-d4ef-g51h23ij451&pretty=true&id=1&lang=en&only_errors=true&url=https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FYandex

The section Response format shows an example of the response to the request.