---
title: "Discover"
method: POST
path: "/v2/discover"
tags: ["v2", "v2-discover"]
---

# Discover

`POST /v2/discover`

## Request

- Base URL: `https://api.enconvert.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.enconvert.com/v2/discover`
- Auth: none declared

List a site's URLs with no browser (sitemap + HTTP-only crawl).

## Headers

- `X-API-Key` string, nullable
- `authorization` string, nullable

## Request body

- DiscoverRequest: One /v2/discover request (plan section 4). ``extra="forbid"``: unknown keys 422 with the field name instead of being silently dropped (2026-08-06 QA root-cause report, fix A1).
  - `url` string, required
  - `mode` 'sitemap' | 'crawl' | 'hybrid'
  - `max_urls` integer
  - `max_depth` integer
  - `include_patterns` string[]: Regex (re.search) allowlist; a URL must match at least one to be returned. Empty = allow all.
  - `exclude_patterns` string[]: Regex (re.search) denylist; a URL matching any is dropped. Applied after include_patterns.
  - `same_domain_only` boolean
  - `respect_robots` boolean: When true, robots.txt Disallow rules are applied to the RETURNED list (disallowed URLs are dropped). NOTE: crawl4ai 0.8.9 has no native robots gate, so in crawl/hybrid mode pages may still be fetched over HTTP and then discarded — robots is enforced at output-filter time, not fetch time.
  - `render_js` 'auto' | 'never' | 'always': Browser-rendered discovery for JS/SPA sites (crawl/hybrid modes only). 'auto' renders only when the HTTP-only crawl returns a JS shell (<=1 URL); 'always' forces a bounded browser crawl; 'never' disables it. Uses the singleton Chromium, so it is capped to a few pages (DISCOVER_JS_MAX_PAGES).

## Response `200`

Successful Response

- DiscoverResponse: Flat URL list + provenance for one /v2/discover call.
  - `url` string, required
  - `mode` 'sitemap' | 'crawl' | 'hybrid', required
  - `total` integer, required
  - `urls` string[]
  - `pages_crawled` integer
  - `truncated` boolean: True when more URLs were discovered than max_urls allowed; the list was capped.
  - `robots_respected` boolean
  - `sources` object: Raw URL count contributed by each source before dedup/filter, e.g. {'sitemap': 42, 'crawl': 30}.
  - `warnings` string[]

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/enconvert/apis/conversion-api.md) · [All operations](https://skmtc.dev/enconvert/apis/conversion-api/llms.txt) · [OpenAPI document](https://skmtc.dev/enconvert/apis/conversion-api/revisions/b8c820393569?raw)
