Feat/strands social media actor tools#458
Closed
daveomri wants to merge 39 commits into
Closed
Conversation
Made-with: Cursor
…-media-actor-tools
…-media-actor-tools
…ameters and validation
…-media-actor-tools
…ed details on input, usage, and examples.
…-media-actor-tools
fix: improve Apify tools docstrings with Apify context
…-media-actor-tools
…-media-actor-tools
This was referenced Apr 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR extends the Apify integration (
src/strands_tools/apify.py) with seven new social media tools that wrap popular Actors from Apify Store, giving agents structured access to Instagram, LinkedIn, Twitter/X, TikTok, and Facebook scraping.New tools
apify_instagram_scraperapify/instagram-scraperapify_linkedin_profile_postsapimaestro/linkedin-profile-postsapify_linkedin_profile_searchharvestapi/linkedin-profile-searchapify_linkedin_profile_detailapimaestro/linkedin-profile-detailapify_twitter_scraperapidojo/twitter-scraper-liteapify_tiktok_scraperclockworks/tiktok-scraperapify_facebook_posts_scraperapify/facebook-posts-scraperAll tools share the existing
ApifyToolClient, error handling, and Rich console output from the core module. A shared_social_media_resulthelper and a_extract_linkedin_usernameutility keep the implementations DRY.Two new export lists are added:
APIFY_SOCIAL_TOOLS— the seven social media toolsAPIFY_ALL_TOOLS—APIFY_CORE_TOOLS + APIFY_SOCIAL_TOOLSfor convenience (with a warning that exposing all tools at once may overwhelm the LLM)Files changed
src/strands_tools/apify.py@tool-decorated functions,_social_media_resultand_extract_linkedin_usernamehelpers, Actor ID constants, validation constants,APIFY_SOCIAL_TOOLSandAPIFY_ALL_TOOLSexportstests/test_apify.pydocs/apify_tool.mdREADME.mdPR series
feat/strands-core-apify-toolsapify_run_actor,apify_get_dataset_items,apify_run_actor_and_get_dataset,apify_run_task,apify_run_task_and_get_dataset,apify_scrape_urlfeat/strands-search-crawling-actor-toolsfeat/strands-social-media-actor-toolsRelated Issues
#456
#457
Documentation PR
strands-agents/docs#769
Type of Change
New Tool
Testing
Added unit tests for all seven social media tools, including:
search_query,results_typeandsearch_typevalidation, missing params errorprofile_scraper_modevalidationinclude_emailflagonly_posts_newer_thandate filter_extract_linkedin_username— URL parsing, trailing slash, bare username, non-profile URL fallbackRan
hatch run preparelocally — no warnings or lint issues.I ran
hatch run prepareChecklist
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.