Skip to content
The SpawnExplore tools
Developer guide

Get one comment page

Use The Spawn’s quote and receipt API to retrieve one page of public YouTube comments without confusing a preview with the full received result.

Saved tool output

What viewers actually said

Try tool
Claude Code for Beginners / freeCodeCamp.org20 records
Download JSON
01
@Jean-zc9xk3 likes

seems very advanced to call it Beginners

Open comment
02
@jonatapaulino1 likes

Hello. Thanks for the video. You have a lot of great videos, but since I don't know much English, it would be good to have real-time dubbing, like I've seen in other videos.

Open comment
03
@megabrainsdev44 likes

My weekly limit just finished after watching this video

Open comment
04
@redlanternx4 likes

If Claude hadn't suspended my account for no reason, I could be enjoying this course.

Open comment
05
@JoshBooth_Dad3 likes

This course is EXACTLY what I've been looking for. THANK YOU!!!

Open comment

One saved page of 20 comments. Five short comments selected for content, language and access feedback; downloads contain all 20. Not a complete export or a representative sample.

Quote URL

Approve run

Read receipt

One page per run, up to 100 comments. No automatic pagination.

01

Quote one public video

POST a youtube-comments request with input.url to /api/tools/quote. Check status, normalized input, expiration and user_price_usd before execution. Availability and request limits can prevent a quote; a successful page load does not guarantee data coverage.

02

Keep the receipt capability

A guest quote includes access_token. Preserve it privately alongside quote_id. Pass it in the run body and use X-Tool-Access-Token when reading the request later. It is scoped to that quote, not a general API key. Signed-in requests use their account identity.

03

Run only after approval

POST quote_id, access_token and approved:true to /api/tools/run. Read the returned status before using data. Pending, no_data, failed and indeterminate are different outcomes. Do not create another paid or budgeted request merely because the first outcome is unclear.

04

Read all received rows

The web preview displays at most ten rows. The underlying received page can contain more, up to the tool limit of 100. Exported data must reflect that received page, not just visible rows. Empty comments, unavailable videos and disabled discussions can produce no usable data.

05

Separate pagination contracts

Google’s direct commentThreads.list API uses nextPageToken and pageToken for pagination; replies may require comments.list. Those are Google API operations with their own credentials and quotas. The Spawn’s current quote input has no pageToken parameter and does not run that loop.

06

Build a recoverable consumer

Store the request identifier and terminal status with your output. Read /api/tools/requests/{quote_id} to recover the same result. On an error, retain the structured error code. Keep raw JSON for schema inspection and avoid logging private receipt tokens.

Keep these fields

quote_id
UUID identifying one quote and execution
access_token
Guest receipt capability; keep private
status
Execution state, not HTTP status alone
data
Received result only on completed execution

Try the request

// Node.js: save as example.mjs. No API key is invented here.
const base = 'https://thespawn.io';
async function request(path, options = {}) {
  const response = await fetch(base + path, options);
  const body = await response.json();
  if (!response.ok) throw new Error(body.error?.code || `HTTP ${response.status}`);
  return body;
}
const quote = await request('/api/tools/quote', {
  method: 'POST', headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({"tool": "youtube-comments", "input": {"url": "https://www.youtube.com/watch?v=gh2_PhgZGsM"}})
});
if (quote.status !== 'quoted') throw new Error('No executable quote');
console.log({ input: quote.input, expires_at: quote.expires_at,
  user_price_usd: quote.user_price_usd });
// Review the input and price above. Set APPROVE_TOOL_RUN=yes to execute.
if (process.env.APPROVE_TOOL_RUN !== 'yes') process.exit(0);
const receipt = await request('/api/tools/run', {
  method: 'POST', headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({ quote_id: quote.quote_id,
    access_token: quote.access_token, approved: true })
});
console.log({ status: receipt.status, data: receipt.data });
// Read the SAME request again; this does not create a new quote.
const saved = await request('/api/tools/requests/' + quote.quote_id, {
  headers: { 'X-Tool-Access-Token': quote.access_token }
});
console.log({ status: saved.status, data: saved.data });
// Keep quote.access_token private. Never put it in a URL or shared logs.

Sources and next steps

Reviewed 2026-09-14