Skip to main content

Meshagent Common Crawl

Import Common Crawl captures into a Meshagent room dataset.

from meshagent.commoncrawl import import_domain_from_commoncrawl

result = await import_domain_from_commoncrawl(
    room,
    index="CC-MAIN-2025-08",
    domain="example.com",
    table="pages",
    url_filter=r"https?://(www\.)?example\.com/docs/.*",
)

To test it through meshagent room connect:

meshagent room connect --room=my-room --identity=commoncrawl -- \
  python meshagent-sdk/meshagent-commoncrawl/examples/crawl.py \
  http://www.meshagent.com --table=sample --namespace=crawls --limit=10

The example defaults to --scope=host, so https://www.example.com imports only captures from www.example.com. Use --scope=domain when you explicitly want sibling subdomains too, for example when a large site stores useful content outside www.

The sample command writes progress to stderr while it imports. TTY output uses a single updating line; redirected output uses plain log lines. Pass --silent to suppress progress output. Columnar scans emit periodic heartbeat updates while waiting for DataFusion batches. WARC reads run concurrently by default and report queued records, downloaded bytes, and request counts; use --scan-partitions to tune DataFusion scan parallelism and --concurrency, --warc-retries, and --warc-retry-delay to tune object reads.

The importer uses Common Crawl's columnar index by default through DataFusion. Basic imports generate a SQL query that selects one latest HTML capture per URL from the requested host or domain, excluding robots.txt. Advanced callers can pass columnar_sql= to control the URL selection directly; the query must return url plus WARC pointer columns (filename/offset/length or the Common Crawl names warc_filename/warc_record_offset/warc_record_length). The example CLI exposes this as --sql.

Common Crawl's CDX API is rate limited and not a good fit for broad filtering. The SDK still contains the polite CDX reader for compatibility, using https://index.commoncrawl.org, a Meshagent User-Agent, serialized/paced requests, and clearer HTTP 503 guidance.

By default, records are merged on url with the columns url, date, content_type, and text. Pass an async extract= callback to derive custom columns from the WARC record and decoded content bytes. Return None from the callback to skip the record. Pass an async progress= callback to observe import progress from library code.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

meshagent_commoncrawl-0.49.1.tar.gz (22.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

meshagent_commoncrawl-0.49.1-py3-none-any.whl (17.0 kB view details)

Uploaded Python 3

File details

Details for the file meshagent_commoncrawl-0.49.1.tar.gz.

File metadata

  • Download URL: meshagent_commoncrawl-0.49.1.tar.gz
  • Upload date:
  • Size: 22.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for meshagent_commoncrawl-0.49.1.tar.gz
Algorithm Hash digest
SHA256 47e85d8fd0d9bf1763724d1d7545161158921eca2f1c1d3b733103a02b61dc64
MD5 a7c59704a5ada16215a7a9c8079a4e2f
BLAKE2b-256 d0e10b5294b6eb651f3858ad4a292160e33b8b1a84f72496ef8376acd38bba21

See more details on using hashes here.

File details

Details for the file meshagent_commoncrawl-0.49.1-py3-none-any.whl.

File metadata

File hashes

Hashes for meshagent_commoncrawl-0.49.1-py3-none-any.whl
Algorithm Hash digest
SHA256 fa2e8dc6bd7539cca0163ceb8521e76fb9b02b21e7eecf49574679dfbc00f08d
MD5 487b614076ce3be017109436530bbfb0
BLAKE2b-256 d512b73340ed98cae0c872094d8ce96e30fce016c7f457fac648362c2af8e98a

See more details on using hashes here.

Release history Release notifications | RSS feed

0.52.1

2 files

0.52.0

2 files

0.51.6

2 files

0.51.5

2 files

0.51.4

2 files

0.51.3

2 files

0.51.2

2 files

0.51.1

2 files

0.51.0

2 files

0.50.1

2 files

0.50.0

2 files

This release

0.49.1 This release

2 files

0.49.0

2 files

0.48.0

2 files

0.47.1

2 files

0.47.0

2 files

0.46.4

2 files

0.46.3

2 files

0.46.2

2 files

0.46.1

2 files

0.46.0

2 files

0.45.7

2 files

0.45.6

2 files

0.45.5

2 files

0.45.4

2 files

0.45.2

2 files

0.45.1

2 files

0.45.0

2 files

0.44.13

2 files

0.44.12

2 files

0.44.11

2 files

0.44.10

2 files

0.44.9

2 files

0.44.8

2 files

0.44.7

2 files

0.44.6

2 files

0.44.5

2 files

0.44.4

2 files

0.44.3

2 files

0.44.2

2 files

0.44.1

2 files

0.44.0

2 files

0.43.3

2 files

0.43.2

2 files

0.43.1

2 files

0.43.0

2 files

0.42.2

2 files

0.42.0

2 files

0.41.9

2 files

0.41.7

2 files

0.41.6

2 files

0.41.5

2 files

0.41.4

2 files

0.41.2

2 files

0.41.1

2 files

0.41.0

2 files

0.40.2

2 files

0.40.1

2 files

0.40.0

2 files

0.39.9

2 files

0.39.8

2 files

0.39.7

2 files

0.39.6

2 files

0.39.5

2 files

0.39.4

2 files

0.39.3

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page