POST

API health

24h health
Normal
  • Healthy / normal
  • Available
Normal

Last 24 hours

Last 30 days

Look up as many as 20 Reddit comments at once from comment_urls, each the link to one comment, such as the url of a comment returned by comments. Use it when you already hold comment links and want their current text and score, or want to know whether they still exist, without paging through the thread again. Each comment read is one row with the same fields as a comments row, plus the post_title and post_url of its post and input, the entry you passed. Replies to the post and nested replies both work. A comment ID alone is not enough. Billed per request, not per comment. A comment that is gone produces no row and there is no missed list, so match rows with input. A request that reads none is not charged. An invalid array is rejected with a 422 before any charge.

Send POST https://api.everyinfra.com/api/v1/social with platform set to reddit and action set to comments_lookup. 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 Comments by link endpoint (reddit/comments_lookup).

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 comments_lookup, and put the parameters inside params.
- Required parameters:
  - comment_urls: Reddit comment links for comments_lookup, as an array of up to 20 entries; a comma-separated string is not accepted.
- Optional parameters:
  - limit: The most rows to return in this call, an integer of 1 or more. The default applies when you leave it out, and a call can return fewer rows.
- Returns a list of records. Main fields of each record: id, text, author_username, like_count, community, url, posted_at, post_title (Title of the post the comment was left…), post_url (Link to the post the comment was left o…), input (The entry that this row answers, return…).
- Example request body:
{
  "platform": "reddit",
  "action": "comments_lookup",
  "params": {
    "comment_urls": [
      "https://www.reddit.com/r/pics/comments/1xwxo1e/comment/19sogasefdc5g/"
    ]
  }
}
- 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.
actionbodystringYescomments_lookupCapability identifier, fixed value.
comment_urlsbody.paramsarrayYes-Reddit comment links for comments_lookup, as an array of up to 20 entries; a comma-separated string is not accepted. Each entry is the link to one comment itself, such as the url of a comment returned by comments: https://www.reddit.com/r/<subreddit>/comments/<post_id>/comment/<comment_id>/. The older /comments/<post_id>/<title>/<comment_id>/ form, old.reddit.com links and links with a query string such as ?context=3 also work. A comment ID alone is not enough, because Reddit finds a comment by post ID plus comment ID, and a post link is not a comment link. The url that user_comments returns points to the post, so it cannot be used here. List each comment once. A request with an unrecognized entry, a duplicate or more than 20 entries is rejected with a 422 before any charge, and so is a limit smaller than the number of entries. Billed per request, not per comment; comments not read (deleted, or not under that post) produce no row, so match the rows to your entries with input. A request that reads none is not charged.
limitbody.paramsinteger (1–)No-The most rows to return in this call, an integer of 1 or more. The default applies when you leave it out, and a call can return fewer rows.

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": "comments_lookup",
  "params": {
    "comment_urls": [
      "https://www.reddit.com/r/pics/comments/1xwxo1e/comment/19sogasefdc5g/"
    ]
  }
}'

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": "comments_lookup",  "results": [    {      "id": …,      "text": …,      "author_username": …,      "like_count": …,      "community": …,      "url": …,      "posted_at": …,      "platform": …,      "post_title": …,      "post_url": …,      "input": …    }  ],  "count": …,  "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
idThe record's unique ID on the platform. Unique only within one platform; IDs can repeat across platforms.
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).
author_usernameAuthor's username (@handle), usually usable in URLs.
like_countLikes. null means the platform or this capability does not disclose it; it is not 0.
communityKeeps the platform's own meaning
urlLink to the record on the platform.
posted_atPublish time in ISO 8601, UTC (for example 2026-08-07T12:34:56+00:00). Non-standard strings from the platform are passed through as is, so parse defensively. null means the platform does not disclose it.
platformSource platform identifier, the same as platform in the request (for example xiaohongshu, tiktok).
post_titleTitle of the post the comment was left on (user_comments, comments_lookup; painpoint pain_comment rows).
post_urlLink to the post the comment was left on (comments_lookup).
inputThe entry that this row answers, returned exactly as you passed it: for posts_batch an entry of urls, for comments_lookup an entry of comment_urls. Use it to match rows to your entries; the returned url can be written differently, for example a full post link where you passed a redd.it short link.

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