Loading...
Loading...
Sponsor and ad-read research on podcasts and YouTube: who sponsors a show, or which shows a brand sponsors, how often, since when. Uses arcmira.
npx skill4agent add arcmira/mcp sponsor-researcharcmira.sponsors(channelId)arcmira.recommendations(entityId, { kind: "sponsored" })arcmira_execute_readarcmira_describeid_requiredcontextbestsuggestedsuggestedsuggested.evidenceaskask.options{ type: "channel" }youtube_channel_idarcmira_execute_readCONTEXTaskIDarcmira.daysAgo(n)arcmira.today()const NAME = "TBPN", CONTEXT = undefined, ID = null; // CONTEXT: the user's own words about the name, never a guess. After an ask, set ID to the picked option's channel_id and run again
const r = ID ? null : await arcmira.resolve(NAME, { type: "channel", context: CONTEXT });
const e = r && (r.best ?? r.suggested);
if (r && !e) return { ask: r.ask && { question: r.ask.question, options: r.ask.options.map(o => ({ ...o, channel_id: r.candidates.find(c => c.id === o.id)?.youtube_channel_id ?? null })) } };
const id = ID ?? e.youtube_channel_id;
const assumed = Boolean(r?.suggested), why = r?.suggested?.evidence ?? null;
const s = await arcmira.sponsors(id); // limit is a Pro+ filter; slice instead
return {
show: s.channel.name, channel_id: id, page: s.channel.page, assumed, why, sponsors_total: s.meta.total,
sponsors: s.sponsors.slice(0, 10).map(x => ({ name: x.entity.name, id: x.entity.id, page: x.entity.page, ad_reads: x.ad_reads, episodes: x.videos, first_seen: x.first_seen, last_seen: x.last_seen, status: x.sponsor_status?.status ?? null })),
};const NAME = "Mercury", CONTEXT = undefined, ID = null; // CONTEXT: the user's own words about the name, never a guess. After an ask, set ID to the picked option's id and run again
const r = ID ? null : await arcmira.resolve(NAME, { context: CONTEXT });
const e = r && (r.best ?? r.suggested);
if (r && !e) return { ask: r.ask };
const id = ID ?? e.id;
const assumed = Boolean(r?.suggested), why = r?.suggested?.evidence ?? null;
const after = arcmira.daysAgo(90);
const reads = [];
let cursor, entity, window;
do {
const page = await arcmira.recommendations(id, { kind: "sponsored", after, limit: 100, cursor });
entity = page.entity;
window = page.window;
reads.push(...page.recommendations);
cursor = page.has_more ? page.next_cursor : undefined;
} while (cursor && reads.length < 500);
const shows = new Map();
for (const x of reads) {
const name = x.media.source_channel?.name ?? x.media.channel_id;
const row = shows.get(name) ?? { show: name, channel_id: x.media.channel_id, ad_reads: 0, episodes: new Set(), latest: "" };
row.ad_reads += 1;
row.episodes.add(x.media.video_id);
if (x.media.published_at > row.latest) row.latest = x.media.published_at;
shows.set(name, row);
}
return {
brand: { id, name: entity?.name ?? e?.name ?? null, type: entity?.type ?? e?.type ?? null, assumed, why }, window, ad_reads_total: reads.length,
shows: [...shows.values()].sort((a, b) => b.ad_reads - a.ad_reads).slice(0, 10).map(s => ({ ...s, episodes: s.episodes.size })),
sample_read: reads[0] ? { said: reads[0].verbatim_quote, show: reads[0].media.source_channel?.name ?? null, date: reads[0].media.published_at, promo_code: reads[0].promo_code } : null,
};pagerecommendationsrecommendations_not_enabledkind: "organic"cursorhas_morecompany-watch