Should I call again when my AI shows only a small preview?
Usually no. When an assistant displays only a short YouTube comment preview, check first for a locally saved full response or a result_ref object in the preview. If you already saved the JSON file locally, read that file directly. If the stored result is still available, retrieve the full stored page with operation:"result", the same reference, and result_ref.request_id; reading a stored result does not execute or bill the capability again. Use continuation_token only when you need the next page from YouTube.
Diagnose the preview before making another call
items_total counts only the items detected in the returned response, not every comment on the YouTube video. A Run preview can shorten text inside each item as well as cap the item count, so raising max_items on another preview does not confirm that full comment text was read. Check result_ref.expires_at for the exact expiry deadline; one-hour retention is temporary rather than a permanent archive.
Prepare the free stored-result request from the saved preview
- Save the complete Run preview response as
youtube-preview.jsoninstead of copying a chat snippet. - Save the script below as
saved_result.py. - Run
python3 saved_result.py youtube-preview.json result-request.json.
saved_result.py validates the saved preview locally without making network calls. saved_result.py stops if result_ref is missing, unavailable, or expired, if the action conflicts with youtube.web_v2.get_video_comments, or if result-request.json already exists.
Send result-request.json using an authorized API key from the same account, normally the key used for the original request:
The mkdir guard prevents an existing output directory from being overwritten by a cache error. For another retrieval attempt, pick a new directory name and preserve earlier files. The request sets operation:"result" and view:"full" without input, fields, or a preview cap, so BeatAPI reads the stored response body without executing or billing the capability again. Save both HTTP response headers and JSON because an error body is not a comment dataset. Stored-result recovery applies to Capabilities Run result_ref entries; direct /v1/social-data/call responses are not necessarily cached.
What if the response says the result expired?
- Verify that the request uses
result_ref.request_id, an API key for the same account, and an unexpiredresult_ref.expires_attimestamp. - Stored results can also be unavailable or evicted, and the stored-result cache does not retain response bodies larger than 2 MiB.
result_ref_unavailablemeans no retrievable cache entry was created; retryingoperation:"result"does not make an entry appear.- Do not fall back automatically to
operation:"start". Keep the error response, the original query, and any saved full file, then decide separately whether to fund a fresh query.
A failed cache lookup does not mean the YouTube video has zero comments, and recovering a stored page does not fetch the next platform page or comment replies. Executing youtube.web_v2.get_video_comments costs $0.003 per executed data request, while reading a stored result with operation:"result" is not billed as another execution.
Comment research · Capabilities result contract · YouTube questions
Free action contract: data:youtube.web_v2.get_video_comments.

