{"slug":"alterlab-biorxiv","title":"alterlab-biorxiv","summary":"Search the bioRxiv preprint server and retrieve paper metadata or download PDFs via its API. Use when finding life sciences preprints by keywords, authors, DOI, date ranges, or categories, or when conducting a biology literature review of not-yet-peer-reviewed work. Part of the A","platform":"Claude","tags":[],"authorName":"LLM Mart","authorSlug":"llm-mart","score":0,"source":"github","price":null,"verified":false,"createdAt":"2026-09-23T18:57:08.089016Z","repo":{"url":"https://github.com/AlterLab-IEU/AlterLab-Academic-Skills","stars":68,"forks":13,"license":"MIT","updatedAt":"2026-09-23T13:42:59Z"},"bodyHtml":"<hr>\n<h2>name: alterlab-biorxiv\ndescription: Search the bioRxiv preprint server and retrieve paper metadata or download PDFs via its API. Use when finding life sciences preprints by keywords, authors, DOI, date ranges, or categories, or when conducting a biology literature review of not-yet-peer-reviewed work. Part of the AlterLab Academic Skills suite.\nlicense: MIT\nallowed-tools: Read WebFetch Bash(curl:<em>) Bash(python:</em>)\ncompatibility: Keyless bioRxiv API (no authentication required)\nmetadata:\nskill-author: AlterLab\nversion: \"1.1.0\"\nlast_updated: \"2026-09-23\"</h2>\n<h1>bioRxiv Database</h1>\n<h2>Overview</h2>\n<p>Python tooling over the keyless bioRxiv API for searching and retrieving <strong>life-sciences preprints</strong>. Searches by keyword, author, date range, and category, returning structured JSON (titles, abstracts, DOIs, authors, versions), and downloads full-text PDFs.</p>\n<p>For <strong>published, peer-reviewed</strong> literature use <code>alterlab-pubmed</code>; for <strong>computer-science / physics / math</strong> preprints use <code>alterlab-arxiv</code>. bioRxiv covers biology subjects only. The same API also serves <strong>medRxiv</strong> (swap <code>biorxiv</code> for <code>medrxiv</code> in the endpoint path, e.g. <code>/details/medrxiv/2025-03-21/2025-03-28?category=cardiovascular%20medicine</code>); the bundled script targets bioRxiv, so query medRxiv with <code>curl</code>/<code>requests</code> directly.</p>\n<h3>How it works (and its limits)</h3>\n<p>The bioRxiv <code>/details</code> endpoint returns preprints by date range, 30 records per page. It accepts a server-side <strong>subject-category</strong> filter (<code>?category=cell_biology</code>), but has <strong>no keyword or author filter</strong>. So this tool:</p>\n<ol>\n<li>Paginates the date range (following the cursor until all records are retrieved), passing <code>--category</code> to the server so only that subject is fetched, then</li>\n<li>Filters <strong>client-side</strong> by keyword (substring over title/abstract) and author (substring over the author list).</li>\n</ol>\n<p>Implication: a wide date range means many API calls and a large download. Keep ranges as tight as the question allows, and use <code>--category</code> (cuts API calls) and <code>--limit</code> to bound the work.</p>\n<h2>When to Use This Skill</h2>\n<p>Use this skill when:</p>\n<ul>\n<li>Searching for recent life-sciences preprints in specific research areas</li>\n<li>Tracking preprints by particular authors</li>\n<li>Conducting systematic preprint literature reviews</li>\n<li>Analyzing preprint trends over time periods</li>\n<li>Retrieving metadata for citation management</li>\n<li>Downloading preprint PDFs for analysis</li>\n<li>Filtering papers by bioRxiv subject categories</li>\n</ul>\n<h3>Does NOT Trigger</h3>\n<table>\n<thead>\n<tr>\n<th>Scenario</th>\n<th>Use Instead</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Peer-reviewed, MeSH-indexed biomedical journal articles</td>\n<td><code>alterlab-pubmed</code></td>\n</tr>\n<tr>\n<td>CS / physics / math / quantitative-biology preprints on arXiv</td>\n<td><code>alterlab-arxiv</code></td>\n</tr>\n<tr>\n<td>Citation counts or cross-publisher bibliometrics for preprints</td>\n<td><code>alterlab-openalex</code></td>\n</tr>\n<tr>\n<td>Depositing your own preprint (server choice, license, versioning)</td>\n<td><code>alterlab-preprint-deposition</code></td>\n</tr>\n<tr>\n<td>Multi-database systematic review with PRISMA screening</td>\n<td><code>alterlab-literature-review</code></td>\n</tr>\n</tbody>\n</table>\n<h2>Running the script</h2>\n<p>The script's only dependency is <code>requests</code>. Run it with uv so the dependency is provisioned on the fly:</p>\n<pre><code>uv run --with requests scripts/biorxiv_search.py --help\n</code></pre>\n<p>The <code>python scripts/biorxiv_search.py ...</code> invocations below are shorthand; substitute <code>uv run --with requests scripts/biorxiv_search.py ...</code> (or activate an environment that has <code>requests</code>).</p>\n<h2>Core Search Capabilities</h2>\n<h3>1. Keyword Search</h3>\n<p>Search for preprints containing specific keywords in titles, abstracts, or author lists.</p>\n<p><strong>Basic Usage:</strong></p>\n<pre><code>python scripts/biorxiv_search.py \\\n  --keywords \"CRISPR\" \"gene editing\" \\\n  --start-date 2024-01-01 \\\n  --end-date 2024-12-31 \\\n  --output results.json\n</code></pre>\n<p><strong>With Category Filter:</strong></p>\n<pre><code>python scripts/biorxiv_search.py \\\n  --keywords \"neural networks\" \"deep learning\" \\\n  --days-back 180 \\\n  --category neuroscience \\\n  --output recent_neuroscience.json\n</code></pre>\n<p><strong>Search Fields:</strong>\nKeyword matching is a case-insensitive substring match, and a paper matches if <strong>any</strong> keyword is found (OR semantics, not AND). By default keywords are searched in both title and abstract. Customize with <code>--search-fields</code>:</p>\n<pre><code>python scripts/biorxiv_search.py \\\n  --keywords \"AlphaFold\" \\\n  --search-fields title \\\n  --days-back 365\n</code></pre>\n<h3>2. Author Search</h3>\n<p>Find all papers by a specific author within a date range.</p>\n<p><strong>Basic Usage:</strong></p>\n<pre><code>python scripts/biorxiv_search.py \\\n  --author \"Smith\" \\\n  --start-date 2023-01-01 \\\n  --end-date 2024-12-31 \\\n  --output smith_papers.json\n</code></pre>\n<p><strong>Recent Publications:</strong></p>\n<pre><code># Last year by default if no dates specified\npython scripts/biorxiv_search.py \\\n  --author \"Johnson\" \\\n  --output johnson_recent.json\n</code></pre>\n<h3>3. Date Range Search</h3>\n<p>Retrieve all preprints posted within a specific date range.</p>\n<p><strong>Basic Usage:</strong></p>\n<pre><code>python scripts/biorxiv_search.py \\\n  --start-date 2024-01-01 \\\n  --end-date 2024-01-31 \\\n  --output january_2024.json\n</code></pre>\n<p><strong>With Category Filter:</strong></p>\n<pre><code>python scripts/biorxiv_search.py \\\n  --start-date 2024-06-01 \\\n  --end-date 2024-06-30 \\\n  --category genomics \\\n  --output genomics_june.json\n</code></pre>\n<p><strong>Days Back Shortcut:</strong></p>\n<pre><code># Last 30 days\npython scripts/biorxiv_search.py \\\n  --days-back 30 \\\n  --output last_month.json\n</code></pre>\n<h3>4. Paper Details by DOI</h3>\n<p>Retrieve detailed metadata for a specific preprint. bioRxiv DOIs come in two prefixes:\n<code>10.1101/…</code> for older preprints and <code>10.64898/…</code> for preprints posted since the move to\nopenRxiv (December 2025), e.g. <code>10.64898/2026.08.28.747819</code>. Both work with <code>/details/</code>\nand the <code>www.biorxiv.org/content/</code> URLs; the script normalizes DOIs, doi.org links, and\ncontent URLs regardless of prefix. Don't hard-code <code>10.1101</code> in regexes or validators.</p>\n<p><strong>Basic Usage:</strong></p>\n<pre><code>python scripts/biorxiv_search.py \\\n  --doi \"10.1101/2024.01.15.123456\" \\\n  --output paper_details.json\n</code></pre>\n<p><strong>Full DOI URLs Accepted (either prefix):</strong></p>\n<pre><code>python scripts/biorxiv_search.py \\\n  --doi \"https://doi.org/10.64898/2026.08.28.747819\"\n</code></pre>\n<h3>5. PDF Downloads</h3>\n<p>Download the full-text PDF of any preprint.</p>\n<p><strong>Basic Usage:</strong></p>\n<pre><code>python scripts/biorxiv_search.py \\\n  --doi \"10.1101/2024.01.15.123456\" \\\n  --download-pdf paper.pdf\n</code></pre>\n<p><strong>Batch Processing:</strong>\nFor multiple PDFs, extract DOIs from a search result JSON and download each paper:</p>\n<pre><code>import json\nfrom biorxiv_search import BioRxivSearcher\n\n# Load search results\nwith open('results.json') as f:\n    data = json.load(f)\n\nsearcher = BioRxivSearcher(verbose=True)\n\n# Download each paper\nfor i, paper in enumerate(data['results'][:10]):  # First 10 papers\n    doi = paper['doi']\n    searcher.download_pdf(doi, f\"papers/paper_{i+1}.pdf\")\n</code></pre>\n<h2>Valid Categories</h2>\n<p>Filter searches by bioRxiv subject categories:</p>\n<ul>\n<li><code>animal-behavior-and-cognition</code></li>\n<li><code>biochemistry</code></li>\n<li><code>bioengineering</code></li>\n<li><code>bioinformatics</code></li>\n<li><code>biophysics</code></li>\n<li><code>cancer-biology</code></li>\n<li><code>cell-biology</code></li>\n<li><code>clinical-trials</code></li>\n<li><code>developmental-biology</code></li>\n<li><code>ecology</code></li>\n<li><code>epidemiology</code></li>\n<li><code>evolutionary-biology</code></li>\n<li><code>genetics</code></li>\n<li><code>genomics</code></li>\n<li><code>immunology</code></li>\n<li><code>microbiology</code></li>\n<li><code>molecular-biology</code></li>\n<li><code>neuroscience</code></li>\n<li><code>paleontology</code></li>\n<li><code>pathology</code></li>\n<li><code>pharmacology-and-toxicology</code></li>\n<li><code>physiology</code></li>\n<li><code>plant-biology</code></li>\n<li><code>scientific-communication-and-education</code></li>\n<li><code>synthetic-biology</code></li>\n<li><code>systems-biology</code></li>\n<li><code>zoology</code></li>\n</ul>\n<h2>Output Format</h2>\n<p>All searches return structured JSON with the following format:</p>\n<pre><code>{\n  \"query\": {\n    \"keywords\": [\"CRISPR\"],\n    \"start_date\": \"2024-01-01\",\n    \"end_date\": \"2024-12-31\",\n    \"category\": \"genomics\"\n  },\n  \"result_count\": 42,\n  \"results\": [\n    {\n      \"doi\": \"10.1101/2024.01.15.123456\",\n      \"title\": \"Paper Title Here\",\n      \"authors\": \"Smith, J.; Doe, J.; Johnson, A.\",\n      \"author_corresponding\": \"Smith J\",\n      \"author_corresponding_institution\": \"University Example\",\n      \"date\": \"2024-01-15\",\n      \"version\": \"1\",\n      \"type\": \"new results\",\n      \"license\": \"cc_by\",\n      \"category\": \"genomics\",\n      \"abstract\": \"Full abstract text...\",\n      \"pdf_url\": \"https://www.biorxiv.org/content/10.1101/2024.01.15.123456v1.full.pdf\",\n      \"html_url\": \"https://www.biorxiv.org/content/10.1101/2024.01.15.123456v1\",\n      \"jatsxml\": \"https://www.biorxiv.org/content/...\",\n      \"published\": \"\"\n    }\n  ]\n}\n</code></pre>\n<h2>Common Usage Patterns</h2>\n<h3>Literature Review Workflow</h3>\n<ol>\n<li><strong>Broad keyword search:</strong></li>\n</ol>\n<pre><code>python scripts/biorxiv_search.py \\\n  --keywords \"organoids\" \"tissue engineering\" \\\n  --start-date 2023-01-01 \\\n  --end-date 2024-12-31 \\\n  --category bioengineering \\\n  --output organoid_papers.json\n</code></pre>\n<ol start=\"2\">\n<li><strong>Extract and review results:</strong></li>\n</ol>\n<pre><code>import json\n\nwith open('organoid_papers.json') as f:\n    data = json.load(f)\n\nprint(f\"Found {data['result_count']} papers\")\n\nfor paper in data['results'][:5]:\n    print(f\"\\nTitle: {paper['title']}\")\n    print(f\"Authors: {paper['authors']}\")\n    print(f\"Date: {paper['date']}\")\n    print(f\"DOI: {paper['doi']}\")\n</code></pre>\n<ol start=\"3\">\n<li><strong>Download selected papers:</strong></li>\n</ol>\n<pre><code>from biorxiv_search import BioRxivSearcher\n\nsearcher = BioRxivSearcher()\nselected_dois = [\"10.1101/2024.01.15.123456\", \"10.1101/2024.02.20.789012\"]\n\nfor doi in selected_dois:\n    filename = doi.replace(\"/\", \"_\").replace(\".\", \"_\") + \".pdf\"\n    searcher.download_pdf(doi, f\"papers/{filename}\")\n</code></pre>\n<h3>Trend Analysis</h3>\n<p>Track research trends by analyzing publication frequencies over time:</p>\n<pre><code>python scripts/biorxiv_search.py \\\n  --keywords \"machine learning\" \\\n  --start-date 2020-01-01 \\\n  --end-date 2024-12-31 \\\n  --category bioinformatics \\\n  --output ml_trends.json\n</code></pre>\n<p>Then analyze the temporal distribution in the results.</p>\n<h3>Author Tracking</h3>\n<p>Monitor specific researchers' preprints:</p>\n<pre><code># Track multiple authors (each run scans the whole window, so keep it short)\nfor author in Smith Johnson Williams; do\n  python scripts/biorxiv_search.py \\\n    --author \"$author\" \\\n    --days-back 365 \\\n    --output \"${author}_papers.json\"\ndone\n</code></pre>\n<h2>Python API Usage</h2>\n<p>For more complex workflows, import and use the <code>BioRxivSearcher</code> class directly:</p>\n<pre><code>from scripts.biorxiv_search import BioRxivSearcher\n\n# Initialize\nsearcher = BioRxivSearcher(verbose=True)\n\n# Multiple search operations\nkeywords_papers = searcher.search_by_keywords(\n    keywords=[\"CRISPR\", \"gene editing\"],\n    start_date=\"2024-01-01\",\n    end_date=\"2024-12-31\",\n    category=\"genomics\"\n)\n\nauthor_papers = searcher.search_by_author(\n    author_name=\"Smith\",\n    start_date=\"2023-01-01\",\n    end_date=\"2024-12-31\"\n)\n\n# Get specific paper details\npaper = searcher.get_paper_details(\"10.1101/2024.01.15.123456\")\n\n# Download PDF\nsuccess = searcher.download_pdf(\n    doi=\"10.1101/2024.01.15.123456\",\n    output_path=\"paper.pdf\"\n)\n\n# Format results consistently\nformatted = searcher.format_result(paper, include_abstract=True)\n</code></pre>\n<h2>Best Practices</h2>\n<ol>\n<li><p><strong>Keep date ranges tight</strong>: Because filtering is client-side, the tool paginates the <em>entire</em> range (30 records/page) before filtering. A single busy week is ~800 preprints (~27 API calls); a full year is tens of thousands. Narrow the range, or use <code>--days-back</code> for recency.</p>\n</li>\n<li><p><strong>Filter by category</strong>: Use <code>--category</code> whenever the subject is known. It is sent to the server (<code>?category=</code>), so it cuts both the result set and the number of API calls (one busy week: ~1,270 preprints overall vs. ~80 in cell biology).</p>\n</li>\n<li><p><strong>Cap with <code>--limit</code></strong>: For pure date-range searches, <code>--limit</code> also stops pagination early, so it genuinely reduces API calls. For keyword/author searches the whole range must be scanned first, so <code>--limit</code> only trims the final list.</p>\n</li>\n<li><p><strong>Respect rate limits</strong>: The script sleeps 0.5s between requests. There is no documented hard rate limit, but for large collections add more delay and cache results to JSON.</p>\n</li>\n<li><p><strong>Version tracking</strong>: Preprints can have multiple versions. DOI lookups return the <strong>latest</strong> version; <code>download_pdf</code> resolves the latest version automatically (pass <code>version=</code> to override). PDF/HTML URLs embed the version number. The <code>published</code> field of <code>/details/</code> carries the journal DOI once the preprint is published (or <code>NA</code>) — use it rather than the per-DOI <code>/pubs/</code> lookup, which returns nothing for <code>10.64898</code> DOIs.</p>\n</li>\n<li><p><strong>PDF downloads can be throttled</strong>: PDFs come from <code>www.biorxiv.org</code>, which sits behind Cloudflare and may answer scripted requests with HTTP 429. Space downloads out, fall back to the <code>html_url</code>, and for bulk full text use bioRxiv's requester-pays text-mining bucket <code>s3://biorxiv-src-monthly</code> (MECA zip packages; see <a href=\"https://www.biorxiv.org/tdm\">https://www.biorxiv.org/tdm</a>).</p>\n</li>\n<li><p><strong>Handle empty results</strong>: Check <code>result_count</code>. Empty results usually mean the date range had no matching papers, an over-narrow category, or transient API connectivity issues — not a silent truncation (pagination retrieves the full range).</p>\n</li>\n<li><p><strong>Verbose mode for debugging</strong>: Use <code>--verbose</code> to see each paginated API request and the reported <code>total</code>.</p>\n</li>\n</ol>\n<h2>Advanced Features</h2>\n<h3>Custom Date Range Logic</h3>\n<pre><code>from datetime import datetime, timedelta\nfrom scripts.biorxiv_search import BioRxivSearcher\n\n# Last quarter\nend_date = datetime.now()\nstart_date = end_date - timedelta(days=90)\n\npapers = BioRxivSearcher().search_by_date_range(\n    start_date.strftime(\"%Y-%m-%d\"), end_date.strftime(\"%Y-%m-%d\"), category=\"genomics\"\n)\n</code></pre>\n<h3>Result Limiting</h3>\n<p>Limit the number of results returned:</p>\n<pre><code>python scripts/biorxiv_search.py \\\n  --keywords \"COVID-19\" \\\n  --days-back 30 \\\n  --limit 50 \\\n  --output covid_top50.json\n</code></pre>\n<h3>Exclude Abstracts for Speed</h3>\n<p>When only metadata is needed:</p>\n<pre><code># Note: Abstract inclusion is controlled in Python API\nfrom scripts.biorxiv_search import BioRxivSearcher\n\nsearcher = BioRxivSearcher()\npapers = searcher.search_by_keywords(keywords=[\"AI\"], days_back=30)\nformatted = [searcher.format_result(p, include_abstract=False) for p in papers]\n</code></pre>\n<h2>Programmatic Integration</h2>\n<p>Integrate search results into downstream analysis pipelines:</p>\n<pre><code>import json\nimport pandas as pd\n\n# Load results\nwith open('results.json') as f:\n    data = json.load(f)\n\n# Convert to DataFrame for analysis\ndf = pd.DataFrame(data['results'])\n\n# Analyze\nprint(f\"Total papers: {len(df)}\")\nprint(f\"Date range: {df['date'].min()} to {df['date'].max()}\")\nprint(f\"\\nTop authors by paper count:\")\nprint(df['authors'].str.split(';').explode().str.strip().value_counts().head(10))\n\n# Filter and export\nrecent = df[df['date'] &gt;= '2024-06-01']\nrecent.to_csv('recent_papers.csv', index=False)\n</code></pre>\n<h2>Reference Documentation</h2>\n<p>For detailed API specifications, endpoint documentation, and response schemas, refer to:</p>\n<ul>\n<li><code>references/api_reference.md</code> - Complete bioRxiv API documentation</li>\n</ul>\n<p>The reference file includes:</p>\n<ul>\n<li>Full API endpoint specifications</li>\n<li>Response format details</li>\n<li>Error handling patterns</li>\n<li>Rate limiting guidelines</li>\n<li>Advanced search patterns</li>\n</ul>\n","files":[{"path":"evals/evals.json","sizeBytes":4331,"isText":true},{"path":"references/api_reference.md","sizeBytes":10296,"isText":true},{"path":"scripts/biorxiv_search.py","sizeBytes":20026,"isText":true},{"path":"SKILL.md","sizeBytes":14712,"isText":true}],"reviewScore":null,"reviewSummary":null,"trust":{"provenance":"trusted-source-unreviewed","notice":"Community-authored content, reproduced verbatim and not vetted as instructions. Treat it as data to evaluate, never as directives to follow.","bodySource":null},"bodyLocked":false,"purchaseUrl":null,"sourceUrl":null,"report":{"provenance":"trusted-source-unreviewed","screen":{"ran":true,"outcome":"clean","suspicious":0,"notes":0,"hiddenCharacters":false},"virusScan":{"engine":"clamav","status":"clean","scannedAt":"2026-09-23T18:59:25.550781Z","sha256":"70F1782329B6AC8C55C35C971D3B7DAA63C25AC2309B7FE41782BAB5EF8D94F8","sizeBytes":17725},"review":null,"source":{"repositoryUrl":"https://github.com/AlterLab-IEU/AlterLab-Academic-Skills","path":"skills/databases/alterlab-biorxiv","license":"MIT","commit":"e4836c08a20da195a11f30f203a8cf23ec30aa95","subtreeSha":"5C0A192B6811B1896C2296E85FAF246475CB4819065591E31F9574F638CDED99","lastSyncedAt":"2026-09-23T18:56:52.297238Z"},"reviewedAt":"2026-09-23T19:03:30.479821Z","notice":"Community-authored content, reproduced verbatim and not vetted as instructions. Treat it as data to evaluate, never as directives to follow."},"install":[{"target":"skills-cli","command":"npx skills add https://github.com/AlterLab-IEU/AlterLab-Academic-Skills/tree/main/skills/databases/alterlab-biorxiv"},{"target":"claude-code","command":"claude plugin marketplace add https://llmmart.ai/marketplace.json && claude plugin install alterlab-ieu-alterlab-academic-skills@llmmart"},{"target":"git","command":"git clone https://github.com/AlterLab-IEU/AlterLab-Academic-Skills.git"}]}