Documentation crawler: recursively crawl a docs site and emit clean markdown
Project description
getdocs
Turn any documentation site into a clean, local markdown copy your coding agent can actually read.
getdocs crawl https://example.com/docs -o ./out
Coding agents are only as good as the docs they can see. Pointing an agent at a
live docs URL means it burns tokens on nav bars, cookie banners, and HTML
chrome — or can't reach the page at all. getdocs gives the agent a local,
offline, markdown mirror instead: the actual content, structured to match the
original site, ready to drop into a repo or feed to a model.
Why getdocs
- Richer context for coding agents. A local copy is greppable, indexable, and always available — the agent reads the whole library at once instead of fetching one rendered page at a time. No rate limits, no network flakiness, no JS that won't hydrate.
- Clean markdown → fewer tokens. Each page is reduced to its content (the
nav, headers, footers, and ad chrome stripped) and written as plain markdown.
Agents consume it directly, and you spend tokens on docs, not
<div>soup. - Structure preserved. Files mirror the URL hierarchy
(
example.com/docs/auth→out/docs/auth.md), each with YAML frontmatter (url,title,crawled_at,status), plus acrawl.jsonManifest that captures the site's nav order and reading order — so an agent can follow the docs in the order the authors intended. - Source-first: clone over crawl. If the docs site is open-source, getdocs detects the "Edit this page" link, clones the repo, and serves you the original markdown source instead of scraping HTML — the highest-fidelity copy there is. Falls back to crawling automatically when there's no repo.
When to reach for it
- Coding against an unfamiliar library or API. Mirror its docs into your repo (or a scratch dir) so your agent can ground its answers in the real reference instead of hallucinating from memory.
- RAG / knowledge bases. Get a clean markdown corpus to chunk and embed, without writing a bespoke scraper-and-cleaner for every site.
- Offline or air-gapped work. Take a docs set with you; read and search it with no network.
- Pinning a version. Snapshot today's docs so your agent isn't tripped up when the upstream site changes underneath you.
- Migrating or archiving docs. Pull an entire site down as markdown to move, diff, or keep.
Output
out/
├── crawl.json ← the Manifest: nav order, reading order, what ran
└── docs/
├── index.md
├── auth.md
└── guide/
└── intro.md
---
url: https://example.com/docs/auth
title: Authentication
status: 200
crawled_at: 2026-06-12T10:00:00Z
---
# Authentication
...
Sitemap discovery, JavaScript rendering, source-repo cloning, polite throttling, JSONL output, and resumable crawls are all built in — see docs/USAGE.md.
Install
Requires Python 3.12+.
pip install getdocs
Or from source, for the latest unreleased changes:
git clone https://github.com/jonbakerfish/getdocs
cd getdocs
pip install -e .
That's enough to crawl. Two optional pieces unlock more:
# JavaScript rendering — the headless browser used to hydrate SPA docs
playwright install chromium
# Serve a crawled/cloned copy locally as a browsable site
pip install mkdocs mkdocs-material
git must be on your PATH for source-first cloning (it almost always
already is); without it, getdocs simply falls back to crawling. To run the
optional API service, install the server extra: pip install "getdocs[server]".
Development
git clone https://github.com/jonbakerfish/getdocs
cd getdocs
pip install -e ".[dev]"
pytest
Responsible use
getdocs is a tool; how you point it is on you. By default it honors
robots.txt, throttles itself politely, and identifies itself honestly
in the User-Agent (getdocs/<version> (+project-url)) — please keep it that
way. For high-volume crawls, add --contact you@example.com so site operators
can reach you (it's appended to the User-Agent; optional but courteous).
getdocs is intended for personal, reference, and agent/RAG use on documentation
you have the right to access. You are solely responsible for complying with
each site's Terms of Service, its robots.txt, applicable law, and the
copyright of the content you fetch — getdocs is provided as-is, with no
warranty (see LICENSE). Crawled documentation belongs to its authors:
use it for your own reference, but don't redistribute someone else's docs as
your own. Crawl only what you have the right to.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file getdocs-0.1.0.tar.gz.
File metadata
- Download URL: getdocs-0.1.0.tar.gz
- Upload date:
- Size: 49.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
031abedd9d11b8224d78f93b6fc24a7e8337345114bad98aaa38d697f4129292
|
|
| MD5 |
75106fd55f3dcd164d9431bee19c1721
|
|
| BLAKE2b-256 |
9144e925fe1b650c5d7135e85f0616219f1bb021aa2bcd31d65f27468ecc9b9f
|
Provenance
The following attestation bundles were made for getdocs-0.1.0.tar.gz:
Publisher:
publish.yml on jonbakerfish/getdocs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
getdocs-0.1.0.tar.gz -
Subject digest:
031abedd9d11b8224d78f93b6fc24a7e8337345114bad98aaa38d697f4129292 - Sigstore transparency entry: 1982238281
- Sigstore integration time:
-
Permalink:
jonbakerfish/getdocs@b11e514b099298c9dfc80dc80ded6c2759e80f33 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/jonbakerfish
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@b11e514b099298c9dfc80dc80ded6c2759e80f33 -
Trigger Event:
release
-
Statement type:
File details
Details for the file getdocs-0.1.0-py3-none-any.whl.
File metadata
- Download URL: getdocs-0.1.0-py3-none-any.whl
- Upload date:
- Size: 33.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f39c22127ef4ea09a07120699d53e06299660500a1db94db0f68a4d4197569bb
|
|
| MD5 |
1a98eefd3e615d687ec0322d54a4c9bd
|
|
| BLAKE2b-256 |
56d5fcd10c8b4f570b0f291319753d3f8395b1e0c2e406961e17a51fbc0b1646
|
Provenance
The following attestation bundles were made for getdocs-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on jonbakerfish/getdocs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
getdocs-0.1.0-py3-none-any.whl -
Subject digest:
f39c22127ef4ea09a07120699d53e06299660500a1db94db0f68a4d4197569bb - Sigstore transparency entry: 1982238443
- Sigstore integration time:
-
Permalink:
jonbakerfish/getdocs@b11e514b099298c9dfc80dc80ded6c2759e80f33 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/jonbakerfish
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@b11e514b099298c9dfc80dc80ded6c2759e80f33 -
Trigger Event:
release
-
Statement type: