PageHub Content API

The public headless content API.

GitHub OpenAPI

Operations 2

GET /api/v1/content/{site}/{collection} List collection items #
GET /api/v1/content/{site}/{collection}/schema Describe a collection's fields + response shape #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/pagehub-dev:pagehub-dev-content-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

pagehub-dev-content-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: PageHub Content API
  version: 1.0.0
  description: 'The public REST API of PageHub, called with a `ph_` API key (`Authorization: Bearer ph_...`), plus the one webhook the platform calls on a white-label tenant''s server (`fetchPage`).


    A site is HTML + Liquid files: its pages are files (`pages/*.liquid`), written through the files API; the page routes manage each page''s record (name, slug, SEO, access). Writes land in the site''s draft; `PUT /api/v1/sites/{id}` with `published: true` makes the draft live.


    The headless content API (`/api/v1/content/...`) is described by its own document (`GET /api/v1/content/openapi.json`); `GET /api/openapi.json` serves this document with it merged in.


    The routes also accept the dashboard''s session cookie from the dashboard itself; only the API key is the public contract.


    Every operation carries two extension fields. `x-auth` says who may call it: `api-key` (a `ph_` key), `session-or-key` (the dashboard''s own session, or a key), `optional-key` (public, a key widens what you see), `admin-key` (a platform admin''s key), `session` (the dashboard session only; an API key is refused) or `public`. `x-rate-limit` names the rate-limit rule (see the rate-limiting guide) when the route has one; most routes limit per user, public routes per IP.'
  contact:
    name: PageHub
    url: https://pagehub.dev/developers
servers:
- url: https://pagehub.dev
  description: PageHub
security:
- bearerAuth: []
tags:
- name: Content
  description: The public headless content API.
paths:
  /api/v1/content/{site}/{collection}:
    get:
      summary: List collection items
      operationId: listContentItems
      security:
      - {}
      - bearerAuth: []
      parameters:
      - name: site
        in: path
        required: true
        schema:
          type: string
        description: Page id.
      - name: collection
        in: path
        required: true
        schema:
          type: string
        description: Collection slug.
      - name: q
        in: query
        schema:
          type: string
        description: Full-text search.
      - name: category
        in: query
        schema:
          type: string
      - name: sort
        in: query
        schema:
          type: string
        description: e.g. price-asc, newest.
      - name: page
        in: query
        schema:
          type: integer
          minimum: 1
          default: 1
      - name: limit
        in: query
        schema:
          type: integer
          minimum: 1
          maximum: 100
          default: 20
      - name: minPrice
        in: query
        schema:
          type: integer
      - name: maxPrice
        in: query
        schema:
          type: integer
      - name: filter
        in: query
        schema:
          type: string
        description: JSON object of equality constraints, e.g. {"brand":"acme"}.
      - name: facet.<key>
        in: query
        schema:
          type: string
        description: Comma-separated facet values, e.g. ?facet.color=red,blue.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/NormalizedItem'
                  meta:
                    $ref: '#/components/schemas/ListMeta'
                required:
                - data
                - meta
        '400':
          description: Missing site or collection
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Auth required (private collection)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Not authorized for this site
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Collection not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limited
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '502':
          description: Upstream fetch failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      tags:
      - Content
  /api/v1/content/{site}/{collection}/schema:
    get:
      summary: Describe a collection's fields + response shape
      operationId: getContentSchema
      security:
      - {}
      - bearerAuth: []
      parameters:
      - name: site
        in: path
        required: true
        schema:
          type: string
      - name: collection
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      collection:
                        type: object
                        properties:
                          slug:
                            type: string
                          name:
                            type: string
                          isPublic:
                            type: boolean
                      fields:
                        type: array
                        items:
                          $ref: '#/components/schemas/FieldDescriptor'
                required:
                - data
        '401':
          description: Auth required (private collection)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Not authorized for this site
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Collection not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      tags:
      - Content
components:
  schemas:
    ListMeta:
      type: object
      properties:
        page:
          type: integer
        limit:
          type: integer
        count:
          type: integer
        totalCount:
          type: integer
        totalPages:
          type: integer
        hasMore:
          type: boolean
      required:
      - page
      - limit
      - count
      - totalCount
      - totalPages
      - hasMore
    NormalizedItem:
      type: object
      description: A collection row mapped to the canonical item shape. Non-reserved fields ALSO appear under `metadata.<key>` and flat at `item.<key>`; use the /schema endpoint to learn each field's path.
      properties:
        id:
          type: string
        title:
          type: string
        slug:
          type: string
        image:
          type: string
          description: First image field, if any.
        images:
          type: array
          items:
            type: string
        price:
          type: object
          properties:
            amount:
              type: number
              description: Minor units (e.g. cents).
            currency:
              type: string
            formatted:
              type: string
        metadata:
          type: object
          additionalProperties: true
          description: Every non-reserved field, keyed by its field key.
      required:
      - id
      - title
      - metadata
      additionalProperties: true
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
            message:
              type: string
          required:
          - code
          - message
      required:
      - error
    FieldDescriptor:
      type: object
      properties:
        key:
          type: string
        label:
          type: string
        type:
          type: string
        required:
          type: boolean
        responsePath:
          type: string
          description: Where the field reads in an item, e.g. "title", "price.amount", "metadata.color".
        flatAlias:
          type: boolean
          description: Also available at item.<key>.
      required:
      - key
      - label
      - type
      - required
      - responsePath
      - flatAlias
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: A `ph_` API key (a user's key, or a tenant's).
    tenantAuthToken:
      type: apiKey
      in: header
      name: x-pagehub-auth
      description: The tenant's token, sent by PageHub on every webhook call so the tenant can check the request came from PageHub.