llm-url-markdown
LLM plugin for pulling web page content as Markdown.
This plugin fetches the primary content of a URL, formatted as Markdown, and makes it available as an LLM fragment.
For background on LLM fragments:
Installation
Install this plugin in the same environment as LLM.
llm install llm-url-markdown
Usage
You can feed the Markdown content of a web page into LLM using the md: fragment prefix followed by the URL.
For example:
# Fetch content from a full URL
llm -f md:https://llm.datasette.io/en/stable/plugins/index.html 'Summarize the types of plugins available'
# Fetch content, defaulting to https://
llm -f md:github.com/simonw/llm 'What is the main goal of this LLM tool?'
The plugin prepends https:// if no protocol (like http:// or https://) is specified in the URL. The fetched content is the Markdown representation of the webpage.
Jina Reader API Token (Optional)
This plugin uses the Jina Reader API, which allows requests without an API key, although potentially subject to lower rate limits. The plugin functions without an API token, which is often sufficient for typical LLM fragment usage and improves usability.
If you have a Jina Reader API token and want to use it (for higher rate limits), you can set it as an environment variable:
# Set the token (only needed once per shell session)
export JINA_READER_TOKEN=your_api_token_here
# Then use the plugin as normal
llm -f md:example.com 'Summarize this page'
Development
To set up this plugin locally, first checkout the code. Then create a new virtual environment:
cd llm-url-markdown
python -m venv venv
source venv/bin/activate
Now install the dependencies and test dependencies:
# Installs llm, httpx, and testing tools like pytest
pip install -e '.[test]'
To run the tests:
python -m pytest
Metadata
Release files for llm-url-markdown 0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| llm_url_markdown-0.1.tar.gz | 3.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| llm_url_markdown-0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 6.4 kB
Release files / llm_url_markdown-0.1.tar.gz
| Download URL | llm_url_markdown-0.1.tar.gz |
|---|---|
| Size | 3.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e7dc0ce7ec99813cc78cd59b1d1c6827c422804e2bcde1e2edc76092263f737f
|
|
BLAKE2b-256 checksum How to use checksums |
871eeb1fbbb874ce9228d901fb79b8ffc014f02bbdd4e5cbc3bc65c93c29e4fa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 16, 2025.
Transparency logRelease files / llm_url_markdown-0.1-py3-none-any.whl
| Download URL | llm_url_markdown-0.1-py3-none-any.whl |
|---|---|
| Size | 3.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3f3ef9be152c36a2a68ff3b191c4820f5b02f6b5a239a1a01b178237748d5284
|
|
BLAKE2b-256 checksum How to use checksums |
f3fcb8c0f6b04e7f28f9ab2c2d0ec32d1d8853a20bbe5166520f37259bb51fc3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 16, 2025.
Transparency log