# Documentation ingestion: docs site to Markdown

Documentation ingestion is URL discovery plus clean Markdown. Map the docs origin, scrape or crawl the pages you want, and store Markdown your chunker already understands.

## Workflow

1. **Map the docs origin.** POST /v1/map on the docs root (or use the free URL extractor tool) to get candidate paths before you spend crawl credits everywhere.
2. **Filter to high-signal pages.** Keep guides, references, and changelogs. Drop locale duplicates and pure marketing URLs when they do not help the model.
3. **Scrape or crawl to Markdown.** POST /v1/scrape for a curated list, or POST /v1/crawl from a start URL when you want multiple pages in one job. Parse PDFs with POST /v1/parse when needed.
4. **Publish an llms.txt index (optional).** Draft llms.txt / llms-full.txt so agents can find the canonical docs without scraping the whole domain first. Use the free llms.txt generator or edit by hand.

## Map then scrape a docs page

```bash
curl -s -X POST https://webcrawl.app/v1/map \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://example.com/docs"}'

curl -s -X POST https://webcrawl.app/v1/scrape \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://example.com/docs/getting-started"}'
```

## FAQ

### How is this different from the RAG knowledge base guide?

Documentation ingestion focuses on docs-site discovery and Markdown export. The RAG guide covers the wider retrieval loop including extract and MCP refresh.

### Can I try without an API key?

Yes for small jobs. Use the free website to Markdown, URL extractor, and llms.txt generator tools (rate limited).

### Does crawl respect a path prefix?

Pass crawl options documented in OpenAPI when you want to limit scope. Start with map when you only need a URL list.

HTML: https://webcrawl.app/use-cases/documentation-ingestion
