POST

API health

24h health
Normal
  • Healthy / normal
  • Available
Normal

Last 24 hours

Last 30 days

Get the profile of one subreddit as a single object. subreddit is required: a community name (python or r/python) or a community link, one per call. The object has community (the name without r/), community_id (starts with t5_), url, title, description, member_count (a few requests come back without it), weekly_visitor_count and weekly_contribution_count (the weekly visitors and contributions shown on the community page), created_at, community_type (public, restricted or private), icon_url and banner_url. A community that does not exist, is private or has been banned returns an empty result. Rules and menu links are in subreddit_rules.

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

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 subreddit_info, and put the parameters inside params.
- Required parameters:
  - subreddit: The community to look up: a name (python or r/python) or a community link. One community per call.
- Returns one object. Main fields: community, community_id (Reddit's ID for the community, starting…), url, title, description, member_count (How many members the community has (sub…), weekly_visitor_count (Weekly visitors to the community as Red…), weekly_contribution_count (Weekly contributions to the community,…), created_at, community_type (Type of the community: public, restrict…), icon_url (Image URL of the icon: the community ic…), banner_url (Image URL of the banner on the communit…).
- Example request body:
{
  "platform": "reddit",
  "action": "subreddit_info",
  "params": {
    "subreddit": "python"
  }
}
- 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.
actionbodystringYessubreddit_infoCapability identifier, fixed value.
subredditbody.paramsstringYes-The community to look up: a name (python or r/python) or a community link. One community per call.

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": "subreddit_info",
  "params": {
    "subreddit": "python"
  }
}'

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": "subreddit_info",  "results": {    "community": …,    "community_id": …,    "url": …,    "title": …,    "description": …,    "member_count": …,    "weekly_visitor_count": …,    "weekly_contribution_count": …,    "created_at": …,    "community_type": …,    "icon_url": …,    "banner_url": …,    "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
communityKeeps the platform's own meaning
community_idReddit's ID for the community, starting with t5_ (subreddit_info, subreddit_rules, search_suggest, user_subreddits, explore, topic_subreddits).
urlLink to the record on the platform.
titleTitle. null when the platform has no titles (for example text-only posts).
descriptionSummary or description, usually shorter than text.
member_countHow many members the community has (subreddit_info, user_subreddits). A few requests come back without it.
weekly_visitor_countWeekly visitors to the community as Reddit shows it (subreddit_info, explore, topic_subreddits). In search_suggest it is the rounded figure from the dropdown, so 93K is recorded as 93000, and not every row has it.
weekly_contribution_countWeekly contributions to the community, as shown on its page (subreddit_info).
created_atCreation time, same format as posted_at.
community_typeType of the community: public, restricted or private (subreddit_info).
icon_urlImage URL of the icon: the community icon (subreddit_info, subreddit_rules, search_suggest, user_subreddits, explore, topic_subreddits) or the achievement icon (user_trophies).
banner_urlImage URL of the banner on the community page (subreddit_info, subreddit_rules) or on the user's profile (profile).
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