🤖 AI agent using mastra.ai with Apify MCP Server. 🚀 Runs queries via OpenAI models, taps Apify Actors for web data, and outputs to datasets. 🛠️
The Mastra AI Agent with Apify MCP Server is a generic AI agent designed to demonstrate the power of the mastra.ai framework when paired with the Apify MCP Server. This Actor leverages the Model Context Protocol (MCP) to connect AI-driven workflows with Apify’s extensive library of Actors, enabling seamless data extraction, web scraping, and task automation.
Built with TypeScript and the Apify SDK, this Actor serves as a flexible starting point for developers looking to create custom AI agents that tap into real-time web data and tools.
Scrape TikTok posts from a specific account and summarize key trends.
Example input:
1{ 2 "prompt": "Scrape the latest 10 posts from @techcrunch on TikTok and summarize key tech topics.", 3 "agentName": "TikTok Tech Analyzer", 4 "agentInstructions": "You are a tech analyst scraping TikTok posts to identify trends.", 5 "modelName": "gpt-4o-mini", 6 "actors": ["clockworks/free-tiktok-scraper"] 7}
Example output:
1{ 2 "prompt": "Scrape the latest 10 posts from @techcrunch on TikTok and summarize key tech topics.", 3 "response": "Here are the latest 10 posts from TechCrunch on TikTok, along with key tech topics summarized..." 4}
Search the web for a topic and distill top findings.
Example input:
1{ 2 "prompt": "Search the web for recent advances in quantum computing and explain the top 3 breakthroughs.", 3 "agentName": "Quantum Research Bot", 4 "agentInstructions": "You are a research assistant that scours the web for technical info.", 5 "modelName": "gpt-4o", 6 "actors": ["apify/rag-web-browser"] 7}
Example output:
1{ 2 "prompt": "Search the web for recent advances in quantum computing and explain the top 3 breakthroughs.", 3 "response": "Here are the top three recent advances in quantum computing as of 2025..." 4}
Tweak the input and create your own AI agent to tackle your use case! 🚀
gpt-4o
, gpt-4o-mini
).clockworks/free-tiktok-scraper
and more.📥 Input
gpt-4o
or gpt-4o-mini
)["clockworks/free-tiktok-scraper"]
) - list of Apify Actors to be served by the MCP server for the agent🤖 Processing with Mastra
📤 Output
This Actor uses the Pay Per Event (PPE) model for cost-effective, usage-based pricing.
Event | Price (USD) |
---|---|
Actor start | $0.10 |
Task completion | $0.40 |
1{ 2 "prompt": "Analyze the posts of @openai and summarize current trends in AI.", 3 "agentName": "Social Media Analyst", 4 "agentInstructions": "You are a social media analyst who specializes in analyzing posts from various social media platforms.", 5 "modelName": "gpt-4o-mini", 6 "actors": ["clockworks/free-tiktok-scraper"] 7}
Dataset entry:
1{ 2 "prompt": "Analyze the posts of @openai and summarize current trends in AI.", 3 "response": "Here’s a summary of the recent posts from OpenAI's account, highlighting current trends in AI..." 4}
This Actor uses the mastra.ai framework to create a generic AI agent that interacts with the Apify ecosystem:
Expandable to any Apify Actor from the Apify Store via the MCP Server configuration.
apify push
OPENAI_API_KEY
environment variable.npm install
OPENAI_API_KEY=<your-openai-api-key> apify run -i '{"prompt": "Show me latest post from @openai TikTok profile", "actors": ["clockworks/free-tiktok-scraper"]}'
Ready to build your own AI agent? Deploy this Actor on Apify, tweak the input, and explore the possibilities of mastra.ai and MCP! 🤖✨
This Actor is open-source, hosted on GitHub. Want to add features? Open an issue or submit a pull request!
Yes, if you're scraping publicly available data for personal or internal use. Always review Websute's Terms of Service before large-scale use or redistribution.
No. This is a no-code tool — just enter a job title, location, and run the scraper directly from your dashboard or Apify actor page.
It extracts job titles, companies, salaries (if available), descriptions, locations, and post dates. You can export all of it to Excel or JSON.
Yes, you can scrape multiple pages and refine by job title, location, keyword, or more depending on the input settings you use.
You can use the Try Now button on this page to go to the scraper. You’ll be guided to input a search term and get structured results. No setup needed!