Documentation Index
Fetch the complete documentation index at: https://langchain-5e9cc07a-preview-fjmorr-1778259990-38b7dcc.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Perplexity is the most powerful way to search the internet with unlimited Pro Search, upgraded AI models, unlimited file upload, image generation, and API credits.
Installation and setup
Install the Perplexity integration package for LangChain JavaScript:PERPLEXITY_API_KEY environment variable. See the Perplexity getting started guide for more details.
Chat model
See a usage example.Retriever
You can use thePerplexitySearchRetriever to fetch web search results from the Perplexity Search API as Document objects in a standard retrieval pipeline.
See a usage example.
Tools
You can use Perplexity as an agent tool to give your agent access to the Perplexity Search API. See a usage example.PerplexitySearchResults
A tool that queries the Perplexity Search API and returns a JSON array of results (title, URL, snippet, date, last updated).Components reference
| Class | Abstraction | Import path | Description |
|---|---|---|---|
ChatPerplexity | Chat model | import { ChatPerplexity } from "@langchain/perplexity" | Chat model wrapping the Perplexity API for grounded chat completions. |
PerplexitySearchRetriever | Retriever | import { PerplexitySearchRetriever } from "@langchain/perplexity" | Retriever that returns Document objects from the Perplexity Search API. |
PerplexitySearchResults | Tool | import { PerplexitySearchResults } from "@langchain/perplexity" | Tool that returns Perplexity Search API results as a JSON array for agents. |
Connect these docs to Claude, VSCode, and more via MCP for real-time answers.

