Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
63 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
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
06bf2f6
feat: implement social actors tools methods in _client.py
daveomri Apr 27, 2026
15863e5
feat: implement unit tests
daveomri Apr 27, 2026
cde433b
feat: implement input schemas for new tools
daveomri Apr 27, 2026
02bd034
feat: implement instagram scraper tool
daveomri Apr 27, 2026
5fb5530
feat: implement linkedin profile posts tool
daveomri Apr 27, 2026
d860e22
feat: implement linkedin profi search tool
daveomri Apr 27, 2026
d5ab9ef
feat: implement linkedin profile detail tool
daveomri Apr 27, 2026
f55a24d
feat: implement twitter scraper tool
daveomri Apr 27, 2026
e638c44
feat: implement tiktok scraper tool
daveomri Apr 27, 2026
f1c608e
feat: implement facebook posts scraper tool
daveomri Apr 27, 2026
960e9de
feat: implement unit tests for new tools
daveomri Apr 27, 2026
a34c619
feat: implement init to import new social tools
daveomri Apr 27, 2026
6e8c693
feat: fix circural reference issue
daveomri Apr 27, 2026
ff4cca2
fix: lint fixes
daveomri Apr 27, 2026
35de3d1
docs: add line for llm not to halucinate missing data
daveomri Apr 27, 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
23242c1
revert: restore env-fallback
daveomri Apr 28, 2026
0c7f45b
Merge branch 'feat/modernize-langchain-integration-core-tools' into f…
daveomri Apr 28, 2026
df2a412
fix: typo in social tool descriptions (halucinate to hallucinate)
daveomri Apr 28, 2026
5ce6674
test: parametrize RuntimeError to ToolException across all 7 social t…
daveomri Apr 28, 2026
832c4df
test: parametrize empty-dataset coverage across all 7 social tools
daveomri Apr 28, 2026
9282022
feat: include statusMessage in actor-run-failed RuntimeError
daveomri Apr 28, 2026
6f63431
fix: lint fix
daveomri Apr 28, 2026
238d803
feat: add sort param to twitter tool
daveomri Apr 30, 2026
350faa8
feat: add older then param to facebook tool
daveomri Apr 30, 2026
702891d
feaet: add search_type param to tiktok tool
daveomri Apr 30, 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
69 changes: 67 additions & 2 deletions langchain_apify/__init__.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,84 @@
from __future__ import annotations

from importlib import metadata
from typing import TYPE_CHECKING

from langchain_apify._actor_tools import (
ApifyFacebookPostsScraperTool,
ApifyInstagramScraperTool,
ApifyLinkedInProfileDetailTool,
ApifyLinkedInProfilePostsTool,
ApifyLinkedInProfileSearchTool,
ApifyTikTokScraperTool,
ApifyTwitterScraperTool,
)
from langchain_apify.document_loaders import ApifyDatasetLoader
from langchain_apify.tools import ApifyActorsTool
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_SOCIAL_TOOLS: list[type[BaseTool]] = [
ApifyInstagramScraperTool,
ApifyLinkedInProfilePostsTool,
ApifyLinkedInProfileSearchTool,
ApifyLinkedInProfileDetailTool,
ApifyTwitterScraperTool,
ApifyTikTokScraperTool,
ApifyFacebookPostsScraperTool,
]

__all__ = [
# Existing components (backward-compatible)
'ApifyActorsTool',
'ApifyDatasetLoader',
'ApifyWrapper',
# Core generic tools
'ApifyGetDatasetItemsTool',
'ApifyRunActorAndGetDatasetTool',
'ApifyRunActorTool',
'ApifyRunTaskAndGetDatasetTool',
'ApifyRunTaskTool',
'ApifyScrapeUrlTool',
# Social media Actor tools
'ApifyFacebookPostsScraperTool',
'ApifyInstagramScraperTool',
'ApifyLinkedInProfileDetailTool',
'ApifyLinkedInProfilePostsTool',
'ApifyLinkedInProfileSearchTool',
'ApifyTikTokScraperTool',
'ApifyTwitterScraperTool',
# Tool group lists
'APIFY_CORE_TOOLS',
'APIFY_SOCIAL_TOOLS',
# Meta
'__version__',
]
Loading
Loading