This repo shows how to call the YouTube Shorts Sponsorship Signals Scraper from Node.js with the official apify-client. Your service posts a list of channel handles, Apify does the listing, metadata and transcript work in the cloud, and you receive plain objects: one per Short, each with a numeric score, a boolean verdict, the phrases that triggered it and any brand tokens found. That shape fits a brand-safety dashboard, an influencer CRM or a Slack bot that pings the partnerships team when a competitor shows up in someone's vertical videos. The script also writes results.json and results.csv for quick inspection.
Actor: YouTube Shorts Sponsorship Signals Scraper Β· Publisher: Devil Scrapes Β· Also in Python: youtube-shorts-scraper-python
- Speech is read, not just captions: for each Short the Actor pulls the spoken transcript (your
languagefirst, English second) and searches it together with the title and description, because a Short's description box is frequently blank. - A score you can recompute by hand: strong phrases such as
use codeadd 0.5, softer ones such aslink in bioadd 0.15, a disclosure hashtag like#adadds 0.4 and each@handleor shop-style domain in the description adds 0.1. The sum is capped at 1.0 and 0.5 or higher setsis_likely_sponsored. - Evidence on every row:
sponsorship_signalsholds the exact strings that matched, so a reviewer checks a verdict in seconds instead of rewatching the clip. - Brand tokens pulled out:
detected_brandscollects description handles, domains and the word right aftersponsored byorcode; that last kind is taken from lowercased text, so expectnordvpnrather thanNordVPN. - Silent Shorts still count: a clip without captions yields a row with
has_transcriptfalse, scored only on its written text. - Filter before you pay: Shorts under
minSponsorshipScoreare dropped inside the run and never charged. - Many handles in one run: a channel that cannot be listed is logged and skipped while the others continue.
Run the Actor nightly from a scheduled function over the creators in your category and send any object whose detected_brands includes a rival's name to a webhook. The partnerships team hears about a new deal the morning after it airs.
When an influencer applies through your platform, kick off a run for their handle from the signup handler, store the scored objects and show reviewers the flagged share next to the application.
Wrap the call in an Express or Fastify route that returns only Shorts with spoken sponsor phrases and no disclosure hashtag. Compliance staff paste a handle and get a short reading list back.
Upsert each object into Postgres keyed on video_id and index detected_brands as an array column. Queries such as "every Short that mentioned this domain" become one SQL line.
You need an Apify account and an API token from Console β Settings β Integrations. Apify's free plan includes monthly usage credit; this Actor's event prices are listed under Pricing below.
git clone https://github.com/devilscrapes/youtube-shorts-scraper-javascript.git
cd youtube-shorts-scraper-javascript
npm install
export APIFY_TOKEN=your_token_here
node index.js # uses input.json
node index.js my-input.json --out data --max-charge 2The script starts the YouTube Shorts Sponsorship Signals Scraper, waits for it to finish, prints a link to the run in Apify Console and saves every result to results.json and results.csv. It exits with code 1 and the run's status message if the run fails.
Here is the whole integration without the CLI wrapper. call() resolves after the run completes, and listItems() reads the Shorts from the dataset the run created.
import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: 'YOUR_APIFY_TOKEN' });
const run = await client.actor('DevilScrapes/youtube-shorts-sponsorship-signals').call({"channels": ["@GoPro"], "maxShortsPerChannel": 10, "language": "en", "minSponsorshipScore": 0.0, "proxyConfiguration": {"useApifyProxy": false}});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);index.js forwards input.json exactly as it is. The sample inspects ten recent Shorts from GoPro's official channel with no score threshold and no proxy, so the first run is quick and cheap. To return only the clips a human should review, raise minSponsorshipScore to 0.5.
{
"channels": [
"@GoPro"
],
"maxShortsPerChannel": 10,
"language": "en",
"minSponsorshipScore": 0.0,
"proxyConfiguration": {
"useApifyProxy": false
}
}| Field | Type | Required | Default | Allowed values |
|---|---|---|---|---|
channels |
array | yes | ["@mkbhd"] |
β |
maxShortsPerChannel |
integer | no | 20 |
β |
language |
string | no | "en" |
β |
minSponsorshipScore |
number | no | 0.0 |
β |
proxyConfiguration |
object | no | {"useApifyProxy": false} |
β |
Each object is one Short. Array fields (hashtags, mentions, detected_brands, sponsorship_signals, tags) are always arrays, possibly empty, so .includes() works without null checks. view_count, length_seconds and published_text can be null when YouTube's metadata comes back empty.
| Field | Type | Always present |
|---|---|---|
channel |
string | yes |
video_id |
string | yes |
url |
string | yes |
title |
string | yes |
published_text |
string or null | no |
view_count |
integer or null | no |
length_seconds |
integer or null | no |
description |
string | no |
tags |
array | no |
has_transcript |
boolean | yes |
transcript_chars |
integer | no |
hashtags |
array | no |
mentions |
array | no |
detected_brands |
array | no |
sponsorship_signals |
array | no |
sponsorship_score |
number | yes |
is_likely_sponsored |
boolean | yes |
scraped_at |
string | no |
| Event | Price (USD) |
|---|---|
| Actor start | $0.2 |
| Result emitted | $0.004 |
Prices as configured on 2026-08-20. The Actor page always shows the current price. Runs are billed to the Apify account that owns the token. Use --max-charge to cap what a single run can cost.
A small notifier built on Node built-ins only. It keeps the Shorts at or above 0.5, formats one line per hit and posts them to the URL in WEBHOOK_URL, or prints them when that variable is unset.
import { readFile } from 'node:fs/promises';
const shorts = JSON.parse(await readFile('results.json', 'utf8'));
const hits = shorts
.filter((s) => s.is_likely_sponsored)
.sort((a, b) => (b.view_count ?? 0) - (a.view_count ?? 0));
const lines = hits.map((s) => {
const brands = s.detected_brands.length ? s.detected_brands.join(', ') : 'no brand token';
return `${s.channel} | score ${s.sponsorship_score} | ${brands} | ${s.sponsorship_signals.join(' + ')} | ${s.url}`;
});
if (process.env.WEBHOOK_URL && lines.length) {
const res = await fetch(process.env.WEBHOOK_URL, {
method: 'POST',
headers: { 'content-type': 'application/json' },
body: JSON.stringify({ text: lines.join('\n') }),
});
console.log(`webhook answered ${res.status} for ${lines.length} flagged Shorts`);
} else {
console.log(lines.join('\n') || 'nothing above 0.5 this time');
}No. You do not need a Google Cloud project or quota. The only credential is your Apify token; the Actor reads public YouTube pages and transcripts on its own side.
Use client.actor(...).start() instead of call(), return immediately and let an Apify webhook hit your function when the run finishes. Fetch the dataset items in that second invocation.
Words that follow sponsored by or code are read from a lowercased copy of the title, description and transcript, and the word after code is sometimes the discount code itself rather than the company. Normalise or map them in your own code before reporting.
No. Rows under minSponsorshipScore are discarded before they reach the dataset, and only stored rows trigger the per-result charge. The run start fee still applies.
Set APIFY_TOKEN first: export the token in the same shell, or put it in a local.envfile your shell loads. Never commit it.- Run finished with
FAILEDorABORTED: open the printed Console link; the run log says why. Input validation errors name the field. - Fewer rows than expected: a
--max-chargecap also limits how many results can be charged. Raise the cap or lower the limits in your input. - Something looks wrong in the data: open an issue on the Actor page so the maintainers see it.
- YouTube Shorts Sponsorship Signals Scraper on Apify Store
- Python version of this example
- All Devil Scrapes Actors
- Apify web scraping cookbook
Related Actors:
- YouTube Channel Videos Scraper β channel-level stats and long-form uploads for the same handles.
- YouTube Comments Scraper β how viewers react under a sponsored video.
- Patreon Creator Scraper β the creator income stream that sits beside brand deals.
MIT licensed example code. The Actor itself runs on Apify and is maintained by Devil Scrapes. Not affiliated with YouTube or Google LLC.