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

# Discover pages

> Lists the pages on a site without creating anything. Pass the ones you want as `source.config.pages` to [Create knowledge base](/api-reference/knowledge-bases/create-knowledge-base).



## OpenAPI

````yaml /api-reference/rest/openapi.yaml post /v1/knowledge-bases/discover-pages
openapi: 3.1.0
info:
  title: Zero Runtime REST API
  version: '1.0'
  description: >-
    Create, configure, version and deploy agents, and wire SIP telephony to
    them.
servers:
  - url: https://api.zeroruntime.ai
security:
  - token: []
tags:
  - name: Agents
  - name: Versions
  - name: Deployment
  - name: Phone numbers
  - name: Routing rules
  - name: Calls
  - name: Batch calls
  - name: Knowledge bases
  - name: Knowledge base folders
paths:
  /v1/knowledge-bases/discover-pages:
    post:
      tags:
        - Knowledge bases
      summary: Discover pages
      description: >-
        Lists the pages on a site without creating anything. Pass the ones you
        want as `source.config.pages` to [Create knowledge
        base](/api-reference/knowledge-bases/create-knowledge-base).
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - url
              properties:
                url:
                  type: string
                  format: uri
                  description: The site to look through.
                  example: https://help.example.com
                maxDepth:
                  type: integer
                  minimum: 0
                  maximum: 5
                  default: 1
                  description: How many links deep to look from `url`.
      responses:
        '200':
          description: The pages found.
          content:
            application/json:
              schema:
                type: object
                properties:
                  url:
                    type: string
                  maxDepth:
                    type: integer
                  pages:
                    type: array
                    description: Pages on the same host as `url`, at most `limit`.
                    items:
                      type: object
                      properties:
                        url:
                          type: string
                        title:
                          type:
                            - string
                            - 'null'
                        depth:
                          type: integer
                          description: Links away from `url`. `0` is `url` itself.
                  truncated:
                    type: boolean
                    description: '`true` when the site has more pages than `limit`.'
                  limit:
                    type: integer
                    description: The most pages returned.
              example:
                url: https://help.example.com
                maxDepth: 1
                pages:
                  - url: https://help.example.com/
                    title: Help center
                    depth: 0
                  - url: https://help.example.com/billing
                    title: Billing
                    depth: 1
                truncated: false
                limit: 100
        '400':
          description: The body didn't validate.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/KnowledgeBaseValidationError'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '422':
          description: The site can't be reached, or none of its pages could be read.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Message'
              example:
                message: URL is unreachable
components:
  schemas:
    KnowledgeBaseValidationError:
      type: object
      properties:
        message:
          type: string
          example: Invalid payload
        errors:
          type: object
          description: Every problem found, grouped by field.
          properties:
            formErrors:
              type: array
              items:
                type: string
            fieldErrors:
              type: object
              additionalProperties:
                type: array
                items:
                  type: string
    Message:
      type: object
      properties:
        message:
          type: string
    Error:
      type: object
      properties:
        error:
          type: string
  responses:
    Unauthorized:
      description: Missing or invalid `Authorization` header.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    token:
      type: apiKey
      in: header
      name: Authorization
      description: Your API token, sent raw (no `Bearer` prefix).
      x-default: <auth-token>

````

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