Scrape social media platforms such as Youtube and Tiktok, powered by Go.
git clone https://github.com/dohnj0e/snagtag.gitsnagtag is an innovative Claude Code skill designed for marketers looking to scrape valuable data from social media platforms such as YouTube and TikTok. Powered by Go, this skill enables users to automate the extraction of relevant content and insights, streamlining the data collection process. With an intermediate complexity level, snagtag can be implemented in approximately 30 minutes, making it a practical choice for those wanting to enhance their marketing strategies with data-driven insights. The key benefits of snagtag include its ability to save time by automating the tedious process of manual data scraping. By utilizing this skill, marketers can focus on analyzing the data rather than spending hours collecting it. While specific time savings are currently unknown, the efficiency gained from automating social media scraping can significantly enhance productivity and allow for quicker decision-making in marketing campaigns. This skill is particularly beneficial for developers, product managers, and AI practitioners who are involved in marketing departments or GTM strategies. By leveraging snagtag, these professionals can gain insights into trending topics, audience engagement, and competitor analysis, all of which are crucial for effective marketing strategies. For example, a product manager could use snagtag to gather data on customer feedback from TikTok videos, enabling them to make informed product adjustments. Implementing snagtag requires an intermediate understanding of automation and coding, making it suitable for users with some experience in AI automation and workflow automation. As part of an AI-first workflow, snagtag allows users to integrate social media data scraping seamlessly into their marketing processes, enhancing the overall effectiveness of their AI agent skills. By adopting this skill, marketers can ensure they stay ahead in the rapidly evolving digital landscape.
[{"step":1,"action":"Install and configure snagtag. Run `go install github.com/username/snagtag@latest` to install the Go-based scraper. Configure API keys or authentication tokens for the target platforms (e.g., TikTok, YouTube) in the `config.yaml` file.","tip":"Use environment variables for sensitive credentials to avoid hardcoding them in the configuration file."},{"step":2,"action":"Define your scraping parameters. Specify the platform (`--platform`), topic or keyword (`--keyword`), and data fields (`--fields`) in the command line. For example: `snagtag --platform tiktok --keyword \"AI marketing tools\" --fields \"url,title,views,likes,hashtags\" --timeframe 30d`.","tip":"Start with a small time frame (e.g., 7 days) to test the tool before scaling up to larger datasets."},{"step":3,"action":"Execute the scrape and handle rate limits. Run the command and monitor the output for any rate limit warnings. If encountered, adjust the `--delay` parameter (default is 2 seconds) or implement proxy rotation by adding `--proxy \"http://proxy-ip:port\"`.","tip":"Use tools like `curl` or `Postman` to test API endpoints before running the full scrape, ensuring your authentication is working."},{"step":4,"action":"Process and analyze the output. Save the results to a file (e.g., `--output data.json`) and import it into your preferred analytics tool (e.g., Python with Pandas, Excel, or Google Sheets). Filter and sort the data to extract insights, such as top-performing hashtags or videos with the highest engagement rates.","tip":"Automate the process by scheduling the scrape using cron jobs (Linux/macOS) or Task Scheduler (Windows) to run daily or weekly."},{"step":5,"action":"Refine and iterate. Based on the initial results, adjust your scraping parameters (e.g., narrow down keywords or expand the time frame) to gather more targeted data. Use the insights to inform your marketing strategy, such as identifying trends or gaps in competitor content.","tip":"Combine scraped data with other tools (e.g., sentiment analysis APIs) to gain deeper insights into audience preferences."}]
No install command available. Check the GitHub repository for manual installation instructions.
git clone https://github.com/dohnj0e/snagtagCopy the install command above and run it in your terminal.
Launch Claude Code, Cursor, or your preferred AI coding agent.
Use the prompt template or examples below to test the skill.
Adapt the skill to your specific use case and workflow.
Scrape [SOCIAL_MEDIA_PLATFORM] for [SPECIFIC_DATA_TYPE] related to [TOPIC_OR_KEYWORD]. Extract the following fields: [FIELDS_TO_EXTRACT]. Filter results to include only content published in the last [TIME_FRAME]. Save the data in [OUTPUT_FORMAT] format. Use Go-based snagtag for efficient scraping and avoid rate limits by implementing [RATE_LIMIT_STRATEGY].
```json
{
"results": [
{
"platform": "TikTok",
"video_id": "7098234567890123456",
"url": "https://www.tiktok.com/@username/video/7098234567890123456",
"title": "Top 5 AI Tools for Marketers in 2024",
"description": "These tools will revolutionize your marketing workflow! #AI #MarketingTools",
"author": "@marketingguru",
"publish_date": "2024-05-15T14:30:00Z",
"views": 45200,
"likes": 3200,
"shares": 120,
"comments": 450,
"hashtags": ["#AI", "#MarketingTools", "#2024"],
"engagement_rate": 7.8
},
{
"platform": "YouTube",
"video_id": "dQw4w9WgXcQ",
"url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
"title": "How to Build a Viral Marketing Campaign",
"description": "Learn the secrets behind viral campaigns with real-world examples.",
"author": "Marketing Insights",
"publish_date": "2024-05-10T09:15:00Z",
"views": 125000,
"likes": 8900,
"dislikes": 200,
"comments": 1280,
"engagement_rate": 7.2
}
],
"summary": {
"total_videos": 2,
"total_views": 170200,
"average_engagement_rate": 7.5,
"platforms_scraped": ["TikTok", "YouTube"],
"data_collection_time": "2024-05-16T10:45:00Z"
}
}
```
The snagtag tool successfully scraped 2 videos from TikTok and YouTube within 5 minutes, capturing key metrics like views, engagement rates, and hashtags. The data is structured in JSON format for easy integration with analytics tools or marketing dashboards. The engagement rates were calculated by dividing total interactions (likes + shares + comments) by views, providing a normalized metric for comparison. The tool avoided rate limits by implementing a 2-second delay between requests and rotating user agents. This output can now be used to identify trending topics, analyze competitor content, or inform future campaign strategies.Take a free 3-minute scan and get personalized AI skill recommendations.
Take free scan