POST

API health

24h health
Normal
  • Healthy / normal
  • Available
Normal

Last 24 hours

Last 30 days

Read the captions Reddit provides for a video post hosted on Reddit, from the post link in url: text for the full text and segments sentence by sentence with start and end seconds. It reads captions only and does not transcribe speech. A post with no captions, or a caption file that could not be read this time, returns 503 and is not charged.

Send POST https://api.everyinfra.com/api/v1/social with platform set to reddit and action set to post_transcript. Price $0.79 per 1,000 requests ($0.000792 per call). Failed calls and empty results are not charged. Synchronous. For slow jobs add "mode": "async" to the body, take the job_id and poll.

AI prompt

#
Please help me write a data collection script with the EveryInfra Reddit Video post transcripts endpoint (reddit/post_transcript).

How the endpoint works:
- Request: POST https://api.everyinfra.com/api/v1/social with the header Authorization: Bearer <API key>. Read the key from the EVERYINFRA_API_KEY environment variable and never hard-code it.
- In the request body, set platform to reddit and action to post_transcript, and put the parameters inside params.
- Required parameters:
  - url: The link of a video post hosted on Reddit. It returns the captions Reddit provides for the video and does not transcribe speech. A link that is not recognized returns 422 and is not charged.
- Returns one object. Main fields: post_id (ID of the post the comment was left on…), url, title, media_type (Type of the post (post_transcript)), has_transcript (Whether the post has captions (post_tra…), reason (Why there are no captions (post_transcr…), source (Source of the captions (post_transcript…), language, text, segment_count (Number of entries in segments (post_tra…), segments (The captions sentence by sentence (post…), caption_url (Link to the caption file (post_transcri…); 14 fields in total, full list at https://api.everyinfra.com/api/v1/social/catalog?platform=reddit.
- Example request body:
{
  "platform": "reddit",
  "action": "post_transcript",
  "params": {
    "url": "https://www.reddit.com/r/TikTokCringe/comments/1y4o37g/road_rage_between_bmw_and_cyclists/"
  }
}
- Price: $0.79 per 1,000 requests; failed and empty results are not charged.
- For dozens or hundreds of targets, add "mode": "async" to the body: you get a job_id at once and poll GET https://api.everyinfra.com/api/v1/jobs/{job_id} for the result.
- On 422, fix the request using the suggested parameter names and allowed values in the error; on 429 or 503, wait for Retry-After and try again.

Before writing code, ask me which targets I need, how many, which fields, and what output format I want; then confirm the plan and the rough cost with me.

Request parameters

#
NameInTypeRequiredDefaultDescription
AuthorizationheaderstringYes-Bearer followed by your API key. Create it in the console; never put it in a URL or a code repository.
platformbodystringYesredditPlatform identifier, fixed value.
actionbodystringYespost_transcriptCapability identifier, fixed value.
urlbody.paramsstringYes-The link of a video post hosted on Reddit. It returns the captions Reddit provides for the video and does not transcribe speech. A link that is not recognized returns 422 and is not charged; a post without captions returns 503 and is not charged.

Code samples

#
bash
curl -X POST 'https://api.everyinfra.com/api/v1/social' \
  -H "Authorization: Bearer $EVERYINFRA_API_KEY" \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "platform": "reddit",
  "action": "post_transcript",
  "params": {
    "url": "https://www.reddit.com/r/TikTokCringe/comments/1y4o37g/road_rage_between_bmw_and_cyclists/"
  }
}'

OpenAPI definition (JSON)Samples read the key from the EVERYINFRA_API_KEY environment variable; copied code never contains your key.

Response example

#
No sample response is available for these parameters yet. This preview shows the response shape and fields from the API definition, with … as placeholders; it is not the result of a live call.
json
{  "id": "req_…",  "platform": "reddit",  "action": "post_transcript",  "results": {    "post_id": …,    "url": …,    "title": …,    "media_type": …,    "has_transcript": …,    "reason": …,    "source": …,    "language": …,    "text": …,    "segment_count": …,    "segments": …,    "caption_url": …,    "duration_sec": …,    "duration_seconds": …,    "platform": …  },  "billing": {    "charged": …,    "charged_usd": …,    "balance_after_usd": …,    …  },  "quota": { … }}

Response fields

#

Business data is in results. The table lists the fields a record can contain. Values the platform does not show are never made up.

FieldMeaning
post_idID of the post the comment was left on (user_comments).
urlLink to the record on the platform.
titleTitle. null when the platform has no titles (for example text-only posts).
media_typeType of the post (post_transcript).
has_transcriptWhether the post has captions (post_transcript); when it is false, reason says why.
reasonWhy there are no captions (post_transcript): no_caption (a video without captions), not_video (no video in the post) or external_video (the video is on another site).
sourceSource of the captions (post_transcript).
languageContent language code (for example zh, en) as judged by the platform; it can be wrong.
textBody text with HTML removed, returned in full and never cut short (on a few platforms the list results themselves carry only an excerpt; the platform's field notes say so).
segment_countNumber of entries in segments (post_transcript).
segmentsThe captions sentence by sentence (post_transcript): [{start_sec, end_sec, duration_sec, text}], with start_sec, end_sec and duration_sec in seconds and text the sentence.
caption_urlLink to the caption file (post_transcript); it may stop working.
duration_secLength of the video in seconds (post_transcript).
duration_secondsDuration in seconds. null for content that is not video or audio.
platformSource platform identifier, the same as platform in the request (for example xiaohongshu, tiktok).

Errors and billing

#
401
Missing or invalid key.
402
Insufficient balance. Top up first.
422
Invalid parameter name or value. Fix it using the suggestions in the error. No charge.
429
Per-minute request limit reached. Wait for Retry-After, then try again.
503
Could not complete. The held charge is returned to your balance. If the outcome is unknown, verify it before you retry.
200 empty
No data. No charge.

Errors

Google Analytics needs consent. Privacy