Skip to content

docs: update langchain docs#2683

Open
daveomri wants to merge 1 commit into
apify:masterfrom
daveomri:docs/update-langchain-docs
Open

docs: update langchain docs#2683
daveomri wants to merge 1 commit into
apify:masterfrom
daveomri:docs/update-langchain-docs

Conversation

@daveomri

@daveomri daveomri commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Expands the LangChain integration page with the dedicated Actor tools shipped in langchain-apify (the three APIFY_*_TOOLS sets, direct tool invocation, agent binding, RAG retrieval, and a full tool reference). Also bumps the examples to APIFY_TOKEN and gpt-5-mini.

Warning

Do not merge yet. These tools depend on the new langchain-apify release — hold until that package is published, then verify the imports and tool names against the shipped version.

@daveomri daveomri marked this pull request as ready for review June 26, 2026 12:00
@daveomri daveomri requested a review from marcel-rbro as a code owner June 26, 2026 12:00
@@ -38,7 +39,7 @@ Find your [Apify API token](https://console.apify.com/settings/integrations) and

```python
os.environ["OPENAI_API_KEY"] = "Your OpenAI API key"
os.environ["APIFY_API_TOKEN"] = "Your Apify API token"
os.environ["APIFY_TOKEN"] = "Your Apify API token"
```

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this a verified change? The langchain readme (https://github.com/apify/langchain-apify) still uses APIFY_API_TOKEN.


## Tool reference

Every dedicated tool below is importable from `langchain_apify`. For full parameter tables, see the [LangChain Apify provider page](https://docs.langchain.com/oss/python/integrations/providers/apify).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The list of parameters is currently not on the langchain docs page. Will it be published sometime later?

@@ -2,6 +2,7 @@
title: 🦜🔗 LangChain integration
sidebar_label: LangChain
description: Learn how to integrate Apify with LangChain to feed vector databases and large language models with web data crawled from the web using Actors.
sidebar_position: 5
slug: /integrations/langchain
---

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

General question: is it worth it to include a link to the langchain-apify repo anywhere?

https://github.com/apify/langchain-apify


To let a model decide when to call the tools, bind a tool list to an agent. The example below uses LangGraph's prebuilt ReAct agent, so install it alongside the previous dependencies:

`pip install langgraph`

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make this a code block as well

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
This allows you to either crawl and scrape top pages from Google Search results or directly scrape text content from a URL and return it as markdown.


A model selects tools based on their names and descriptions. The more tools you register, the larger the decision space, which can lead to wrong tool selection, slower responses, and higher token usage. Register only the tools your agent needs.

Each list holds tool **classes**, so instantiate them before passing them to an agent. There are three ways to compose your tool list:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bold for UI elements only

Suggested change
Each list holds tool **classes**, so instantiate them before passing them to an agent. There are three ways to compose your tool list:
Each list holds tool *classes*, so instantiate them before passing them to an agent. There are three ways to compose your tool list:


Web search, crawling, and platform-specific search.

- `ApifyGoogleSearchTool` - structured Google search results. Wraps [apify/google-search-scraper](https://apify.com/apify/google-search-scraper).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- `ApifyGoogleSearchTool` - structured Google search results. Wraps [apify/google-search-scraper](https://apify.com/apify/google-search-scraper).
- `ApifyGoogleSearchTool` - structured Google Search results. Wraps [apify/google-search-scraper](https://apify.com/apify/google-search-scraper).

tool = ApifyActorsTool("apify/rag-web-browser")
result = tool.invoke({"run_input": {"query": "latest AI news", "maxResults": 3}})
```

<ThirdPartyDisclaimer />

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was now moved way down on the page. Move is somewhere to the beginning of the page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants