langchain-groundtruth
LangChain tools that look up a company from its website domain: who runs the domain, what its website runs on, whether it is hiring, and how to reach it. Also newly formed US businesses with their websites, what changed at a company, and a search over tracked companies. Every item in the answer links to the page or record it came from.
pip install -U langchain-groundtruth
Python 3.10+ (the minimum for langchain-core). Works without a key on the free tier (10 calls a day).
Two lines
from langchain_groundtruth import GroundTruthCompanyLookup
print(GroundTruthCompanyLookup().invoke({"domain": "stripe.com"}))
The tools
| Class | Tool name | Input | Returns |
|---|---|---|---|
GroundTruthCompanyLookup |
groundtruth_company_lookup |
domain; optional name, country, ticker |
JSON: registrar and DNS record, email provider, tech stack, hiring (open roles, salary ranges where published, roles opened and closed in the last 30 days). With name and country the official register entry; with ticker revenue reported to the SEC. A part with nothing to report is listed under missing with the reason |
GroundTruthCompanyContacts |
groundtruth_company_contacts |
domain |
JSON: phone numbers, role inboxes such as sales@, contact page, postal address, read from the company's own website. For US companies also the other addresses it published at its own domain. Nothing is guessed from a name pattern |
GroundTruthNewBusinesses |
groundtruth_new_businesses |
all optional: mode (new, search, lookup), states (NY, CO, OR, CT), since, until, name, entity_numbers, entity_type, status, limit |
JSON: businesses from the New York, Colorado, Oregon and Connecticut Secretary of State registers. new lists those formed in a date window (default the last 7 days), search finds them by legal name, lookup by entity number. Each record has type, status, formation date, city, state, ZIP, a link to the state's record, and the company's website when one was found with proof (website_status: found, no website found, not checked yet). Never people's names, emails, phones or street addresses |
GroundTruthCompanyChanges |
groundtruth_company_changes |
domain, company, or state with entity_number; optional since, until, parts, limit |
JSON: what changed at one company, day by day: job roles opened and closed, phones, role inboxes, contact page and address on its own site, technologies added or dropped, register status. Each change has a source link. The first call starts tracking, so contact and tech changes show up on later calls |
GroundTruthCompanySearch |
groundtruth_company_search |
all optional: state, city, name, tech, formed_since, formed_until, has (phone, role_email, contact_page), hiring, limit, offset |
JSON: tracked companies (newly formed NY, CO, OR and CT businesses with a website found with proof) matching the filters: register details, website, technologies, job board. Whether contact details exist, not the values |
All are BaseTool subclasses with pydantic input schemas, sync and async.
Agent example
from langchain.agents import create_agent
from langchain_groundtruth import GroundTruthCompanyContacts, GroundTruthCompanyLookup
agent = create_agent(
model="openai:gpt-5.5", # any chat model you have configured
tools=[GroundTruthCompanyLookup(), GroundTruthCompanyContacts()],
)
result = agent.invoke(
{"messages": [{"role": "user", "content": "Is stripe.com hiring, and what does its website run on?"}]}
)
print(result["messages"][-1].content)
Key
export GROUNDTRUTH_API_KEY="your-key"
or pass it in: GroundTruthCompanyLookup(api_key="your-key"). Without a key you get 10 calls a day per caller, no sign-up.
| Free tier | 10 calls a day, no key |
| $10 once | 2,000 calls that never expire. Buy |
| $49 a month | 20,000 calls a month. Buy |
A company lookup, new-businesses call, change feed or company search uses 2 of a key's calls, a contacts lookup 4. A call that fails is not charged. Live prices: https://companyfacts.dev/pricing
Errors
A failed call does not crash the agent. The tools set handle_tool_error, so the message comes back as the tool result (a ToolMessage with status error) and the model can read it and tell the user. That covers a spent free allowance (the message includes where to buy a key), a malformed domain, a site that blocks automated readers, a domain with nothing found, and an upstream source being down.
tool = GroundTruthCompanyLookup()
print(tool.invoke({"domain": "stripe.com"}))
# If the free allowance is used up this prints the explanation and the buy link, it does not raise.
To get exceptions instead, set handle_tool_error=False.
Options
| Argument | Default | |
|---|---|---|
api_key |
GROUNDTRUTH_API_KEY env var, else none |
Stored as a secret, never shown in repr |
base_url |
https://companyfacts.dev |
Point at another deployment |
timeout |
60.0 |
Seconds per call. A company lookup runs several checks in parallel |
Tests
pip install -e ../groundtruth-company -e . pytest pytest-asyncio pytest-socket langchain-tests
python -m pytest tests/unit_tests
GROUNDTRUTH_LIVE=1 python -m pytest tests/integration_tests # calls the real API
The unit tests run LangChain's standard ToolsUnitTests and ToolsIntegrationTests suites, plus behaviour tests, with the HTTP layer faked.
Other ways in
The same data is available as a Python client (groundtruth-company), a remote MCP server at https://companyfacts.dev/mcp, and plain REST. Docs: https://companyfacts.dev/llms.txt
MIT licensed.
Metadata
Release files for langchain-groundtruth 0.2.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 | Provenance | Actions |
|---|---|---|---|---|
| langchain_groundtruth-0.2.0.tar.gz | 13.9 kB | Without provenance | Details for langchain_groundtruth-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| langchain_groundtruth-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for langchain_groundtruth-0.2.0-py3-none-any.whl |
Total release size: 24.2 kB
Release files / langchain_groundtruth-0.2.0.tar.gz
| Download URL | langchain_groundtruth-0.2.0.tar.gz |
|---|---|
| Size | 13.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c6f22a9b876c637e4e0fa69c03108c5c11228a61efa3d82cba4127a91eaf99fd
|
|
BLAKE2b-256 checksum How to use checksums |
890984d98080ee3cc055f3ff54d07973c8bc240d9aa718f4f7677a579c32aaee
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.10
|
Release files / langchain_groundtruth-0.2.0-py3-none-any.whl
| Download URL | langchain_groundtruth-0.2.0-py3-none-any.whl |
|---|---|
| Size | 10.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7e24b45950210229da1d59677fd73ef3ee0e5ce4569d9d9c429eeb2e39875a3d
|
|
BLAKE2b-256 checksum How to use checksums |
0b47334d2ad4591be6cb37be4607836a4f663eef9a24619eb529a8753b21eba4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.10
|
Security for langchain-groundtruth 0.2.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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.