forked from strands-agents/docs
-
Notifications
You must be signed in to change notification settings - Fork 0
docs: implement apify documentation #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
daveomri
wants to merge
3
commits into
main
Choose a base branch
from
docs/create-apify-docs
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+102
−0
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,86 @@ | ||
| --- | ||
| project: | ||
| pypi: https://pypi.org/project/strands-apify/ | ||
| github: https://github.com/apify/strands-apify | ||
| maintainer: apify | ||
| service: | ||
| name: Apify | ||
| link: https://apify.com/ | ||
| title: strands-apify | ||
| community: true | ||
| description: "Web scraping, social media (Instagram, LinkedIn, Twitter/X, TikTok, Facebook), search (Google, Maps, YouTube), and e-commerce via Apify Actors." | ||
| integrationType: tool | ||
| languages: Python | ||
| sidebar: | ||
| label: "apify" | ||
| --- | ||
|
|
||
|
|
||
| [strands-apify](https://github.com/apify/strands-apify) gives your Strands agent web scraping, search, crawling, e-commerce, and social media capabilities through the [Apify platform](https://apify.com/) and its library of thousands of pre-built Actors. | ||
|
|
||
| ## Installation | ||
|
|
||
|
|
||
| ```bash | ||
| pip install strands-apify | ||
| ``` | ||
|
|
||
|
|
||
|
|
||
| ## Usage | ||
|
|
||
|
|
||
| ```python | ||
| from strands import Agent | ||
| from strands_apify import APIFY_CORE_TOOLS, APIFY_SEARCH_TOOLS, APIFY_SOCIAL_TOOLS | ||
|
|
||
| # Core: run any Actor, run saved tasks, fetch datasets, scrape a URL to markdown | ||
| agent = Agent(tools=APIFY_CORE_TOOLS) | ||
| agent("Scrape https://docs.apify.com and summarize the page") | ||
|
|
||
| # Search & crawling: Google, Maps, YouTube, multi-page crawling, e-commerce | ||
| agent = Agent(tools=APIFY_SEARCH_TOOLS) | ||
| agent("Find the top-rated Italian restaurants in Prague with reviews") | ||
|
|
||
| # Social media: Instagram, LinkedIn, Twitter/X, TikTok, Facebook | ||
| agent = Agent(tools=APIFY_SOCIAL_TOOLS) | ||
| agent("Scrape the top 10 posts for the hashtag #apify on Instagram") | ||
| ``` | ||
|
|
||
|
|
||
| Pick individual tools or mix tool sets for a smaller, more focused agent - LLMs select tools more accurately when fewer are in context: | ||
|
|
||
| ```python | ||
| from strands import Agent | ||
| from strands_apify import apify_scrape_url, apify_google_search_scraper, apify_instagram_scraper | ||
|
|
||
| agent = Agent(tools=[apify_scrape_url, apify_google_search_scraper, apify_instagram_scraper]) | ||
| agent("Search Google for 'example topic', scrape the top result, and find related Instagram posts") | ||
| ``` | ||
|
|
||
|
|
||
| ## Key Features | ||
|
|
||
| - **Core scraping & automation**: run any Apify Actor, execute saved tasks, fetch dataset items, and scrape single URLs to markdown | ||
| - **Search**: Google Search, Google Maps, and YouTube with structured results | ||
| - **Crawling**: multi-page website crawling with configurable depth and page limits | ||
| - **E-commerce**: product data from Amazon, eBay, Walmart, and other listing pages | ||
| - **Social media**: Instagram, LinkedIn (posts, search, profile detail), Twitter/X, TikTok, and Facebook | ||
| - **Three focused tool sets**: `APIFY_CORE_TOOLS` (6), `APIFY_SEARCH_TOOLS` (5), `APIFY_SOCIAL_TOOLS` (7), or `APIFY_ALL_TOOLS` (18, for prototyping) | ||
|
|
||
| ## Configuration | ||
|
|
||
|
|
||
| ```bash | ||
| APIFY_TOKEN=your_apify_token_here # Required | ||
| ``` | ||
|
|
||
|
|
||
| Get your Apify token at: [Apify Console > Settings > API & Integrations](https://console.apify.com/account/integrations) | ||
|
|
||
| ## Resources | ||
|
|
||
| - [PyPI Package](https://pypi.org/project/strands-apify/) | ||
| - [GitHub Repository](https://github.com/apify/strands-apify) | ||
| - [Apify Store](https://apify.com/store) | ||
| - [Apify API Reference](https://docs.apify.com/api/v2) | ||
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Question: This page is in the community/tools section but has
community: falsein the frontmatter. Should this becommunity: true?Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Setting
community: truerenders this banner at the top of the page:I set it to
falsebecause the Apify tool is different from the other entries in this section:strands-agents/toolsmonorepo, not in an external repo (as those with community: true)strands-agents-toolsPyPI package (pip install strands-agents-tools[apify])strands-deepgram,strands-hubspot,strands-teams) are all standalone third-party packages with their own repos and PyPI entriesThe page is under
community/tools/because that's the only section with the per-tool integration page format; no other monorepo tool has a dedicated page (Apify is special bcs of it amount of tools)