apidojo-io/apidojo-skills

scraping-youtube-videos-by-keyword

Scrapes YouTube videos matching any keyword or search query using apidojo's YouTube scraper on Apify.

Zobacz źródło
Oryginalny dokument Skill

Treść z repozytorium z zachowaniem nagłówków, przykładów, kodu, tabel, linków i obrazów.

Scraping YouTube Videos by Keyword

Raw YouTube video dataset for any search query. Returns video-level metadata including engagement metrics and channel info.

Prerequisites

  • APIFY_TOKEN environment variable set
  • Optional: Apify MCP server installed

Inputs

ParameterTypeRequiredDefaultNotes
startUrlsarrayOptional[]YouTube URLs — channels, playlists, Shorts, search results
youtubeHandlesarrayOptional[]YouTube channel handles (e.g. @kurzgesagt)
getTrendingbooleanOptionalfalseRetrieve trending videos
keywordsarrayOptional[]Search keywords
glstringOptionalusCountry code for results (e.g. US, GB)
hlstringOptionalenLanguage code (e.g. en, de)
uploadDatestringOptionalallUpload date filter: any, hour, today, week, month, year
durationstringOptionalallDuration filter: any, short, long
featuresstringOptionalallFeature filter: 4k, hd, live, cc, 3d, hdr, etc.
sortstringOptionalrSort order for search results
maxItemsnumberOptionalUnlimitedMaximum videos to return
customMapFunctionstringOptionalJavaScript function to transform each output object

Workflow

Progress:
- [ ] Step 1: Build search query
- [ ] Step 2: Run youtube-scraper
- [ ] Step 3: Poll for SUCCEEDED
- [ ] Step 4: Deliver video dataset

Step 2: Run the Actor

Recommended — run_actor.js (handles waiting, output, and file saving automatically):

bash
# Quick answer (prints table to chat)
node scripts/run_actor.js \
  --actor "apidojo~youtube-scraper" \
  --input '{"param": "value"}'

# Save as CSV
node scripts/run_actor.js \
  --actor "apidojo~youtube-scraper" \
  --input '{"param": "value"}' \
  --output YYYY-MM-DD_results.csv --format csv

# Save as JSON
node scripts/run_actor.js \
  --actor "apidojo~youtube-scraper" \
  --input '{"param": "value"}' \
  --output YYYY-MM-DD_results.json --format json
APIFY_TOKEN must be set in environment or .env file.

If Apify MCP is available:

Tool: apify:run-actor
Actor: "apidojo~youtube-scraper"
Input:
{
  "searchKeywords": "<query>",
  "maxResults": 50,
  "sortBy": "relevance"
}

REST API fallback:

bash
curl -X POST \
  "https://api.apify.com/v2/acts/apidojo~youtube-scraper/runs?token=$APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"searchKeywords": "<query>", "maxResults": 50}'

Save id as RUN_ID. Poll until status = SUCCEEDED:

bash
curl "https://api.apify.com/v2/actor-runs/$RUN_ID?token=$APIFY_TOKEN" | grep '"status"'

Fetch results:

bash
curl "https://api.apify.com/v2/actor-runs/$RUN_ID/dataset/items?token=$APIFY_TOKEN&format=json"

Step 3: Handle Edge Cases

  • < 20 results: Query may be too narrow; broaden search term.
  • Age-restricted content in results: These may have limited metadata — flag rows with missing viewCount.
  • Duplicate video IDs: Deduplicate by videoId.

Output Format

# YouTube Video Dataset: "<query>"
Videos collected: N | Sort: <sortBy>

| Video ID | Title | Channel | Views | Likes | Comments | Duration | Published |
|----------|-------|---------|-------|-------|----------|----------|-----------|
| ...      | ...   | ...     | ...   | ...   | ...      | ...      | ...       |

Available fields: videoId, title, channelName, channelId, viewCount, likeCount,
commentCount, duration, publishedAt, videoUrl, thumbnailUrl, description

Troubleshooting

Fewer results than requested: YouTube search may have limited results for niche queries. Missing like counts: YouTube hides dislikes but likes are still available; some videos hide all counts.

z tego samego repozytorium

Więcej Skills

Wszystkie Skills
apidojo-io
Społeczność

building-twitter-prospect-lists

Builds targeted B2B prospect lists from Twitter/X profiles and posts using apidojo's Twitter scrapers on Apify. Triggers when the user asks to: find Twitter users with a specific job title or keyword in bio, build a list of founders or executives on Twitter, find people tweeting about a topic for outreach, identify potential customers on X, scrape Twitter profiles matching an ICP description, find decision-makers in a specific industry on Twitter, or export a list of leads from Twitter bios. Returns name, username, bio, follower count, location, and recent tweet samples per prospect. Ideal for B2B SDRs, growth hackers, founder-led sales teams, and partnership managers.

instalacje
1
GitHub Stars
0
Aktualizacja
13 maj
apidojo-io
Społeczność

extracting-google-paa-questions-for-seo

Extracts Google People Also Ask questions for SEO content planning using apidojo's Google Search scraper on Apify. Triggers when the user asks to: find People Also Ask questions on Google for SEO, extract PAA questions for keyword research, discover what questions Google shows for a topic, find long-tail SEO questions from Google, research FAQ content opportunities from Google SERP, build a list of questions to answer in blog content from Google, or extract Google autocomplete and PAA data for content planning. Returns PAA questions, SERP position, related keywords, and content structure recommendations. Ideal for SEO strategists, content writers, and blog editors building search-optimized content.

instalacje
1
GitHub Stars
0
Aktualizacja
13 maj
apidojo-io
Społeczność

extracting-tiktok-comments-for-research

Extracts and analyzes TikTok comments from any video or creator using apidojo's TikTok Comments scraper on Apify. Triggers when the user asks to: scrape TikTok comments from a video, analyze what viewers say about a TikTok post, extract comment data for sentiment analysis, find top comments on a viral TikTok video, collect TikTok user feedback from comments, build a dataset of TikTok community reactions, study audience sentiment on TikTok content, or research what a target audience cares about from TikTok comments. Returns commenter username, comment text, likes on comment, reply count, and timestamp. Ideal for market researchers, brand managers, content creators, and academic researchers.

instalacje
1
GitHub Stars
0
Aktualizacja
13 maj
apidojo-io
Społeczność

finding-speaking-opportunities-on-twitter

Finds speaking opportunities and event organizer contacts on Twitter using apidojo's Twitter scrapers. Triggers when the user asks to: find speaking opportunities on Twitter, discover conferences looking for speakers on X, find event organizers calling for speaker submissions, identify call-for-speakers announcements in an industry on Twitter, find podcast or summit hosts looking for guests, discover virtual event opportunities for thought leadership, or build a speaking opportunity pipeline from Twitter. Returns event name, organizer handle, topic focus, deadline signals, event size, and submission URL. Ideal for startup founders, executives, coaches, and consultants building thought leadership through speaking.

instalacje
1
GitHub Stars
0
Aktualizacja
13 maj