Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
78 commits
Select commit Hold shift + click to select a range
8cad430
feat: implement apifyclient wrapper
daveomri Apr 20, 2026
2404b9c
feat: removed redundant const file
daveomri Apr 20, 2026
b1a89a4
feat: add few more input schemas, helpers and tool classes
daveomri Apr 20, 2026
0aa9175
feat: export new tools from __init__
daveomri Apr 20, 2026
4e46d36
feat: add unit tests
daveomri Apr 20, 2026
fc6ef12
feat: implement tests and introduce tools list
daveomri Apr 21, 2026
cc5be9e
fix: lint fix
daveomri Apr 21, 2026
c2b9cb6
feat: enhance error handling and documentation for apify tools
daveomri Apr 21, 2026
3edf126
fix: iso format fix
daveomri Apr 21, 2026
8c36edc
feat: add apify run task and apify run task and get items tools with …
daveomri Apr 21, 2026
026175a
feat: introduce _ApifyGenericTool base class for Apify tools to strea…
daveomri Apr 21, 2026
110c971
feat: add _actor_tools.py file to define upcomming search and social …
daveomri Apr 21, 2026
a08f63e
fix: add try/except to match others
daveomri Apr 21, 2026
d028531
fix: update timeout constants and improve input schema descripiton in…
daveomri Apr 21, 2026
429a3ed
fix: enhance error handling for missing dataset id in run_actor and r…
daveomri Apr 21, 2026
b914e47
fix: update apifygetdatasetitemstool to return a json object with ite…
daveomri Apr 21, 2026
0f71181
feat: add integration smoke tests for generic Apify tools to validate…
daveomri Apr 21, 2026
50c52f2
feat: implement clamping for timeout, memory, and item limits in apif…
daveomri Apr 21, 2026
ba179a6
feat: clean up _actor_tools.py and tools.py for improved readibility …
daveomri Apr 22, 2026
da900ce
feat: add three new tools to _client.py
daveomri Apr 22, 2026
ff6ffeb
feat: implement apifygooglesearchtool and apifywebcrawlertool
daveomri Apr 22, 2026
6e8888c
feat: implement a apify search retrievel
daveomri Apr 22, 2026
b124ce1
feat: add apify crawl loader to document_loaders.py
daveomri Apr 22, 2026
029b9e1
feat: update __init__
daveomri Apr 22, 2026
c7ee287
feat: add unit tests
daveomri Apr 22, 2026
ec60765
feat: add actor tools unit tests
daveomri Apr 22, 2026
c077186
feat: add retrievers unit tests
daveomri Apr 22, 2026
0b4ecbb
feat: simplify apify crawl loader init and enhance unit tests
daveomri Apr 22, 2026
005294b
ref: align private scope conventions with langchain partner package s…
daveomri Apr 22, 2026
2f74c29
ref: migrate auth to SecretStr + secret_from_env pattern
daveomri Apr 23, 2026
6258b2b
fix: backward-compat fix
daveomri Apr 23, 2026
2905b67
fix: update stale doc string
daveomri Apr 23, 2026
3238c02
chore: removed redundant file
daveomri Apr 23, 2026
92df406
fix: extracted repeated code, fixed secretstr compatibility to apifyt…
daveomri Apr 23, 2026
3a0f666
fix: set min value to timeout, memory and items, add exlude and repr …
daveomri Apr 23, 2026
8614cfd
feat: added repr and exclude to apify api token
daveomri Apr 23, 2026
2bf130a
feat: add type checking to apify core tools list
daveomri Apr 23, 2026
98293d4
feat: add tests for clamped values and apify api token
daveomri Apr 23, 2026
863ed8d
fix: lint fix
daveomri Apr 23, 2026
70527e0
ref: update apify_api_token type to support SecretStr in document loa…
daveomri Apr 24, 2026
797b7f9
Merge branch 'feat/modernize-langchain-integration-core-tools' into f…
daveomri Apr 24, 2026
f005bc5
fix: turn off logger for ApifySearchRetrieval
daveomri Apr 24, 2026
dd08098
fix: fix lint errors
daveomri Apr 24, 2026
2804a5c
fix: tests fix
daveomri Apr 24, 2026
ea8b16e
chore: rename tools to match the task description
daveomri Apr 28, 2026
cd1eea1
fix: narrow except blocks in _client.py to SDK/transport errors
daveomri Apr 28, 2026
50c3583
fix: clamp memory_mbytes to Apify platform minimum (128 MB)
daveomri Apr 28, 2026
450728c
fix: narrow empty-dataset message in ApifyGetDatasetItemsTool
daveomri Apr 28, 2026
1360e92
ref: simplify ApifyToolsClient.__init__ to require explicit token
daveomri Apr 28, 2026
09b6c6e
docs: add module-level docstring to tools.py
daveomri Apr 28, 2026
a5bd7cc
ref: rename model_post_init parameter to
daveomri Apr 28, 2026
e0f15e8
Merge branch 'feat/modernize-langchain-integration-core-tools' into f…
daveomri Apr 28, 2026
23242c1
revert: restore env-fallback
daveomri Apr 28, 2026
8f9afe6
Merge branch 'feat/modernize-langchain-integration-core-tools' into f…
daveomri Apr 28, 2026
7ea3e8c
chore: drop placeholder section in _actor_tools.py
daveomri Apr 28, 2026
700e5ab
chore: align APIFY_ACTOR_TOOLS type hint with APIFY_CORE_TOOLS
daveomri Apr 28, 2026
c0dd11e
feat: constrain crawler_type to a Literal of valid Apify values
daveomri Apr 28, 2026
0189943
feat: clamp max_crawl_depth in ApifyWebCrawlerTool
daveomri Apr 28, 2026
6d2422d
feat: expose timeout_secs in ApifyGoogleSearchInput
daveomri Apr 28, 2026
2dfecd7
ref: accept SecretStr token in ApifyCrawlLoader
daveomri Apr 28, 2026
9c81785
docs: clarify ApifyCrawlLoader.lazy_load is not truly lazy
daveomri Apr 28, 2026
49dd4f0
ref: rewrite ApifySearchRetriever to use ApifyToolsClient
daveomri Apr 28, 2026
a060c14
fix: normalise locale codes to lowercase to match Apify Actor schema
daveomri Apr 28, 2026
a908467
fix: extract source URL from metadata.url for apify/rag-web-browser
daveomri Apr 28, 2026
b2290a7
feat: add Search & Crawling helpers to ApifyToolsClient (rag_web_brow…
daveomri Apr 29, 2026
c4d133b
feat: cover input mapping and enum validation for new ApifyToolsClien…
daveomri Apr 29, 2026
f5dd607
feat: add ApifyRAGWebBrowserTool, ApifyGoogleMapsTool, ApifyYouTubeSc…
daveomri Apr 29, 2026
5368645
feat: expose search tools and APIFY_SEARCH_TOOLS from langchain_apify
daveomri Apr 29, 2026
1392e0b
test: cover search tools (happy path + parametrized error / empty / h…
daveomri Apr 29, 2026
45a62d1
fix: lint fix
daveomri Apr 29, 2026
3db07fb
fix: send correct detailsUrls/maxProductResults to apify/e-commerce-s…
daveomri Apr 29, 2026
c973123
fix: return flat [{url,title,content}] array per spec
daveomri Apr 30, 2026
6b825af
feat: support category URLs via url_type parameter
daveomri Apr 30, 2026
ddb4373
fix: use listingUrls (not categoryUrls) for category-mode
daveomri Apr 30, 2026
c5607d8
fix: use canonical searchQueries (array) field, not searchKeywords
daveomri Apr 30, 2026
250e1ac
fix: rename actor search group
daveomri May 5, 2026
f4cf20e
fix: test fix
daveomri May 5, 2026
1c7aa14
fix: merge tools
daveomri May 5, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 72 additions & 3 deletions langchain_apify/__init__.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,88 @@
from __future__ import annotations

from importlib import metadata
from typing import TYPE_CHECKING

from langchain_apify.document_loaders import ApifyDatasetLoader
from langchain_apify.tools import ApifyActorsTool
from langchain_apify._actor_tools import (
ApifyEcommerceScraperTool,
ApifyGoogleMapsTool,
ApifyGoogleSearchTool,
ApifyRAGWebBrowserTool,
ApifyWebCrawlerTool,
ApifyYouTubeScraperTool,
)
from langchain_apify.document_loaders import ApifyCrawlLoader, ApifyDatasetLoader
from langchain_apify.retrievers import ApifySearchRetriever
from langchain_apify.tools import (
ApifyActorsTool,
ApifyGetDatasetItemsTool,
ApifyRunActorAndGetDatasetTool,
ApifyRunActorTool,
ApifyRunTaskAndGetDatasetTool,
ApifyRunTaskTool,
ApifyScrapeUrlTool,
)
from langchain_apify.wrappers import ApifyWrapper

if TYPE_CHECKING:
from langchain_core.tools import BaseTool

try:
__version__ = metadata.version(__package__)
except metadata.PackageNotFoundError:
# Case where package metadata is not available.
__version__ = ''
del metadata # optional, avoids polluting the results of dir(__package__)

# Convenience tool-class lists for selective agent binding.
# Binding all tools at once overwhelms the LLM context window;
# pick the group(s) relevant to your use case.

APIFY_CORE_TOOLS: list[type[BaseTool]] = [
ApifyRunActorTool,
ApifyGetDatasetItemsTool,
ApifyRunActorAndGetDatasetTool,
ApifyScrapeUrlTool,
ApifyRunTaskTool,
ApifyRunTaskAndGetDatasetTool,
]

APIFY_SEARCH_TOOLS: list[type[BaseTool]] = [
ApifyGoogleSearchTool,
ApifyWebCrawlerTool,
ApifyRAGWebBrowserTool,
ApifyGoogleMapsTool,
ApifyYouTubeScraperTool,
ApifyEcommerceScraperTool,
]

__all__ = [
# Existing components (backward-compatible)
'ApifyActorsTool',
'ApifyDatasetLoader',
'ApifyWrapper',
# Core generic tools
'ApifyGetDatasetItemsTool',
'ApifyRunActorAndGetDatasetTool',
'ApifyRunActorTool',
'ApifyRunTaskAndGetDatasetTool',
'ApifyRunTaskTool',
'ApifyScrapeUrlTool',
# Actor-specific tools
'ApifyGoogleSearchTool',
'ApifyWebCrawlerTool',
# Search & Crawling Actor tools
'ApifyEcommerceScraperTool',
'ApifyGoogleMapsTool',
'ApifyRAGWebBrowserTool',
'ApifyYouTubeScraperTool',
# Retriever
'ApifySearchRetriever',
# Loaders
'ApifyCrawlLoader',
# Tool group lists
'APIFY_SEARCH_TOOLS',
'APIFY_CORE_TOOLS',
'APIFY_SEARCH_TOOLS',
# Meta
'__version__',
]
Loading
Loading