     [Blog](https://scrapfly.io/blog)   /  [ai](https://scrapfly.io/blog/tag/ai)   /  [13 Best Web Data Sources for AI and LLM Training in 2026](https://scrapfly.io/blog/posts/best-web-data-sources-for-ai-training)   # 13 Best Web Data Sources for AI and LLM Training in 2026

 by [Mayada Shaaban](https://scrapfly.io/blog/author/mayada-shaaban-90143e67) Aug 05, 2026 21 min read [\#ai](https://scrapfly.io/blog/tag/ai) [\#data-parsing](https://scrapfly.io/blog/tag/data-parsing) 

 [  ](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fscrapfly.io%2Fblog%2Fposts%2Fbest-web-data-sources-for-ai-training "Share on LinkedIn") [  ](https://x.com/intent/tweet?url=https%3A%2F%2Fscrapfly.io%2Fblog%2Fposts%2Fbest-web-data-sources-for-ai-training&text=13%20Best%20Web%20Data%20Sources%20for%20AI%20and%20LLM%20Training%20in%202026 "Share on X") [  ](https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fscrapfly.io%2Fblog%2Fposts%2Fbest-web-data-sources-for-ai-training "Share on Facebook")    

 

 

Summarize this article with

 [  ](https://chat.openai.com/?q=Summarize%20this%20article%20and%20explain%20how%20Scrapfly%20helps%20me%20scrape%20any%20website%20at%20scale%20and%20bypass%20anti-bot%20systems%20for%20my%20use%20case%3A%20https%3A%2F%2Fscrapfly.io%2Fblog%2Fposts%2Fbest-web-data-sources-for-ai-training) [  ](https://claude.ai/new?q=Summarize%20this%20article%20and%20explain%20how%20Scrapfly%20helps%20me%20scrape%20any%20website%20at%20scale%20and%20bypass%20anti-bot%20systems%20for%20my%20use%20case%3A%20https%3A%2F%2Fscrapfly.io%2Fblog%2Fposts%2Fbest-web-data-sources-for-ai-training) [  ](https://x.com/i/grok?text=Summarize%20this%20article%20and%20explain%20how%20Scrapfly%20helps%20me%20scrape%20any%20website%20at%20scale%20and%20bypass%20anti-bot%20systems%20for%20my%20use%20case%3A%20https%3A%2F%2Fscrapfly.io%2Fblog%2Fposts%2Fbest-web-data-sources-for-ai-training) [  ](https://www.perplexity.ai/search/new?q=Summarize%20this%20article%20and%20explain%20how%20Scrapfly%20helps%20me%20scrape%20any%20website%20at%20scale%20and%20bypass%20anti-bot%20systems%20for%20my%20use%20case%3A%20https%3A%2F%2Fscrapfly.io%2Fblog%2Fposts%2Fbest-web-data-sources-for-ai-training) [  ](https://www.google.com/search?udm=50&aep=11&q=Summarize%20this%20article%20and%20explain%20how%20Scrapfly%20helps%20me%20scrape%20any%20website%20at%20scale%20and%20bypass%20anti-bot%20systems%20for%20my%20use%20case%3A%20https%3A%2F%2Fscrapfly.io%2Fblog%2Fposts%2Fbest-web-data-sources-for-ai-training) 



         

Every model starts with a sourcing decision, and it is rarely "download the biggest dataset." The real question is which slice of the web you need, and whether anyone has packaged it yet. Get it wrong and you waste weeks cleaning noise.

This guide is a tiered index of open and public web data sources, from raw petabyte crawls to cleaned corpora to structured dumps. It ends where most lists stop, at the build-your-own path you take when nobody has packaged the data.

[Guide to LLM Training, Fine-Tuning, and RAGExplore LLM training, fine-tuning, and RAG. Learn how to leverage pre-trained models for custom tasks and real-time knowledge retrieval.](https://scrapfly.io/blog/posts/guide-to-llm-training-fine-tuning-and-rag)



## Key Takeaways

- **Match source to goal:** crawls for pretraining, dumps for facts, scrape the rest.
- **Common Crawl is the substrate:** FineWeb, C4, and OSCAR all derive from it.
- **License is not optional:** "publicly visible" never means "licensed to train."
- **Hubs are not authorities:** Hugging Face and Kaggle carry no license clearance.
- **Check the release cadence:** ready-made sources update on different schedules and may still lag the live web.
- **No dataset fits?** Scrapfly's Web Scraping API scrapes LLM-ready data at scale.

**Get web scraping tips in your inbox**Trusted by 100K+ developers and 30K+ enterprises. Unsubscribe anytime.







## Which Web Data Source Is Best for AI Training?

For general pretraining, start with Common Crawl or a cleaned derivative like FineWeb. For specific knowledge, pull structured dumps like Wikipedia or Stack Exchange.

For domain-specific, current, or proprietary data that nobody has packaged, build your own by scraping it.

Here are the quick picks by job:

- **Best raw crawl:** Common Crawl, the open petabyte-scale substrate under most corpora.
- **Best cleaned corpus:** FineWeb, a large filtered English set ready to train on.
- **Best multilingual:** OSCAR, covering 166 languages including low-resource ones.
- **Best multimodal:** Re-LAION-5B, for image-text pairs and vision-language models.
- **Best structured dump:** Wikipedia and Wikimedia dumps, for clean encyclopedic text.
- **Best build-your-own:** GPT Crawler for small jobs, a managed scraping API for scale.

The table below compares all 13 sources across the axes that decide a sourcing call. Scale, license, and freshness are the three costs you weigh against how well a source fits your goal.

| Source | Type | Scale (snapshot) | License / terms | Freshness | Best for |
|---|---|---|---|---|---|
| Common Crawl | Raw crawl | 300B+ pages | Common Crawl terms of use | Monthly snapshots | Building your own pretraining corpus |
| FineWeb | Cleaned corpus | 18.5T+ tokens | ODC-By 1.0 | Extended periodically (to June 2025) | Ready-to-train English pretraining |
| C4 | Cleaned corpus | 305 GB (`en` on the Hub) | ODC-By 1.0 | Static (April 2019 crawl) | Reproducible baselines |
| The Pile | Curated multi-domain | 825 GiB | Mixed, per subset | Static (Books3 removed) | Diverse domain coverage |
| OSCAR | Multilingual crawl | 166 languages | Gated, CC0 on metadata | Per Common Crawl dump | Multilingual and low-resource |
| Re-LAION-5B | Multimodal pairs | 5.5B image-text pairs | CC-BY 4.0 metadata, URLs only | Static (re-released 2024) | Multimodal and vision-language |
| Hugging Face Datasets | Hub | 980,000+ datasets | Per dataset | Continuous | Discovery and streaming |
| Kaggle | Hub | Large curated catalog | Per dataset | Continuous | Task-specific datasets |
| Wikipedia / Wikimedia | Structured dump | Full wiki exports | CC BY-SA and GFDL | Monthly dumps | Encyclopedic text |
| Stack Exchange | Structured dump | Full network Q&amp;A | CC BY-SA 4.0 | Periodic dumps | Technical Q&amp;A and reasoning |
| Project Gutenberg | Structured dump | 79,000+ books | Public domain (mostly) | Periodic | Long-form public-domain text |
| GitHub (GH Archive / BigQuery) | Structured / event | Public event timeline and code | Per-repository licenses | Hourly events | Code and developer activity |
| GPT Crawler | Build your own | Site-scoped | ISC (tool) | Real-time, you crawl | Small site-specific builds |

Each numbered entry below expands one row with scale, license, freshness, and an honest verdict.



## How Did We Choose These Web Data Sources?

We picked sources on four bars, and every entry clears all four:

- **Open:** openly available or public, not behind a paywall or sales gate.
- **Usable:** fit for training, fine-tuning, or RAG.
- **Verifiable:** a scale and license you can confirm at the source.
- **Reachable:** a real access path, whether a bulk download, an API, or a scrape.

We organize the list by tier and by job, not by a best-to-worst rank. A raw crawl and a structured dump answer different questions, so comparing them on a single score would mislead you. The tiers group sources by what they give you.

The inclusion rule is narrow on purpose: open corpora, neutral hosting platforms, public structured dumps, and open build-your-own tooling. Commercial data marketplaces and "buy scraped data" vendors are out of scope.

This list covers open and public sources plus the build path. For a sales and market-research angle, the [public data sources for lead generation](https://scrapfly.io/blog/posts/best-public-data-sources-for-lead-generation) index is the sibling roster, and its ten sources do not overlap these thirteen.

With the criteria set, the next question is how to map your training goal onto a tier.



## How to Match a Data Source to Your Training Goal

The right source depends on whether you need broad coverage, specific knowledge, or data that nobody has packaged. Name the goal first, then the tier follows.

Here is the mapping most teams land on:

- **Pretraining or broad coverage:** a raw crawl such as Common Crawl, a cleaned derivative such as FineWeb, C4, RefinedWeb, or OSCAR, or a multi-source corpus such as The Pile.
- **Specific, high-signal knowledge:** structured dumps (Wikipedia, Stack Exchange, Project Gutenberg, GitHub).
- **Domain-specific, current, or proprietary format:** build your own by scraping, with GPT Crawler for small jobs and a managed scraping API for scale.

A short decision flow makes the branch explicit before you commit storage and compute:

python```python
def pick_source(goal, needs_current, is_packaged):
    if needs_current or not is_packaged:
        return "build your own: scrape the source directly"
    if goal == "pretraining":
        return "Common Crawl (raw) or FineWeb / C4 (cleaned)"
    if goal == "specific_knowledge":
        return "structured dump: Wikipedia, Stack Exchange, Gutenberg, GitHub"
    return "search Hugging Face or Kaggle for a ready-made match"
```



The function collapses the whole list into one branch: your training goal and whether the data is already packaged decide the tier, and anything current or unpackaged sends you to scraping.

Every choice trades against three costs: quality and cleaning effort, license and terms, and freshness. Raw crawls are cheap to get and expensive to clean. Cleaned corpora invert that. Structured dumps are high-signal but narrow.

Anything you scrape yourself is current but yours to maintain. How that data feeds pretraining, fine-tuning, or a RAG pipeline is a separate build that the linked guides cover.

[How to Power-Up LLMs with Web Scraping and RAGIn depth look at how to use LLM and web scraping for RAG applications using either LlamaIndex or LangChain.](https://scrapfly.io/blog/posts/how-to-use-web-scaping-for-rag-applications)

The tiers start with the largest and rawest option: web-scale crawls.



## 1. Common Crawl: Best for Raw, Petabyte-Scale Pretraining Data

Common Crawl is the open, petabyte-scale raw web crawl that underlies most LLM pretraining corpora. If a dataset on this list says "derived from Common Crawl," this is what it started from.

Run by a 501(c)(3) nonprofit founded in 2007, it maintains a free, open repository of web crawl data. The archive spans over 300 billion pages and petabytes of data, with 3 to 5 billion new pages added each month.

Data ships as WARC (full responses), WAT (metadata), and WET (extracted text) files on AWS S3.

Its strength is scale and open access: no gate, no licence negotiation, and no dataset owner to ask. Its cost is noise: the raw crawl needs heavy filtering, deduplication, and boilerplate removal before training, and monthly snapshots are not real-time.

That cleaning effort is why [data quality](https://scrapfly.io/blog/posts/how-to-ensure-web-scrapped-data-quality) work dominates any pipeline built directly on it. It is best for teams building or filtering their own pretraining corpus from raw web data.

Reading extracted text is straightforward with the `warcio` library, which streams WET records without downloading whole files first:

python```python
import gzip, requests
from warcio.archiveiterator import ArchiveIterator

base = "https://data.commoncrawl.org"
paths = gzip.decompress(requests.get(f"{base}/crawl-data/CC-MAIN-2025-33/wet.paths.gz").content)
first_wet = paths.decode().splitlines()[0]

resp = requests.get(f"{base}/{first_wet}", stream=True)
conversions = 0
for record in ArchiveIterator(resp.raw):
    if record.rec_type == "conversion":  # WET holds plain-text conversions
        conversions += 1
        if conversions == 2:
            url = record.rec_headers.get_header("WARC-Target-URI")
            text = record.content_stream().read().decode("utf-8", "ignore")
            print(url, "->", " ".join(text.split())[:80])
            break
```



Each WET record pairs a source URL with its extracted plain text, which is the raw material a filtering pipeline consumes:

text```text
http://01dom.ru/sale/prodlenie_aktsii_na_keramicheskie_bloki_porotherm/ -> Скидка до 23% на керамические блоки Porotherm Внимание! На сайте ведется переоце
```



The output shows why cleaning matters: the first records in this file are Chinese and Russian pages whose extracted text opens with navigation, not content, and the language tag is per-record metadata you have to filter on yourself. Cleaned corpora exist to spare you that step, starting with FineWeb.



## 2. FineWeb: Best for a Cleaned, Ready-to-Train English Web Corpus

FineWeb is a large, cleaned and deduplicated English web corpus derived from Common Crawl that is ready to train on with minimal extra processing. It removes the heaviest part of the raw-crawl workflow.

Hosted on Hugging Face as `HuggingFaceFW/fineweb`, it holds more than 18.5T tokens (originally released at 15T). The `datatrove` pipeline has processed 110 Common Crawl dumps, from summer 2013 through June 2025, with the six 2025 snapshots added in July 2025.

It began as an open replication of RefinedWeb, the Falcon team's predecessor corpus, then added filtering steps that pushed reported downstream performance above it.

RefinedWeb remains available as a public extract but is largely superseded by FineWeb for open use.

The win is a strong English corpus without building your own filtering pipeline, released under the permissive ODC-By 1.0 license.

The limits are real: it is English-focused, still web-sourced so quality varies by slice, and its storage footprint is large.

It is best for teams that want a proven pretraining corpus off the shelf.

For a widely-cited baseline instead of the newest corpus, C4 is the reference point.



## 3. C4 (Colossal Clean Crawled Corpus): Best for a Proven, Widely-Cited Baseline

C4 is the cleaned Common Crawl corpus introduced with Google's T5 model, a proven and heavily-cited baseline for English pretraining. When a paper needs a known-quantity corpus for comparison, it usually reaches for C4.

Distributed as `allenai/c4` on Hugging Face, it is a cleaned English subset built from the April 2019 Common Crawl snapshot. The T5 paper describes the corpus at roughly 750 GB; the Hub lists the `en` config at 305 GB as distributed.

Its value is reproducibility and citation weight, since a well-understood corpus makes experiments comparable across teams.

The trade-offs are age and documented bias. Its cleaning heuristics predate FineWeb's, its filtering choices have known effects on content coverage, and it is English-focused on a single 2019 snapshot.

It is best for reproducible experiments and baselines where a well-studied corpus matters more than freshness.

For breadth beyond web crawl alone, The Pile mixes in curated non-web sources.



## 4. The Pile: Best for Diverse, Multi-Domain Text

The Pile is an 825 GiB diverse, multi-domain English text dataset built from many curated sources, not web crawl alone. EleutherAI assembled it from 22 subsets spanning academic papers, code, books, and dialogue.

Marketed as "800GB" and described in its arXiv paper (2101.00027, 2021), it ships as zstandard-compressed jsonlines through community mirrors. Its strength is domain diversity in a single package, which made it a staple of open LLM research.

There is a licensing caveat you must respect. Copyright concerns removed some components, most notably the Books3 subset taken down after DMCA action in 2023. The full original is no longer cleanly distributed.

Verify which components are currently available before use, since mirror availability varies. It is best for research needing broad domain coverage from one curated corpus.

For coverage beyond English, OSCAR is the multilingual option.



## 5. OSCAR: Best for Multilingual and Low-Resource Languages

OSCAR is a large multilingual corpus filtered from Common Crawl, strongest when you need non-English or low-resource-language data. Where FineWeb and C4 stop at English, OSCAR spreads across the language spectrum.

The Open Super-large Crawled Aggregated coRpus reached version 23.01, built from the late-2022 Common Crawl dump. It covers 166 languages in both original and deduplicated form.

It applies dedicated quality steps including adult-content detection and near-deduplication, and is distributed per language.

Access is gated, so you agree to terms and request access on Hugging Face. Only the metadata carries a CC0 license, while the rest is crawl-derived. Quality also varies by language.

It is best for multilingual and low-resource-language pretraining and fine-tuning.

For a different modality entirely, LAION supplies image-text pairs.



## 6. LAION and Re-LAION-5B: Best for Multimodal Image-Text Pairs

LAION provides open image-text pair datasets for training multimodal and vision-language models. It is the open standard for text-to-image training data at scale.

The nonprofit Large-scale Artificial Intelligence Open Network released LAION-400M (400 million English pairs) and LAION-5B (5.85 billion multilingual CLIP-filtered pairs).

Re-LAION-5B followed on August 30, 2024, a cleaned re-release of about 5.5 billion pairs. A safety review removed links flagged by child-protection partners.

The licensing and safety caveat is central. LAION distributes URLs plus metadata under a CC-BY 4.0 license, not the images themselves. So you fetch images yourself and expect link rot over time.

The original 5B set was withdrawn, so use the current Re-LAION-5B re-release and check its terms. It is best for multimodal and vision-language model training.

Tier 2 shifts from specific corpora to the hubs that host and stream them.



## 7. Hugging Face Datasets: Best for Discovering and Streaming Ready-Made Datasets

Hugging Face Datasets is the central hub for discovering, streaming, and loading over 980,000 ready-made datasets, including most corpora on this list. FineWeb, C4, and OSCAR all live here.

It pairs a discovery platform with the `datasets` library for streaming and versioning. So you load a corpus straight into a training pipeline with one API. The tooling and community depth are its main advantages.

The caution is simple: it is a hub, not a source of truth on license. Each dataset carries its own terms, and quality and legality vary per dataset. Never treat "it is on the Hub" as license clearance.

It is best for discovery, streaming, and loading existing datasets, not as an authority on what you can train on.

Alongside it, Kaggle leans toward smaller, task-specific sets.



Scrapfly

#### Extract structured data automatically?

Scrapfly's Extraction API uses AI to turn any webpage into structured data — no selectors needed.

[Try Free →](https://scrapfly.io/register)## 8. Kaggle Datasets: Best for Curated, Competition-Grade Datasets

Kaggle hosts a large catalog of curated, often competition-grade datasets useful for fine-tuning and task-specific training. It is a neutral data-science platform with a searchable catalog and runnable notebooks.

Its strength is curation: datasets tend to be well-documented and task-specific, with notebooks showing real usage. That makes it strong for prototyping and for finding a clean set to fine-tune on.

The limits are scope and licensing. Kaggle skews toward smaller task datasets rather than web-scale pretraining corpora, per-dataset licenses vary, and you need an account.

It is best for fine-tuning, task-specific datasets, and prototyping, and it sits beside Hugging Face as a second discovery layer.

Tier 3 moves to structured reference dumps, starting with the cleanest text on the web.



## 9. Wikipedia and Wikimedia Dumps: Best for High-Quality Encyclopedic Text

Wikimedia dumps provide clean, openly-licensed, high-signal encyclopedic text in every major language.

The dumps are full-database exports of all public Wikimedia wikis. The classic XML database backup dumps are now deprecated in favor of MediaWiki Content File Exports, and legacy publication has dropped to once a month.

Downloads are rate-limited and enforce a user-agent policy.

The content is high-quality, well-structured, and openly licensed under CC BY-SA and GFDL. The limits are register and cadence: it is encyclopedic in tone, large in size, and refreshed on a dump schedule rather than in real time.

Respect the rate limits and user-agent policy when downloading. It is best for high-quality general-knowledge and multilingual text.

For technical reasoning instead of general knowledge, Stack Exchange is the dump to pull.



## 10. Stack Exchange Data Dump: Best for Technical Q&amp;A and Reasoning Data

The Stack Exchange Data Dump is an openly-licensed archive of technical questions and answers, valuable for reasoning and instruction data. It captures the full public content of Stack Overflow and the wider Stack Exchange network.

Distributed through the Internet Archive as 7-zipped XML per site, it carries Posts, Users, Comments, Votes, and more.

Its value is high-quality technical Q&amp;A, code paired with explanation, and step-by-step reasoning, which makes it strong for instruction tuning.

User content is licensed CC BY-SA (4.0 for current content), so attribution and share-alike obligations apply to anything you derive. The dump cadence and distribution have shifted over time, so verify the latest release first.

Expect a heavy tilt toward technical domains. It is best for technical instruction, coding assistants, and reasoning fine-tunes.

For long-form prose with the cleanest licensing of all, Project Gutenberg is next.



## 11. Project Gutenberg: Best for Public-Domain Long-Form Text

Project Gutenberg offers tens of thousands of public-domain books, ideal for clean, long-form, license-safe text. It is one of the oldest open text sources on the web.

The library holds more than 79,000 free eBooks, overwhelmingly public-domain works. Its strength is clean, long-form prose with minimal licensing risk, and it feeds open corpora like The Pile.

The limits are coverage and jurisdiction. The catalog skews to older works with dated language. US public-domain rules do not apply everywhere, so verify status where you are.

The project discourages scraping the site directly, so use the official bulk-download mirrors instead. It is best for long-form narrative and literary text with low licensing risk.

For code and developer behavior rather than prose, public GitHub data is the source.



## 12. GitHub Public Data (GH Archive and BigQuery): Best for Code and Developer-Activity Data

Public GitHub data, through GH Archive and BigQuery public datasets, is the go-to source for code and developer-activity training data. It covers both what developers build and how they work.

GH Archive records the public GitHub event timeline (commits, issues, pull requests, and more) and makes it queryable, including through BigQuery. BigQuery public datasets also expose large collections of public source code.

The volume is the draw, feeding code models and developer-tool training.

Per-repository licenses vary and matter: public visibility is not a license to train, so filter by license before you use anything. BigQuery query costs can add up, and event data is metadata rather than file contents.

It is best for code models, developer-tool training, and behavior or temporal analysis.

Tier 4 is the last mile, when no ready-made source fits and you build the dataset yourself.



## 13. GPT Crawler: Best for Small, Site-Specific Dataset Builds

GPT Crawler is an open-source tool that turns a specific website into a knowledge file. It is the simplest on-ramp to building your own small training or RAG dataset, and the fastest path from a URL to usable JSON.

The `BuilderIO/gpt-crawler` project (ISC license, about 22,400 GitHub stars) crawls a site from a start URL. It outputs structured knowledge files for custom GPTs and RAG.

Its most recent release was v1.5.1 in January 2025, so confirm dependencies before production use. Configuration is a single file:

typescript```typescript
export const defaultConfig: Config = {
  url: "https://www.builder.io/c/docs/developers",
  match: "https://www.builder.io/c/docs/**",
  selector: ".docs-builder-container",
  maxPagesToCrawl: 50,
  outputFileName: "output.json",
};
```



The config sets a start URL, a match pattern, a CSS selector for the content to keep, a page cap, and an output filename. Running it produces one JSON knowledge file per crawl, ready to drop into a custom GPT.

Its strength is dead-simple config for a single site or docs set. The limits are scope. It targets small, cooperative sites with no built-in anti-bot handling, proxy rotation, or large-scale orchestration. Its maintenance has also slowed.

For the full setup, the [GPT Crawler guide](https://scrapfly.io/blog/posts/gpt-crawler-a-complete-guide-to-automated-web-data-collection-for-ai-training) walks through it end to end. It is best for one-off, site-specific dataset or RAG builds on cooperative sites.

When those cooperative-site assumptions break, scraping has to scale, which is the build-your-own path at production size.



## Build Your Own Dataset at Scale: When Ready-Made Corpora Are Not Enough

Sometimes the data you need is domain-specific, current, or in a format nobody has packaged. Then you build the dataset yourself by scraping the source directly. Ready-made sources update on different cadences, but none guarantees that a pricing page, listing, or change from this week is included.

GPT Crawler stops at small, cooperative sites. At scale you hit anti-bot systems, JavaScript rendering, rate limits, and format normalization. That is where a managed layer takes over.

This job overlaps with [AI web scraping tools](https://scrapfly.io/blog/posts/best-tools-for-ai-webscraping) and purpose-built crawlers like [Crawl4AI](https://scrapfly.io/blog/posts/crawl4AI-explained).

The production path is language-agnostic. Scrapfly's Web Scraping API fetches, renders JavaScript, rotates proxies, and bypasses anti-bot, returning HTML, JSON, clean text, or LLM-ready Markdown. The Extraction API turns raw pages into structured records.

The Crawler API orchestrates recursive site crawls at scale, with robots.txt respected by default. The [difference between a scraper API and a crawler API](https://scrapfly.io/blog/posts/scraper-api-vs-crawler-api) decides which one fits a given job.

A single call returns one page as LLM-ready Markdown, which is the format most training and RAG pipelines want:

bash```bash
pip install scrapfly-sdk
```



That installs the Python SDK, and the scrape below requests one page in Markdown:

python```python
from scrapfly import ScrapflyClient, ScrapeConfig

client = ScrapflyClient(key="YOUR_SCRAPFLY_KEY")
result = client.scrape(ScrapeConfig(
    url="https://web-scraping.dev/product/1",
    format="markdown:only_content",  # prioritize the main page content
    asp=True,                        # anti-bot bypass, escalates to a browser when needed
))
print(result.scrape_result["content"][:200])
```



`only_content` prioritizes the main page content, but extraction is heuristic. Inspect the returned Markdown for retained navigation before chunking or storing it:

text```text
web-scraping.dev product Box of Chocolate Candy

[web-scraping.dev](https://web-scraping.dev/)
* [Products](https://web-scraping.dev/products)
* [Reviews](https://web-scraping.dev/reviews)
```



That single call replaces the fetch, render, proxy, and format-normalization stack you would otherwise maintain per site.



ScrapFly's [Web Scraping API](https://scrapfly.io/products/web-scraping-api) is a single HTTP endpoint for collecting web data at scale, with a **99.99% success rate** across residential and datacenter pools in **190+ countries**.

- [Anti-Scraping Protection bypass](https://scrapfly.io/docs/scrape-api/anti-scraping-protection) - automatically defeats Cloudflare, DataDome, PerimeterX, Akamai, and 20+ other bot systems.
- [Smart proxy rotation](https://scrapfly.io/docs/scrape-api/proxy) - residential and datacenter pools with country and ASN level geo-targeting.
- [JavaScript rendering](https://scrapfly.io/docs/scrape-api/javascript-rendering) - render SPAs and dynamic pages through real cloud browsers.
- [Browser automation scenarios](https://scrapfly.io/docs/scrape-api/javascript-scenario) - scroll, click, fill forms, and wait for elements without managing a browser fleet.
- [Format conversion](https://scrapfly.io/docs/scrape-api/getting-started#api_param_format) - return pages as HTML, JSON, clean text, or LLM ready Markdown.
- [Session management](https://scrapfly.io/docs/scrape-api/session) - keep cookies, headers, and IPs consistent across multi step flows.
- [Smart caching](https://scrapfly.io/docs/scrape-api/getting-started#api_param_cache) - cache successful responses to cut cost on repeat scraping jobs.
- [Python](https://scrapfly.io/docs/sdk/python), [TypeScript](https://scrapfly.io/docs/sdk/typescript), [Scrapy](https://scrapfly.io/docs/sdk/scrapy), and [no-code integrations](https://scrapfly.io/docs/integration/getting-started) including [Make](https://scrapfly.io/integration/make), [n8n](https://scrapfly.io/integration/n8n), [Zapier](https://scrapfly.io/integration/zapier), [LangChain](https://scrapfly.io/integration/langchain), and [LlamaIndex](https://scrapfly.io/integration/llamaindex).



### Power your scraping with Scrapfly

Forget about getting blocked. Scrapfly handles anti-bot bypasses, browser rendering, and proxy rotation so you can focus on the data.



[Try for FREE!](https://scrapfly.io/register)



## FAQ

Is it legal to use web data to train an AI model?It depends on the source's license, its terms, and your jurisdiction, and "publicly visible" is not the same as "licensed to train." Open corpora and public-domain sources carry the clearest terms, so check each source's license before you use it.







What is the best free dataset for training an LLM?For broad English pretraining, FineWeb or C4, both derived from Common Crawl, are the usual starting points. For raw scale that you filter yourself, Common Crawl itself is the source.







Common Crawl vs a cleaned corpus like FineWeb, which should I use?Use Common Crawl if you want to build and control your own filtering pipeline. Use FineWeb or C4 if you want a cleaned corpus that is ready to train on with minimal extra work.







How do I get training data that does not exist in any public dataset?Scrape it yourself: GPT Crawler for small site-specific builds, and a managed scraping API for scale, anti-bot handling, and structured output. No public corpus will contain it, so the fetch is yours to run.









## Summary

Sourcing training data starts with naming the tier you need. Raw crawls and cleaned corpora like Common Crawl, FineWeb, and C4 cover broad pretraining.

Structured dumps like Wikipedia, Stack Exchange, and Project Gutenberg give you specific, high-signal knowledge with clear licenses.

Reach for ready-made first, since it is the right start for general pretraining. When nothing packaged fits your case, build it yourself by scraping the source directly.

For those build-your-own jobs at scale, Scrapfly's Web Scraping, Extraction, and Crawler APIs return LLM-ready structured data with anti-bot handling. Python, TypeScript, Go, and Rust SDKs mean the last mile fits whatever stack you already run.



Legal Disclaimer and PrecautionsThis tutorial covers popular web scraping techniques for education. Interacting with public servers requires diligence and respect:

- Do not scrape at rates that could damage the website.
- Do not scrape data that's not available publicly.
- Do not store PII of EU citizens protected by GDPR.
- Do not repurpose *entire* public datasets which can be illegal in some countries.

Scrapfly does not offer legal advice but these are good general rules to follow. For more you should consult a lawyer.

 

   [  Add as a preferred source ](https://google.com/preferences/source?q=scrapfly.io) Table of Contents















 

  Table of Contents- [Key Takeaways](#key-takeaways)
- [Which Web Data Source Is Best for AI Training?](#which-web-data-source-is-best-for-ai-training)
- [How Did We Choose These Web Data Sources?](#how-did-we-choose-these-web-data-sources)
- [How to Match a Data Source to Your Training Goal](#how-to-match-a-data-source-to-your-training-goal)
- [1. Common Crawl: Best for Raw, Petabyte-Scale Pretraining Data](#1-common-crawl-best-for-raw-petabyte-scale-pretraining-data)
- [2. FineWeb: Best for a Cleaned, Ready-to-Train English Web Corpus](#2-fineweb-best-for-a-cleaned-ready-to-train-english-web-corpus)
- [3. C4 (Colossal Clean Crawled Corpus): Best for a Proven, Widely-Cited Baseline](#3-c4-colossal-clean-crawled-corpus-best-for-a-proven-widely-cited-baseline)
- [4. The Pile: Best for Diverse, Multi-Domain Text](#4-the-pile-best-for-diverse-multi-domain-text)
- [5. OSCAR: Best for Multilingual and Low-Resource Languages](#5-oscar-best-for-multilingual-and-low-resource-languages)
- [6. LAION and Re-LAION-5B: Best for Multimodal Image-Text Pairs](#6-laion-and-re-laion-5b-best-for-multimodal-image-text-pairs)
- [7. Hugging Face Datasets: Best for Discovering and Streaming Ready-Made Datasets](#7-hugging-face-datasets-best-for-discovering-and-streaming-ready-made-datasets)
- [8. Kaggle Datasets: Best for Curated, Competition-Grade Datasets](#8-kaggle-datasets-best-for-curated-competition-grade-datasets)
- [9. Wikipedia and Wikimedia Dumps: Best for High-Quality Encyclopedic Text](#9-wikipedia-and-wikimedia-dumps-best-for-high-quality-encyclopedic-text)
- [10. Stack Exchange Data Dump: Best for Technical Q&amp;amp;A and Reasoning Data](#10-stack-exchange-data-dump-best-for-technical-q-amp-a-and-reasoning-data)
- [11. Project Gutenberg: Best for Public-Domain Long-Form Text](#11-project-gutenberg-best-for-public-domain-long-form-text)
- [12. GitHub Public Data (GH Archive and BigQuery): Best for Code and Developer-Activity Data](#12-github-public-data-gh-archive-and-bigquery-best-for-code-and-developer-activity-data)
- [13. GPT Crawler: Best for Small, Site-Specific Dataset Builds](#13-gpt-crawler-best-for-small-site-specific-dataset-builds)
- [Build Your Own Dataset at Scale: When Ready-Made Corpora Are Not Enough](#build-your-own-dataset-at-scale-when-ready-made-corpora-are-not-enough)
- [FAQ](#faq)
- [Summary](#summary)
 
    Join the Newsletter  Get monthly web scraping insights 

 

  



Scale Your Web Scraping

Anti-bot bypass, browser rendering, and rotating proxies, all in one API. Start with 1,000 free credits.

  No credit card required  1,000 free API credits  Anti-bot bypass included 

 [Start Free](https://scrapfly.io/register) [View Docs](https://scrapfly.io/docs/onboarding) 

 Not ready? Get our newsletter instead. 

 

 ## Related Articles

 [     

 api data-parsing 

### 10 Best Public Data Sources for Lead Generation in 2026

A ranked directory of 10 public data sources for B2B lead generation, with the fields, access method, and freshness of e...

 

 ](https://scrapfly.io/blog/posts/best-public-data-sources-for-lead-generation) [  

 ai 

### Guide to LLM Training, Fine-Tuning, and RAG

Explore LLM training, fine-tuning, and RAG. Learn how to leverage pre-trained models for custom tasks and real-time know...

 

 ](https://scrapfly.io/blog/posts/guide-to-llm-training-fine-tuning-and-rag) [  

 curl 

### How to Use cURL GET Requests

Here's everything you need to know about cURL GET requests and some common pitfalls you should avoid.

 

 ](https://scrapfly.io/blog/posts/how-to-use-curl-get-requests) 

  



   



 Extract structured data with AI, **1,000 free credits** [Start Free](https://scrapfly.io/register)