AI training data
AI training data is the text, code or images a model learns from in pre-training or fine-tuning, much of it from public web pages. Zenrows Crawl finds the URLs on each source site and Batch fetches them at volume as clean Markdown, building a corpus with source URL and fetch time on every document.
Updated
{
"id": "sha256:4be1c09a7d3e",
"url": "https://www.example-standards.org/guides/water-quality-testing",
"domain": "example-standards.org",
"fetched_at": "2026-10-17T03:41:56Z",
"format": "markdown",
"language": "en",
"license_note": "CC BY 4.0 per page footer",
"tokens": 1842,
"text": "# Water quality testing\n\nSamples should be collected in sterile containers and analysed within 24 hours.\n\n## Field parameters\n\n| Parameter | Method |\n|---|---|\n| pH | Electrode |\n| Turbidity | Nephelometer |"
}
text; hash id, language, licence note and token count come from your pipeline.What AI training data teams collect
Unlike a RAG index, a training corpus holds millions of documents, frozen per version, each with defensible provenance.
| Job | Data you collect | Typical sources |
|---|---|---|
| Domain pre-training corpus | Long-form text in one field | Government publications, standards bodies, university repositories, |
| Instruction and Q&A pairs | Questions with accepted answers | |
| Multilingual corpora | Native text per market | National news and public broadcasters, via geotargeting |
| Code and technical text | Docs, READMEs, tutorials, API references | Language docs, |
| Domain fine-tuning sets | Product, legal, medical, financial language | |
| Fresh evaluation sets | Pages after a model's knowledge cutoff | Recent news, filings, documentation releases |
Why AI training data collection stalls
Past a few hundred thousand URLs, collection stalls on throughput, then on clean text and provenance.
A homegrown queue takes weeks of restarts
Batch: one job, per-URL status
DataDome or Cloudflare challenges
Zenrows' stealth gets through Cloudflare, DataDome, Akamai and similar
Navigation, scripts and styles leak into documents
Markdown output, not raw HTML
One page under www, trailing-slash and tracking variants
Crawl normalizes URLs and drops duplicates
Unknown source or date
Each Batch result keeps its URL and external_id
Different text by country
Geotargeting reads each market's version
How to collect AI training data with Zenrows
- Define the sources and record each one's terms and licence first.
- Discover the URLs with Crawl patterns and no output format.
- Fetch at volume in Batch with Markdown and Adaptive Stealth Mode, escalating only when a page needs it.
- Dedupe and package: hash, filter near-duplicates and quality, write JSONL shards with URL and fetch time.
# Discover article URLs on one source (URLs only, no page content)
curl -X POST "https://api.zenrows.com/v1/crawls" \
-H "X-API-Key: YOUR_ZENROWS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "START_URL",
"max_items": 100000,
"max_pages": 100000,
"include_patterns": ["/guides/", "/articles/"],
"exclude_patterns": ["/tag/", "/search", "/print/"]
}'# pip install requests
import hashlib, json, time
from datetime import datetime, timezone
import requests
API = "https://async.api.zenrows.com/v1"
HEADERS = {"X-API-Key": "YOUR_ZENROWS_API_KEY"}
job = requests.post(f"{API}/jobs", headers=HEADERS, timeout=60, json={
"type": "regular",
"status": "closed",
"zenrows_params": {"mode": "auto", "response_type": "markdown"},
"tasks": [{"url": u, "external_id": str(i)} for i, u in enumerate(SOURCE_URLS)],
}).json()
job_id = job["job_id"]
while True: # wait for the run to finish
run = requests.get(f"{API}/jobs/{job_id}", headers=HEADERS, timeout=60).json()["latest_run"]
if run["status"] in ("completed", "failed", "stopped"):
break
time.sleep(30)
seen, params = set(), {"status": "successful"}
with open("corpus-000.jsonl", "a") as shard:
while True:
page = requests.get(f"{API}/jobs/{job_id}/results", headers=HEADERS,
params=params, timeout=60).json()
for row in page["results"]:
text = requests.get(row["result_url"], timeout=60).text
digest = hashlib.sha256(text.encode()).hexdigest()
if digest in seen:
continue # exact duplicate
seen.add(digest)
shard.write(json.dumps({"id": digest, "url": row["url"], "text": text,
"fetched_at": datetime.now(timezone.utc).isoformat()}) + "\n")
if not page.get("next_cursor"):
break
params["cursor"] = page["next_cursor"]npx -y @zenrows/cli init
zenrows crawl create START_URL --include-patterns /guides/ --include-patterns /articles/ --max-pages 1000 --follow
zenrows crawl results CRAWL_ID --out urls.jsonl
# keep one {"url": "..."} per line for Batch
zenrows batch create urls.jsonl --output markdown --wait
zenrows batch results JOB_ID --out corpus.jsonl# Connect once
claude mcp add zenrows -e ZENROWS_API_KEY=YOUR_ZENROWS_API_KEY -- npx -y @zenrows/mcp
# Then ask:
Use Zenrows to crawl the /guides/ section of START_URL, fetch every guide as Markdown, and save one JSONL record per page with the URL, title and text.Which Zenrows product fits
- List a source site's URLs CrawlFollows in-domain links, keeps matching paths, drops duplicates
- Fetch millions of documents BatchWhole URL lists as jobs, Markdown, per-URL results
- Test a source before a full run FetchOne request shows what the corpus will get
- Turn pages into fields for fine-tuning pairs ExtractJSON fields like question and answer, no selectors
What success looks like
| Measure | What good looks like | How to check it |
|---|---|---|
| Corpus size | Tokens per source and in total meet the plan | Token sums per shard and domain |
| Fetch success per source | Usable text for nearly every URL | Success and failure counts per Batch run |
| Duplicate rate | No exact duplicates, few near ones | Drops per dedup stage |
| Provenance | URL, fetch time and licence note on every record | Schema-validate shards before training |
| Text quality | Content, not menus, cookie notices or errors | Scored samples or a quality classifier |
| Refresh time | Full re-collection fits your training schedule | Batch run times against the due date |
AI training data FAQ
-
What a model learns from: for language models, text and code, in pre-training (broad corpora) and fine-tuning (small task sets like question and answer pairs). Public web pages are among the largest sources, collected with crawlers and scraping APIs, then cleaned.
-
Provider datasets are fast but shared, on their schedule. Your own collection sets sources, mix and refresh date, with a URL trail per document. Zenrows collects; you own the corpus.
-
Crawl discovers each site's URLs; Batch fetches them as Markdown. Store JSONL records with URL and fetch time, then deduplicate, detect language and filter quality before training.
-
In layers: Crawl drops duplicate URLs and tracking variants; hashing removes exact copies (see the Python example); a near-duplicate pass like MinHash on shingles catches syndicated articles and boilerplate differing by a date or byline.
-
It depends on source, jurisdiction and use. Teams keep to public pages, check terms and robots rules, honour licences like Creative Commons attribution, and avoid or redact personal data. Training copyright is unsettled; ask legal first.
-
Usually JSONL, one document per line: Markdown or plain text plus URL, fetch time, language and licence. Markdown keeps headings, lists and tables for chunking and quality scoring; strip it later if your tokenizer prefers.
-
Pre-training: billions of tokens, breadth first. Fine-tuning: quality first; a few thousand clean, consistent examples often beat a large noisy set. Start small, hold out an evaluation set, add data where it shows gaps.
-
Yes. Crawl and Batch collect image URLs, alt text and captions; Fetch downloads the files. See computer vision training data.