Skip to main content

ToolTrace LangChain Integration

LangChain document loader and tools for the ToolTrace web intelligence API. Load webpages as LangChain Documents for RAG pipelines, or give your agents web scraping, SEO audit, and tech stack detection capabilities.

Install

pip install tooltrace-langchain

Document Loader

Load webpages as LangChain Documents with clean Markdown content and rich metadata:

from tooltrace_langchain import ToolTraceLoader

loader = ToolTraceLoader(
    urls=[
        "https://example.com/blog/post-1",
        "https://example.com/blog/post-2",
    ],
    api_key="your-key",
)

docs = loader.load()
for doc in docs:
    print(doc.metadata["title"])
    print(doc.page_content[:200])

Document metadata

Each document includes:

  • source: Final URL after redirects
  • title: Page title
  • canonical_url: Canonical URL
  • author: Author name
  • language: Content language
  • published_at: Publication date
  • word_count: Word count
  • render_method: Whether static or browser rendering was used
  • content_hash: Content hash for change detection

Agent Tools

Give LangChain agents web intelligence capabilities:

from tooltrace_langchain import (
    ToolTraceExtractTool,
    ToolTraceMetadataTool,
    ToolTraceSeoAuditTool,
    ToolTraceTechStackTool,
)

tools = [
    ToolTraceExtractTool(api_key="your-key"),
    ToolTraceMetadataTool(api_key="your-key"),
    ToolTraceSeoAuditTool(api_key="your-key"),
    ToolTraceTechStackTool(api_key="your-key"),
]

# Use with any LangChain agent
from langchain.agents import AgentExecutor, create_tool_calling_agent

agent = create_tool_calling_agent(llm, tools, prompt)
executor = AgentExecutor(agent=agent, tools=tools)
result = executor.invoke({"input": "What technologies does example.com use?"})

RAG pipeline example

from langchain_openai import OpenAIEmbeddings
from langchain_community.vectorstores import FAISS
from langchain.text_splitter import RecursiveCharacterTextSplitter

from tooltrace_langchain import ToolTraceLoader

# Load pages
loader = ToolTraceLoader(
    urls=["https://tooltrace.io/docs"],
    api_key="your-key",
)
docs = loader.load()

# Split and index
splitter = RecursiveCharacterTextSplitter(chunk_size=1000, chunk_overlap=200)
chunks = splitter.split_documents(docs)
vectorstore = FAISS.from_documents(chunks, OpenAIEmbeddings())

# Query
results = vectorstore.similarity_search("How does rendering work?")

License

MIT

Metadata

Release files for tooltrace-langchain 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tooltrace-langchain 0.1.0
File Size Uploaded Provenance
tooltrace_langchain-0.1.0.tar.gz 5.9 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for tooltrace-langchain 0.1.0
File Interpreter ABI Platform
tooltrace_langchain-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 11.9 kB

Release files / tooltrace_langchain-0.1.0.tar.gz

Download URL tooltrace_langchain-0.1.0.tar.gz
Size 5.9 kB
Tags Source
SHA-256 checksum
How to use checksums
24a44e5af7be3d67392c469e6a5995047ff1ec799a1509633d19ce70d4a86dd6
BLAKE2b-256 checksum
How to use checksums
7a048a2621b66171a9c969976b101d78f9cdfffdc53fb651130a5fb8f35cea86
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.6

Release files / tooltrace_langchain-0.1.0-py3-none-any.whl

Download URL tooltrace_langchain-0.1.0-py3-none-any.whl
Size 5.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
59e212b0e39b15a9084d085b764bc6ca0e3500316d5466b10befe47a3adf07e4
BLAKE2b-256 checksum
How to use checksums
dbc0df6f42b35b294cccc4fe43d805ff1174f549e0bf99fd8b5281c8839687df
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.6

Security for tooltrace-langchain 0.1.0

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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page