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

# Fetch a Page

Fetch a [Page](/api-builder/pages) by its full URL. Frontic resolves the URL against your domain mappings to determine the scope, region, and locale, looks up the matching page record, and returns its block payload along with route metadata.

The page endpoint always returns HTTP **`200 OK`**. Logical redirects and not-found cases are encoded in the response body's `route` object so the consuming app can decide what to do (redirect, render a 404 page, etc.) rather than relying on HTTP-level status codes.

## Path Parameters

<ParamField path="project-token" type="string" required>
  Your project's Fetch token, embedded in the subdomain.
</ParamField>

<ParamField path="url" type="string" required>
  The full URL to resolve, without the `https://` scheme. Example: `<your-shop>/uk/women/shoes/running`.
</ParamField>

## Headers

See [Headers](/reference/fetch-api#headers) on the overview for the full set. The page endpoint primarily uses `fs-context`, `fs-version`, and `fs-secret` (only when the project has fetch keys configured). The URL's host already drives domain resolution, so `fs-domain` typically isn't needed for page calls.

## Response

Always `200 OK` at the HTTP level. The body's `route.code` carries the logical state.

<ResponseField name="type" type="string">
  Page type identifier when content is found (e.g. `ProductDetail`). Omitted for redirects and not-found responses.
</ResponseField>

<ResponseField name="block" type="string">
  The block name shaping `data`. Omitted for redirects and not-found responses.
</ResponseField>

<ResponseField name="data" type="object">
  The block payload — typed against the page's connected Detail Block. Field shapes depend on your project. Omitted for redirects and not-found responses.
</ResponseField>

<ResponseField name="route" type="object" required>
  Route metadata for the resolved (or not-resolved) URL.

  <Expandable title="Properties">
    <ParamField path="code" type="integer" required>
      Logical status: `200` (found), `301` (permanent redirect), `307` (temporary redirect), `404` (not found).
    </ParamField>

    <ParamField path="redirect" type="object">
      Present when `code` is `301` or `307`. Includes `url` and `domain` of the destination.
    </ParamField>

    <ParamField path="alternates" type="array">
      Alternate URLs for the same record (other locales/regions). Each entry: `url`, `region`, `locale`, `hreflang`.
    </ParamField>

    <ParamField path="context" type="object">
      The resolved context (`region`, `locale`, `scope`, `domain`) plus an optional `suggested` alternate when the visitor's request context doesn't match the URL's region/locale combination.
    </ParamField>
  </Expandable>
</ResponseField>

<RequestExample>
  ```bash curl theme={"theme":"css-variables"}
  curl 'https://fetch-<project-token>.frontic.com/page/<your-shop>/uk/women/shoes/running' \
    -H 'fs-context: <context-key>'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 OK (page found) theme={"theme":"css-variables"}
  {
    "type": "Category",
    "block": "CategoryDetail",
    "data": {
      "title": "Running Shoes",
      "intro": "Trail runners and road shoes for every distance.",
      "products": { "items": [] }
    },
    "route": {
      "code": 200,
      "alternates": [
        {
          "url": "<your-shop>/de/damen/schuhe/laufschuhe",
          "region": "de",
          "locale": "de-DE",
          "hreflang": "de-DE"
        }
      ],
      "context": {
        "region": "uk",
        "locale": "en-GB",
        "scope": "public",
        "domain": "<your-shop>/uk"
      }
    }
  }
  ```

  ```json 200 OK (permanent redirect) theme={"theme":"css-variables"}
  {
    "route": {
      "code": 301,
      "redirect": {
        "url": "<your-shop>/uk/women/shoes/runners",
        "domain": "<your-shop>/uk"
      },
      "context": {
        "region": "uk",
        "locale": "en-GB",
        "scope": "public",
        "domain": "<your-shop>/uk"
      }
    }
  }
  ```

  ```json 200 OK (not found) theme={"theme":"css-variables"}
  {
    "route": {
      "code": 404,
      "context": {
        "region": "uk",
        "locale": "en-GB",
        "scope": "public",
        "domain": "<your-shop>/uk"
      }
    }
  }
  ```
</ResponseExample>

## Status codes

| Code  | When                                                                                                                 |
| ----- | -------------------------------------------------------------------------------------------------------------------- |
| `200` | Always — including redirect and not-found cases (logical status is in `route.code`).                                 |
| `401` | `fs-secret` missing or wrong (only when the project has fetch keys configured)                                       |
| `403` | Project's plan limit for Fetch API requests exceeded                                                                 |
| `404` | The URL didn't resolve to a configured project domain at all (couldn't determine which project the request was for). |

The Nuxt module's [`useFronticPage`](/reference/nuxt-module#usefronticpage) composable maps `route.code` back to HTTP-style behaviour for you (`redirectOn301`, `throwOn404`).
