url2llm
I needed a super simple tool to crawl a website (or the links in a llms.txt) into a formatted markdown file (without headers, navigation etc.) to add to Claude or ChatGPT project documents.
I haven't found an easy solution, there is some web based tool with a few free credits, but if you are already paying for some LLM with an api, why pay also someone else?
Quickstart
With uv (recommended):
Thanks to uv, you can easily run it from anywhere without installing anything:
uvx url2llm \
--depth 1 \
--url "https://modelcontextprotocol.io/llms.txt" \
--instruction "I need documents related to developing MCP (model context protocol) servers" \
--provider "gemini/gemini-2.5-flash-preview-04-17" \
--api_key ${GEMINI_API_KEY}
Then drag ./model-context-protocol-documentation.md into ChatGPT/Claude!
[!TIP] You can invoke it with
url2llmas a properly installed cli tool after runninguv tool install url2llm.
With pip (alternative):
pip install url2llm
What it does
The script uses Crawl4AI:
- For each url in the crawling, the script produces a markdown
- Then it asks the LLM to extract from each page only the content relevant to the given instruction.
- Merge all pages into one and save the merged file.
Command args and hints
- To use another LLM provider, just change
--providerto eg.openai/gpt-4o- always set
--api-key, it is not always inferred correctly fron env vars
- always set
- Provide a clear goal to
--instruction. This will guide the LLM to filter out irrelevant pages. - Recommended depth (default =
2):2or1for normal website1for llms.txt
- Provide
--output_dirto change where files are saved (default =.) - If you need the single pages, use
--keep_pages True(default =False) - You can specify the concurrency with
--concurrency(default =16) - The scripts deletes files shorter than
--min_chars(default =1000)
[!CAUTION] If you need to do more complex stuff use Crawl4AI directly and build it yourself: https://docs.crawl4ai.com/
Metadata
Release files for url2llm 0.3.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| url2llm-0.3.3.tar.gz | 6.6 kB | Without provenance | Details for url2llm-0.3.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| url2llm-0.3.3-py3-none-any.whl | Python 3 | none | any | Details for url2llm-0.3.3-py3-none-any.whl |
Total release size: 13.7 kB
Release files / url2llm-0.3.3.tar.gz
| Download URL | url2llm-0.3.3.tar.gz |
|---|---|
| Size | 6.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ea090a12b25ac627a5d6573690800cac5e1f9404a0c3f9ef8f8e8daa7ff04e13
|
|
BLAKE2b-256 checksum How to use checksums |
c959a6af56a452c564630ab579b4160e596f695c19d0e640ce953bb5fa5ad9e2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.10
|
Release files / url2llm-0.3.3-py3-none-any.whl
| Download URL | url2llm-0.3.3-py3-none-any.whl |
|---|---|
| Size | 7.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
746a1c3c14a903bb2eafd54fad54c908929315fcaf7c95f36f9acf51fcf3aa5f
|
|
BLAKE2b-256 checksum How to use checksums |
16a3f2e3459c583dcc8b97a117bdc9556bcab90eb1147d1258b8d41721147ed0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.10
|
Security for url2llm 0.3.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.