langchain-mesharc
The LangChain integration for MeshArc, the web crawler that turns sites into clean markdown and records what changed between crawls.
MeshArcLoaderloads web pages as LangChainDocuments, in four modes: scrape, crawl, map and changes.MeshArcSearchandMeshArcScrapeare tools an agent can call to search the web and read pages.
pip install langchain-mesharc
You need a MeshArc API key. Make one under Settings → API keys at mesharc.dev; the free plan includes 1,000 credits with no card. Set it as MESHARC_API_KEY, or pass api_key=. Reading pages and searching need a key with write access.
Document loader
from langchain_mesharc import MeshArcLoader
# One page, or many read as one batch
docs = MeshArcLoader("https://example.com/pricing").load()
docs = MeshArcLoader(["https://example.com/", "https://example.com/about"]).load()
# A whole site, or a section of it; pages arrive as they are read
loader = MeshArcLoader("https://docs.example.com", mode="crawl",
params={"limit": 100, "includePaths": ["/guides/*"]})
for doc in loader.lazy_load():
print(doc.metadata["url"], len(doc.page_content))
# The URLs a site declares in its sitemaps, without fetching them
urls = MeshArcLoader("https://docs.example.com", mode="map").load()
# What changed on a watched site since the last crawl
changed = MeshArcLoader(mode="changes", project_id="prj_...").load()
| Mode | Input | Each Document |
|---|---|---|
scrape |
a URL or a list of URLs | the page's markdown |
crawl |
a site's URL; params takes limit, maxDepth, includePaths, excludePaths and the rest of the crawl options |
one per page read |
map |
a site's URL; params takes search and limit |
one per URL in the sitemaps, with the URL as its text |
changes |
project_id, and optionally run_id and against |
one per added or modified page, holding the page as it is now |
Metadata on every page: source and url, title, page_status (one word: ok, missing, blocked, captcha, …), crawled_at and mode.
- Scraped and changed pages also have
status, the HTTP status. A crawl's pages don't, because the API leaves it out of crawl results. - Scraped pages also have
verdictandcredits. - A crawl adds
crawl_id. - Changes add
project_id,run_id,previous_run_id,changed_at,change(added,modified,removedorfields),words_beforeandwords_after.
Values are always strings, numbers or booleans, so any vector store accepts them.
Pages that came back with no content (blocked, or a 404) are left out. Pass include_empty=True to keep them; their page_status and error_code say why. In changes mode, removed pages are left out unless include_removed=True.
changes mode keeps a vector store current: load it after each run of a MeshArc project, and re-embed only the pages that changed. Each Document's id is run_id:url.
Tools
from langchain_mesharc import MeshArcScrape, MeshArcSearch
tools = [MeshArcSearch(), MeshArcScrape()]
| Tool | The agent gives | It gets back |
|---|---|---|
mesharc_search (MeshArcSearch) |
query, limit (1–10), read_pages |
a numbered list of results (title, URL, snippet), and with read_pages each result's page text |
mesharc_scrape (MeshArcScrape) |
urls (1–20) |
each page's title, URL and markdown, or why a page could not be read |
Both tools return content_and_artifact:
- the content is the text sent to the model, with each page cut at
max_chars_per_page(8,000 by default; 0 for no limit); - the artifact is MeshArc's full response.
A refused request, such as one with too few credits left, comes back to the agent as an error message rather than stopping it.
Cost
Requests are billed in MeshArc credits, the same as any other API call:
- a plain page read costs 1 credit, and blocked pages and 404s cost nothing;
- a web search costs what reading its results page costs;
- a sitemap read costs 1 credit per sitemap file.
See pricing.
Links
- MeshArc docs and API reference
- The Python SDK, which this package uses
- Questions · security reports to security@mesharc.dev
License
MIT
Metadata
Release files for langchain-mesharc 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| langchain_mesharc-0.1.0.tar.gz | 12.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| langchain_mesharc-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 24.5 kB
Release files / langchain_mesharc-0.1.0.tar.gz
| Download URL | langchain_mesharc-0.1.0.tar.gz |
|---|---|
| Size | 12.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8f7742c70c22128cf28fe717b5f97611c7b5210cb2d380a9d7e9c9d54c2e760e
|
|
BLAKE2b-256 checksum How to use checksums |
c785854485acb4d73026f0b35d21712bdd490773c9c3194f0cbf9c4d286dca45
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Oct 16, 2026.
Transparency logRelease files / langchain_mesharc-0.1.0-py3-none-any.whl
| Download URL | langchain_mesharc-0.1.0-py3-none-any.whl |
|---|---|
| Size | 12.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
13c81dea4fe2019c2a1ea1c7aa34314bab843e60259c06f20fce1e026bfc565c
|
|
BLAKE2b-256 checksum How to use checksums |
7aeac684e35ba5c7372cc7a44e0cdf9a18590d2d3d9a21809ae0cb513bf6203d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Oct 16, 2026.
Transparency log