- apify tool: TOOL.md definition, index.ts implementation with auto-auth via OFFICER_APIFY_TOKEN, output_path for large datasets - tools API: /tools routes (list, detail, chat, create, delete) mirroring tasks pattern - automation UI: tools tab in sidebar, NewTool component, tool detail view - apify integration: settings page for enterprise API key config, pi-bridge passes env var to containers - tiktok-trends task: rewritten as agent instructions using apify tool with output_path, scripted report generation for 50KB read limit - restrict edit/delete of native/global capabilities to Super Admin only (backend + frontend) - tools authoring guide: TOOLS.md with full spec for TOOL.md frontmatter, index.ts execute signature, patterns Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
3.5 KiB
3.5 KiB
name, label, version, description, language, inputs
| name | label | version | description | language | inputs | ||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| apify | Apify | 4 | Run any Apify actor and return its dataset results. Use for web scraping, data extraction, and automation — TikTok, Twitter, Facebook, Instagram, YouTube, Google, and hundreds more. Authentication is handled automatically when configured in Settings → Integrations. | typescript |
|
Apify
Run any actor from the Apify Store, wait for completion, and return the dataset items as JSON.
Authentication
The API token is resolved automatically:
api_tokeninput parameter (explicit override)OFFICER_APIFY_TOKENenvironment variable (set automatically when configured in Settings → Integrations → Apify)
If neither is available, the tool returns an error prompting the user to configure the integration.
Usage
Just provide the actor_id and optional input:
apify(actor_id: "novi~fast-tiktok-scraper", input: { type: "TREND", region: "PT", maxItems: 20 })
The tool starts the actor, polls until completion, fetches the dataset, and returns all items as JSON.
Common Actors
| Actor | ID | Input example |
|---|---|---|
| TikTok Scraper | novi~fast-tiktok-scraper |
{ type: 'TREND', region: 'US', maxItems: 20 } |
| Twitter Scraper | apify/twitter-scraper |
{ searchTerms: ['#ai'], tweetsCount: 100 } |
| Twitter User | jupri/twitter-user-scraper |
{ twitterUser: 'username', maxPosts: 50 } |
| Facebook Scraper | apify/facebook-scraper |
{ startUrls: ['https://facebook.com/Page'], maxPostsPerPage: 50 } |
| Facebook Search | jupri/facebook-search-scraper |
{ searchTerm: 'keyword', maxPosts: 30 } |
| Instagram Hashtag | apify/instagram-hashtag-scraper |
{ hashtags: ['travel'], resultsLimit: 50 } |
| Instagram User | apify/instagram-user-scraper |
{ usernames: ['natgeo'], resultsLimit: 50 } |
| YouTube Scraper | apify/youtube-scraper |
{ searchTerms: ['tutorial'], maxResults: 20 } |
| Google Search | apify/google-search-scraper |
{ queries: ['best restaurants lisbon'] } |
Error Handling
The tool returns clear error messages for:
- Missing API token → "Configure it in Settings → Integrations → Apify"
- API errors (401, 403, etc.) → includes the HTTP status and response body
- Actor failures → includes the actor's
statusMessage - Timeouts → reports the run ID and last known status
Notes
- Actor IDs use
~(Apify URL format) or/— both work - Browse actors at https://apify.com/store
- Monitor usage and credits at https://console.apify.com/billing