--- library_name: datasets tags: - malicious-url-detection - url-pretraining - common-crawl - security - unsupervised - pretraining - urls - domain-adaptation license: apache-2.0 dataset_info: features: - name: url dtype: string - name: year dtype: int64 splits: - name: train num_examples: 68858131 --- # URL Pre-training Corpus This is a large-scale unlabeled corpus of **~68 million** public URLs sampled from Common Crawl monthly snapshots (2020–2025). It was created for, and used in, the paper **"From Lab to Production: Malicious URL Detection on Real-World Data"** (anonymous submission) to pre-train transformer-based models on URL-specific structural and language patterns. The corpus provides temporal and structural diversity, covering a wide range of domains, path/query structures, and IP-based URLs. ## Intended Use - **Primary use**: Masked Language Modeling (MLM) or other self-supervised pre-training objectives for URL-focused models. - Ideal for initializing models that will be fine-tuned on downstream URL classification tasks (e.g., malicious URL detection). - Enables domain-specific tokenization and representation learning for structural/semantic URL patterns. ## Dataset Details - **Total samples**: ~68 million URLs - **Columns**: - `url`: Raw URL string (string) - `year`: Year of the Common Crawl snapshot the URL was sampled from (integer, 2020–2025) - **Filtering**: - Only URLs with successful HTTP 200 responses. - Deduplicated. - Limited to ≤150 URLs per site-identifier (second-level domain or IP) to reduce bias toward popular sites. - **Sources**: Randomly sampled shards from Common Crawl monthly crawls (2020–2025). ## How to Load ```python from datasets import load_dataset # Standard loading (downloads indexed data) dataset = load_dataset("JPxxx/url-pretraining-dataset") # For memory-efficient iteration over the full dataset dataset = load_dataset("JPcooldev/url-pretraining-dataset", streaming=True) for example in dataset["train"].take(5): print(example) ``` The dataset is provided as a single large split (`train`) due to its unsupervised nature. Use `streaming=True` to avoid downloading the entire dataset at once. ## Statistics - Temporal diversity: URLs from 2020 to 2025. - Structural diversity: Includes short landing-page URLs, deep paths, complex queries, and IP-based addresses. ## Limitations - Derived from public Common Crawl data (public domain) — may contain outdated links (filtered to HTTP 200 at crawl time). - No labels — purely for pre-training. ## Citation If you use this dataset, please cite: ```bibtex @article{lab2prod2026, title={From Lab to Production: Malicious URL Detection on Real-World Data}, author={Anonymous}, year={2026}, note = {Submitted for publication} } ```