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

# Discover URLs

> Discover URLs.

### Authorizations

<ParamField header="X-Api-Key" type="string" required>
  Your Agni API key used to authenticate the request. Pass it in the `X-Api-Key` header. Find or rotate it from your Ravan AI account settings.
</ParamField>

***

### Body

<ParamField body="url" type="string" required>
  A publicly reachable URL. Include the full protocol, for example `https://example.com/docs`.
</ParamField>

<ParamField body="max_depth" type="integer">
  The maximum crawl depth when discovering or ingesting URLs. Higher values can include more nested pages.
</ParamField>

<ParamField body="limit" type="integer">
  The maximum number of records to return. Use this with `offset` or pagination fields to page through results.
</ParamField>

***

### Response

<ResponseField name="success" type="boolean">
  Whether the request succeeded.
</ResponseField>

<ResponseField name="message" type="string">
  Human-readable status message.
</ResponseField>

<ResponseField name="data" type="object">
  Returned data.

  <Expandable title="data">
    <ResponseField name="urls" type="string[]">
      Discovered URLs
    </ResponseField>
  </Expandable>
</ResponseField>


## OpenAPI

````yaml POST /api/v1/rag/discover
openapi: 3.0.1
info:
  title: Agni API
  version: 1.0.0
  description: >-
    Agni API for managing agents, tools, widget settings, telephony, and
    integrations.
servers:
  - url: https://api.ravan.ai
security:
  - X-Api-Key: []
tags:
  - name: AgentService
  - name: AgentToolService
  - name: WidgetSettingsService
  - name: PhoneService
  - name: AppointmentService
  - name: GHLService
  - name: CalComService
  - name: CampaignService
  - name: ContactService
  - name: CallingService
  - name: RAGService
  - name: ModelService
  - name: HealthService
paths:
  /api/v1/rag/discover:
    post:
      tags:
        - RAGService
      summary: Discover URLs
      operationId: DiscoverURLs
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DiscoverURLsRequest'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DiscoverURLsResponse'
components:
  schemas:
    DiscoverURLsRequest:
      type: object
      required:
        - url
      properties:
        url:
          type: string
          description: Root URL to discover from
        max_depth:
          type: integer
          description: Max crawl depth
        limit:
          type: integer
          description: Max URLs to return
    DiscoverURLsResponse:
      type: object
      properties:
        success:
          type: boolean
        message:
          type: string
        data:
          type: object
          properties:
            urls:
              type: array
              items:
                type: string
              description: Discovered URLs
  securitySchemes:
    X-Api-Key:
      type: apiKey
      in: header
      name: X-Api-Key

````