# LLM knowledge ingestion, 37x fewer tokens than HTML | Spider

One Spider crawl returned 60 documentation pages as markdown with about 37x fewer tokens than raw HTML, in 6.5 s for $0.048 on pay as you go. Cost varies by site.

Canonical: https://spider.cloud/use-cases/ai-training/

## Markdown with about 37 times fewer tokens than the raw HTML.

For teams building fine-tuning and pre-training sets from the public web. On November 6, 2026, [one crawl call](https://spider.cloud/benchmarks/#search-and-crawl-dataset-2026-11-06) returned 60 documentation pages as markdown in 6.5 seconds.

[Get an API key](https://spider.cloud/register/) [API documentation](https://spider.cloud/docs/api/)

Tokens in o200k_base. Top pair at one scale, the rest at about 37 times that.

## One call in, 396 training records out.

The crawl stayed under kubernetes.io/docs/concepts/ and asked for markdown over plain HTTP. Two short scripts then stripped the page chrome, cut the text at headings and split train from eval by page, so no page sits on both sides. With the search call that found the site, collection cost $0.052, which is $0.13 per thousand records. Cost varies by site.

The call, as it was sent

```
curl -s https://api.spider.cloud/crawl \
  -H "Authorization: Bearer $SPIDER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://kubernetes.io/docs/concepts/","limit":60,"return_format":"markdown","whitelist":["/docs/concepts/"],"metadata":true,"request":"http"}' \
  -o crawl.json
```

One line of train.jsonl, content trimmed

```
{
  "messages": [
    {
      "role": "user",
      "content": "Kubernetes concepts. Operator pattern: Operators in Kubernetes"
    },
    {
      "role": "assistant",
      "content": "Kubernetes is designed for automation. Out of the box, you get lots of\nbuilt-in automation from the core of Kubernetes. ..."
    }
  ],
  "meta": {
    "id": "b9a2fd48f0a9-0",
    "source": "https://kubernetes.io/docs/concepts/extend-kubernetes/operator/",
    "license": "CC BY 4.0"
  }
}
```

Every record keeps its source URL and license, so you can trace an example back to its page when you audit or refresh the set. The [AI scraper guide](https://spider.cloud/guides/building-a-speedy-resilient-web-scraper-for-rag-ai-part1-preparing/) walks through the same pipeline from first crawl to production.

## Raise the limit, and the call and the scripts stay the same.

Sixty pages proves the pipeline. For a real set, raise `limit` and cap the spend with `max_credits_allowed`. A large crawl streams pages as they finish, so your collector writes records while the rest are on the way. Spider can also chunk on its side with `chunking_alg`.

Markdown is one value of `return_format`. Plain text, raw HTML, CommonMark and XML come from the same call. In [a run of ten mixed pages](https://spider.cloud/benchmarks/#tokens-by-format-2026-11-05), the median page had 15 times fewer tokens as markdown than as raw HTML, so expect less than the 37 times seen on documentation.

Pay as you go bills by the page. The Unlimited plan bills by requests at once instead, starting at $40 a month for 2 requests at once in http mode. Spider loads straight into [LangChain](https://spider.cloud/docs/integrations/langchain/) and [LlamaIndex](https://spider.cloud/docs/integrations/llamaindex/).

## Better data, fewer scrapers.

Point the crawl at the docs your model should know, then run the same two scripts.

[Get an API key](https://spider.cloud/register/) [RAG pipelines](https://spider.cloud/use-cases/rag/)
