data.metadata object, whatever you list in formats. It describes the page itself: its title, description, language, social preview tags, status code, and what the call cost. A field is left out when the page does not have it, so check that a field is there before you use it.
Make a request
Get an API key in the Quickstart. This request reads a docs page. It asks formarkdown so the response has something besides metadata.
Read the response
This real response is cut. The Markdown is shortened, and a few of the page’s meta tags are left out.ogTitle, and once under the tag’s own name such as og:title. Use the plain names when they exist.
Fields
Every other meta tag on the page also comes back under its own name, such as
twitter:card or viewport. A tag that appears several times comes back as an array of strings.
Limits and errors
metadatais always an object. A page with no meta tags still hassourceURL,url,statusCode,contentTypeandcacheState.- A YouTube link has no meta tags to read. Its
title,descriptionandogImagecome from the video. See YouTube. - A page that answers with a 404 or 410 status comes back with that
statusCodeand anerror, and costs nothing. See Timeouts and errors.
Related
- Scrape overview lists every format and option.
- Crawl page content shows the same object on every crawled page.
- Freshness and caching explains
cacheStateandcachedAt. - Markdown returns the page text next to this object.