Skip to main content

langchain-crustapi

This package connects CrustAPI to LangChain, giving your chains and agents clean, structured Google data from one endpoint (Maps, News, Shopping, Images, Places, Scholar and Patents) plus public LinkedIn data (profiles, companies, posts, jobs, and people search). You only pay for successful results, and there's a free tier with no card.

Installation

pip install -U langchain-crustapi
export CRUSTAPI_API_KEY="your-key"   # free at https://crustapi.com

Usage

from langchain_crustapi import CrustAPISearch

maps = CrustAPISearch(search_type="maps", location="Austin, TX")
maps.invoke({"query": "dentists"})

news = CrustAPISearch(search_type="news")
news.invoke({"query": "openai"})

Bind it to an agent like any other LangChain tool:

from langchain.chat_models import init_chat_model
from langchain_crustapi import CrustAPISearch

llm = init_chat_model("gpt-4o-mini")
agent_llm = llm.bind_tools([CrustAPISearch(search_type="maps")])

Google Web Search and Videos were retired. Choose the surface explicitly when upgrading from a version that used Web Search by default.

LinkedIn tool

CrustAPILinkedIn returns public LinkedIn data as the same clean JSON: a person's profile, a company page, recent posts, job listings, or people search. Pick the surface with linkedin_type and pass a LinkedIn URL or keywords.

from langchain_crustapi import CrustAPILinkedIn

# Profile (default)
profile = CrustAPILinkedIn()
profile.invoke({"url": "https://www.linkedin.com/in/satyanadella"})

# People search, with each person's full profile in the same call
people = CrustAPILinkedIn(linkedin_type="search", enrich=True)
people.invoke({"keywords": "growth marketer saas"})

Parameters

CrustAPISearch

  • search_type: required. Choose maps, places, news, shopping, images, scholar or patents.
  • max_results: number of results to return (default 10).
  • gl: two-letter country code, e.g. us.
  • hl: two-letter language code, e.g. en.
  • location: city or region for local results, e.g. Austin, TX.

CrustAPILinkedIn

  • linkedin_type: profile (default), company, posts, jobs, search.
  • limit: max results for posts, jobs, or people search.
  • start: result offset for jobs.
  • location: location filter for jobs, e.g. Austin, TX.
  • enrich: people search only, return each person's full profile in the same call.
  • employees: company only, include the employee list.
  • comments: posts only, include comments.

profile, company, and posts take a url. search takes keywords. jobs takes keywords (plus optional location) or a job url.

The API key is read from the CRUSTAPI_API_KEY environment variable, or you can pass crustapi_api_key when constructing either tool.

Metadata

Release files for langchain-crustapi 0.3.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 langchain-crustapi 0.3.0
File Size Uploaded Provenance Actions
langchain_crustapi-0.3.0.tar.gz 6.1 kB With provenance Details for langchain_crustapi-0.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for langchain-crustapi 0.3.0
File Interpreter ABI Platform Actions
langchain_crustapi-0.3.0-py3-none-any.whl Python 3 none any Details for langchain_crustapi-0.3.0-py3-none-any.whl

Total release size: 15.1 kB

Release files / langchain_crustapi-0.3.0.tar.gz

Download URL langchain_crustapi-0.3.0.tar.gz
Size 6.1 kB
Tags Source
SHA-256 checksum
How to use checksums
c7bb158080963180e1d715b60398d798ae32c8cfea966980968c4652e3ef79cb
BLAKE2b-256 checksum
How to use checksums
7d78a78d3818ec89e8a4a137336420d3b7f2b72945d26c6a12bcbc61ff833c5f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 10, 2026.

Transparency log

Release files / langchain_crustapi-0.3.0-py3-none-any.whl

Download URL langchain_crustapi-0.3.0-py3-none-any.whl
Size 9.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f72b57591ad092de32c737758f399419401a6255bdebc720a0c2fbd5ad335485
BLAKE2b-256 checksum
How to use checksums
39ba0de34eb05ed4e2858f70ab9da2a4eb575108d79ca6301a68cb6596b93a00
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 10, 2026.

Transparency log

Security for langchain-crustapi 0.3.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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for langchain_crustapi-0.3.0.tar.gz

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 Nov 10, 2026.

Transparency log

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.

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