apidojo-io/apidojo-skills

scraping-youtube-comments

Scrapes comments from any YouTube video using apidojo's YouTube scraper on Apify.

Voir la source
Document Skill original

Rendu depuis le dépôt source en conservant titres, exemples, code, tableaux, liens et images.

Scraping YouTube Comments

Exports the full comment dataset from any YouTube video. Returns comment text, author, and engagement for downstream analysis.

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
customMapFunctionstringOptional—JavaScript function to transform each output object

Workflow

Progress:
- [ ] Step 1: Validate video URLs
- [ ] Step 2: Run youtube-scraper (comment mode)
- [ ] Step 3: Poll for SUCCEEDED
- [ ] Step 4: Deliver comment 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-comments-scraper" \
  --input '{"param": "value"}'

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

# Save as JSON
node scripts/run_actor.js \
  --actor "apidojo~youtube-comments-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-comments-scraper"
Input:
{
  "videoUrls": ["https://www.youtube.com/watch?v=<VIDEO_ID>"],
  "maxComments": 200,
  "includeReplies": false
}

REST API fallback:

bash
curl -X POST \
  "https://api.apify.com/v2/acts/apidojo~youtube-comments-scraper/runs?token=$APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"videoUrls": ["<url>"], "maxComments": 200}'

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

  • Comments disabled: Returns 0 — inform user.
  • Live streams: Comment data may be incomplete for live/premiere videos.
  • Deleted comments: May appear as empty text strings — filter out rows with text: "".

Output Format

# YouTube Comment Dataset
Video: <url> | Comments collected: N | Includes replies: YES/NO

| Comment ID | Author | Text | Likes | Replies | Timestamp |
|------------|--------|------|-------|---------|-----------|
| ...        | ...    | ...  | ...   | ...     | ...       |

Available fields: id, authorDisplayName, textDisplay, likeCount, totalReplyCount,
publishedAt, isReply, parentId

Troubleshooting

Comments disabled: Creator has turned off comments — cannot be retrieved. Truncated text: YouTube API may truncate very long comments; full text requires reply fetching.

du même dépôt

Autres Skills

Tous les Skills
apidojo-io
Communauté

scraping-tiktok-posts-by-location

Extracts TikTok posts tagged at a specific location using apidojo's TikTok Location Scraper on Apify. Triggers when the user asks to: get TikTok videos from a specific location, scrape TikTok posts tagged at a place, find TikTok content from a city or venue, collect TikTok videos geotagged at a location URL, export TikTok location-tagged content, or pull TikTok posts from a place page. Returns video title, views, likes, comments, shares, channel info, hashtags, and timestamp per post. Ideal for

installations
2
GitHub Stars
1
Mis à jour
13 mai
apidojo-io
Communauté

monitoring-google-news-coverage-for-brand

Monitors Google News coverage for a brand using apidojo's Google Search scraper on Apify. Triggers when the user asks to: track news coverage about a brand on Google, monitor press mentions in Google News, find recent news articles mentioning a company, track media coverage for a brand or executive, monitor competitor news coverage, find press releases or news stories about a brand on Google, or research how a company is being covered in the press. Returns article title, publication, date, URL,

installations
1
GitHub Stars
1
Mis à jour
13 mai
apidojo-io
Communauté

scraping-tweets-by-keyword

Scrapes tweets matching any keyword, hashtag, phrase, or boolean query using apidojo's Twitter Search scraper on Apify. Triggers when the user asks to: scrape tweets about a topic, fetch tweets containing a keyword or hashtag, export Twitter search results to a dataset, get all tweets mentioning a phrase, pull recent tweets for a search term, or collect tweet data for analysis or research. Returns tweet text, author, likes, retweets, replies, timestamp, and tweet URL per result. Ideal for resear

installations
1
GitHub Stars
1
Mis à jour
13 mai
apidojo-io
Communauté

scraping-tweets-from-account

Scrapes all tweets, replies, and media from any Twitter/X account using apidojo's Tweet scraper on Apify. Triggers when the user asks to: get all tweets from a Twitter account, export a user's tweet history, scrape a specific Twitter profile's posts, fetch the latest tweets from an account, download tweet data from a user timeline, or collect all posts from a Twitter username. Returns tweet text, likes, retweets, replies, media URLs, and timestamp per tweet. Ideal for journalists, researchers, c

installations
1
GitHub Stars
1
Mis à jour
13 mai