Skip to main content

langchain-crustapi

This package connects CrustAPI to LangChain, giving your chains and agents clean, structured Google data from one endpoint (web search, Maps, News, Shopping, Images, Videos, 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

# Web search (default)
tool = CrustAPISearch(max_results=5)
tool.invoke({"query": "best crm software"})

# Pick a Google surface
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()])

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: the Google surface, web (default), news, maps, places, shopping, images, videos, scholar, 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.2.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.2.0
File Size Uploaded
langchain_crustapi-0.2.0.tar.gz 6.1 kB Details

Built distribution (wheel)

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

Total release size: 15.1 kB

Release files / langchain_crustapi-0.2.0.tar.gz

Download URL langchain_crustapi-0.2.0.tar.gz
Size 6.1 kB
Tags Source
SHA-256 checksum
How to use checksums
565c33ca292542666ef6fa2d5aee3bf2774eada2e2ad8969e34bd2f29ff5c138
BLAKE2b-256 checksum
How to use checksums
fac66db01b033a2c8da8fdc4ebc11d360285c8fc8af555d226b04d595cdfd599
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Jul 15, 2026.

Transparency log

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

Download URL langchain_crustapi-0.2.0-py3-none-any.whl
Size 9.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8f44d6b9d6770d68b01088c06dac85447a686b5d4f24c2f6ccbfb4ca37fbff45
BLAKE2b-256 checksum
How to use checksums
a12aea5339bc6d4413261f8591cde1706371e9efd2669f8a90306615d5694a6c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Jul 15, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.0

2 release files

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