> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stophy.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Page metadata

> Read data.metadata for the page status, title, dates, cache state and cost. Every successful scrape returns it, whatever formats you ask for.

`data.metadata` is an object on every successful scrape. A field is left out when the page does not have it, so check that it is there before you use it. A page with no meta tags still has `sourceURL`, `url`, `statusCode`, `contentType` and `cacheState`.

```json theme={null}
{
  "success": true,
  "data": {
    "metadata": {
      "title": "404 Not Found - HTTP | MDN",
      "description": "The HTTP 404 Not Found client error response status code indicates that the server cannot find the requested resource.",
      "language": "en-US",
      "statusCode": 200,
      "costUsd": 0.001
    }
  }
}
```

| Field | Holds |
| - | - |
| `title`, `description`, `language` | From the page. `language` is such as `en-US`. |
| `sourceURL`, `url` | The URL you sent, and where the page ended up after redirects. |
| `statusCode`, `contentType` | The HTTP status, and what the page is, such as `text/html`, `application/pdf` or `text/csv`. |
| `cacheState`, `cachedAt` | `hit`, `miss` or `stale`, and when the stored copy was made (only on `hit` and `stale`). See [Freshness and caching](https://docs.stophy.dev/scrape/freshness-and-caching.md). |
| `scrapeId` | The id of this read, for `GET /v1/scrape/{id}`. |
| `costUsd` | What the call cost, in dollars. |
| `creditsUsed` | Crawl and batch pages only. Read `costUsd` instead. |
| `numPages`, `totalPages`, `ocrPages` | For a PDF: pages read, pages in the file, pages read from their picture. See [PDFs and documents](https://docs.stophy.dev/scrape/pdfs-and-documents.md). |
| `error` | Set when the page answered with a status of 400 or more, such as `The page answered with status 403.` |
| `keywords`, `ogLocaleAlternate`, `publishedTime`, `modifiedTime` | From the page's `keywords`, `og:locale:alternate` and `article:*` time tags. |

Send `"allMetaTags": true` for every other tag too: `ogImage`, `favicon`, the Open Graph and Dublin Core fields under plain names such as `ogTitle` and `dcDate`, and every meta tag under its own name, such as `og:title` or `twitter:card`. A tag that appears several times comes back as an array of strings.

A YouTube link has no meta tags to read. Its `title` and `description` come from the video, and `ogImage` with `allMetaTags`. A page that answers 404 or 410 has that `statusCode` and an `error`, and costs nothing. [Crawl](https://docs.stophy.dev/crawl/overview) returns the same object for each crawled page.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.