hfpclawer[arxiv] provides two offline arXiv metadata search methods:
- OAI-PMH (recommended): No API key, daily incremental sync, faster initial setup
- Kaggle JSONL (fallback): Single ~5.3GB dump, ~11GB local SQLite FTS5 index
⚠️ PyPI limitation:pip install hfpclawer[arxiv]only registers the namespace — it will NOT auto-installarxiv-metadata-service(PyPI doesn't supportgit+httpsdependencies). Follow the manual setup steps below.
git clone https://github.com/diamond2nv/arxiv-metadata-service.git
cd arxiv-metadata-service
pip install -e .
python arxiv_meta_cli.py --help| Source | Size | Format | Notes |
|---|---|---|---|
| Kaggle JSONL | ~5.3 GB | Single .jsonl file |
Full dump, weekly updated |
| OAI-PMH SQLite + FTS5 | ~11 GB | SQLite DB with FTS5 | Daily incremental sync, faster search, no API key needed |
Choose Kaggle if you want the quickest one-shot download. Choose OAI-PMH if you want incremental updates and faster full-text search.
pip install kaggle- Sign in to kaggle.com
- Go to Account → API → Create New API Token
- Download
kaggle.json
# Linux / macOS
mkdir -p ~/.kaggle
mv ~/Downloads/kaggle.json ~/.kaggle/
chmod 600 ~/.kaggle/kaggle.json
# Windows (PowerShell)
# mkdir $env:USERPROFILE\.kaggle
# Move kaggle.json to that directory# ~5.3 GB download
kaggle datasets download Cornell-University/arxiv
unzip arxiv.zip -d data/
# Result: data/arxiv_metadata.jsonl (~5.3 GB, ~3.0M papers)# Import Kaggle JSONL → hfpapers SQLite storage
python scripts/import_arxiv_metadata.py --jsonl data/arxiv_metadata.jsonlhfpclawer store stats
# Expected: ~3.0M papers importedIf you prefer not to use Kaggle:
pip install hfpclawer[arxiv] # installs arxiv-metadata-service
hfpclawer arxiv download --tier 1 # Starts OAI-PMH download (Tier 1: ~5M papers)The OAI-PMH method downloads metadata from the arXiv OAI endpoint (free, no API key) and builds a local FTS5 index (~11 GB). It supports incremental sync (--incremental 7) and resume.
| Problem | Solution |
|---|---|
kaggle: command not found |
Run pip install kaggle and ensure ~/.local/bin is in PATH |
403 Forbidden on Kaggle download |
Check that ~/.kaggle/kaggle.json exists with chmod 600 |
| Not enough disk space | Kaggle JSONL: 5.3 GB download + 5.3 GB unzipped. OAI-PMH: ~11 GB final DB. Ensure at least 20 GB free |
| Slow OAI-PMH download | Expected — arXiv enforces 1 query/4s. Tier 1 (~5M papers) takes 12-24 hours. Use resume_download() |