Skip to content

Reddit APIs - Post Details (V1)

prod-global
GET
/api/reddit/get-post-detail/v1

Retrieves comprehensive information of a specific Reddit post by its unique ID. Includes the post content (text or link), author details, subreddit information, and engagement statistics like upvotes, downvotes, and comment counts.

Typical use cases

  • Sentiment analysis for brands, products, or topics
  • Tracking public engagement with specific pieces of content
  • Content archiving and metadata analysis

Parameters

NameInTypeRequiredDescription
tokenquerystringYesAccess token for this API service.
postIdquerystringYesThe unique identifier of the Reddit post (e.g., 't3_1q4aqti').

Code Samples

💡 Environment Note

Default samples use https://api.justoneapi.com (prod-global). For users in Mainland China, it is recommended to replace it with http://47.117.133.51:30015 (prod-cn) for better performance. See Environment Guide.

bash
# Tip: For Mainland China, replace https://api.justoneapi.com with http://47.117.133.51:30015
curl -X GET "https://api.justoneapi.com/api/reddit/get-post-detail/v1?token=YOUR_API_KEY&postId=VALUE"
text
I want to use the "Post Details (V1)" API from Just One API.
API Endpoint: https://api.justoneapi.com/api/reddit/get-post-detail/v1
HTTP Method: GET
Authentication: Append "?token=YOUR_API_KEY" to the URL.
OpenAPI Definition: https://docs.justoneapi.com/openapi/reddit-apis/post-details-v1-en.json

Parameters:
- token (query): Access token for this API service. (Required)
- postId (query): The unique identifier of the Reddit post (e.g., 't3_1q4aqti'). (Required)

Return format: JSON

Response Handling & Error Codes:
1. Business results should be determined by the "code" field in the response body (code 0 means success).
2. Timeout Recommendation: Set request timeout to at least 60 seconds.
3. Business Code Reference:
   - 0: Success
   - 100: Invalid or Inactive Token
   - 301: Collection Failed. Please Retry.
   - 302: Rate Limit Exceeded
   - 303: Daily Quota Exceeded
   - 400: Invalid Parameters
   - 500: Internal Server Error
   - 600: Permission Denied
   - 601: Insufficient Balance

Please help me write a script in my preferred programming language to call this API and handle the response.
python
# Tip: For Mainland China, replace https://api.justoneapi.com with http://47.117.133.51:30015
import requests

url = "https://api.justoneapi.com/api/reddit/get-post-detail/v1?token=YOUR_API_KEY&postId=VALUE"
response = requests.get(url)
print(response.json())
js
// Tip: For Mainland China, replace https://api.justoneapi.com with http://47.117.133.51:30015
const response = await fetch("https://api.justoneapi.com/api/reddit/get-post-detail/v1?token=YOUR_API_KEY&postId=VALUE", {
  method: "GET"
});
const data = await response.json();
console.log(data);
java
// Tip: For Mainland China, replace https://api.justoneapi.com with http://47.117.133.51:30015
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

public class Main {
    public static void main(String[] args) throws Exception {
        HttpClient client = HttpClient.newHttpClient();
        HttpRequest request = HttpRequest.newBuilder()
            .uri(URI.create("https://api.justoneapi.com/api/reddit/get-post-detail/v1?token=YOUR_API_KEY&postId=VALUE"))
            .method("GET", HttpRequest.BodyPublishers.noBody())
            .build();

        HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
        System.out.println(response.body());
    }
}
go
// Tip: For Mainland China, replace https://api.justoneapi.com with http://47.117.133.51:30015
package main

import (
	"fmt"
	"io"
	"net/http"
)

func main() {
	client := &http.Client{}
	url := "https://api.justoneapi.com/api/reddit/get-post-detail/v1?token=YOUR_API_KEY&postId=VALUE"
	req, _ := http.NewRequest("GET", url, nil)
	resp, _ := client.Do(req)
	defer resp.Body.Close()
	body, _ := io.ReadAll(resp.Body)
	fmt.Println(string(body))
}
php
// Tip: For Mainland China, replace https://api.justoneapi.com with http://47.117.133.51:30015
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.justoneapi.com/api/reddit/get-post-detail/v1?token=YOUR_API_KEY&postId=VALUE");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
$response = curl_exec($ch);
curl_close($ch);
echo $response;

Responses

json
{
  "code": 0,
  "data": {
    "postsInfoByIds": [
      {
        "__typename": "SubredditPost",
        "authorCommunityBadge": null,
        "subreddit": {
          "__typename": "Subreddit",
          "id": "t5_2x2oy",
          "name": "Whatcouldgowrong",
          "prefixedName": "r/Whatcouldgowrong",
          "isQuarantined": false,
          "title": "What Could Possibly Go Wrong?",
          "type": "PUBLIC",
          "subscribersCount": 7849923,
          "isNsfw": false,
          "isSubscribed": false,
          "isThumbnailsEnabled": true,
          "styles": {
            "icon": null,
            "legacyIcon": {
              "url": "https://a.thumbs.redditmedia.com/wk4DdnifrZxOjoVTiBzk1jsK8RqACLAQi6TO4JMxCx0.png"
            },
            "primaryColor": "#B8001F",
            "backgroundColor": null,
            "bannerBackgroundImage": "https://styles.redditmedia.com/t5_2x2oy/styles/bannerBackgroundImage_noc56x5mbi821.png",
            "legacyPrimaryColor": "#222222"
          },
          "modPermissions": null,
          "communityStatus": null,
          "isTitleSafe": true,
          "isUserBanned": false,
          "tippingStatus": null,
          "whitelistStatus": "ALL_ADS"
        },
        "crosspostRoot": null,
        "id": "t3_1q4aqti",
        "createdAt": "2026-01-05T03:30:19.779000+0000",
        "editedAt": null,
        "postTitle": "[ 已被版主删除 ]",
        "url": "https://www.reddit.com/r/Whatcouldgowrong/comments/1q4aqti/%E5%B7%B2%E8%A2%AB%E7%89%88%E4%B8%BB%E5%88%A0%E9%99%A4/",
        "content": null,
        "domain": "v.redd.it",
        "isSpoiler": false,
        "isNsfw": false,
        "isCommercialCommunication": false,
        "isLocked": true,
        "isSaved": false,
        "isReactAllowed": false,
        "isHidden": false,
        "isGildable": false,
        "isCrosspostable": false,
        "isScoreHidden": false,
        "isArchived": false,
        "isStickied": false,
        "isPollIncluded": false,
        "poll": null,
        "isFollowed": false,
        "awardingsInfo": null,
        "awardings": [
          {
            "__typename": "AwardingTotal",
            "award": {
              "__typename": "Award",
              "id": "award_free_popcorn_2",
              "name": "吃瓜",
              "tags": [
                "award:legacy",
                "award:unlimited_free",
                "award:sort:50",
                "award:quick_give"
              ],
              "static_icon_16": {
                "__typename": "MediaSource",
                "url": "https://i.redd.it/snoovatar/snoo_assets/marketing/Popcorn_16.png",
                "dimensions": {
                  "width": 16,
                  "height": 16
                }
              },
              "static_icon_24": {
                "__typename": "MediaSource",
                "url": "https://i.redd.it/snoovatar/snoo_assets/marketing/Popcorn_24.png",
                "dimensions": {
                  "width": 24,
                  "height": 24
                }
              },
              "static_icon_32": {
                "__typename": "MediaSource",
                "url": "https://i.redd.it/snoovatar/snoo_assets/marketing/Popcorn_32.png",
                "dimensions": {
                  "width": 32,
                  "height": 32
                }
              },
              "static_icon_48": {
                "__typename": "MediaSource",
                "url": "https://i.redd.it/snoovatar/snoo_assets/marketing/Popcorn_48.png",
                "dimensions": {
                  "width": 48,
                  "height": 48
                }
              },
              "static_icon_64": {
                "__typename": "MediaSource",
                "url": "https://i.redd.it/snoovatar/snoo_assets/marketing/Popcorn_64.png",
                "dimensions": {
                  "width": 64,
                  "height": 64
                }
              }
            },
            "total": 5
          }
        ],
        "isContestMode": false,
        "distinguishedAs": null,
        "voteState": "NONE",
        "score": 32609,
        "commentCount": 717,
        "viewCount": null,
        "authorFlair": null,
        "flair": null,
        "authorInfo": {
          "__typename": "Redditor",
          "id": "t2_144icfdwdo",
          "name": "goswamitulsidas",
          "isBlocked": false,
          "isCakeDayNow": false,
          "newIcon": {
            "__typename": "MediaSource",
            "url": "https://preview.redd.it/snoovatar/avatars/495a64a3-a7b9-4289-90a8-8bba16564b1b-headshot.png?auto=webp&s=fe2ac439bb6f9d827747f37a05dac029a8fce7a5",
            "dimensions": {
              "width": 256,
              "height": 256
            }
          },
          "iconSmall": {
            "__typename": "MediaSource",
            "url": "https://preview.redd.it/snoovatar/avatars/495a64a3-a7b9-4289-90a8-8bba16564b1b-headshot.png?width=50&height=50&auto=webp&s=8fbe87c6a54b0bb02d1fbd4c2289ec0698f23003",
            "dimensions": {
              "width": 50,
              "height": 50
            }
          },
          "snoovatarIcon": {
            "__typename": "MediaSource",
            "url": "https://i.redd.it/snoovatar/avatars/495a64a3-a7b9-4289-90a8-8bba16564b1b.png",
            "dimensions": {
              "width": 380,
              "height": 600
            }
          },
          "profile": {
            "isNsfw": false
          },
          "accountType": "USER"
        },
        "isThumbnailEnabled": true,
        "thumbnail": null,
        "media": null,
        "moderationInfo": null,
        "suggestedCommentSort": "TOP",
        "permalink": "/r/Whatcouldgowrong/comments/1q4aqti/已被版主删除/",
        "isSelfPost": false,
        "postHint": null,
        "postEventInfo": null,
        "gallery": null,
        "devvit": null,
        "outboundLink": {
          "url": "https://www.reddit.com/r/Whatcouldgowrong/comments/1q4aqti/%E5%B7%B2%E8%A2%AB%E7%89%88%E4%B8%BB%E5%88%A0%E9%99%A4/",
          "expiresAt": "2026-03-09T19:21:08.596449+0000"
        },
        "postStats": {
          "viewCountTotal": null,
          "shareAllTotal": 3233
        },
        "postStatsPrivate": {
          "viewCountTotals": null
        },
        "isAuthorBlocked": false,
        "upvoteRatio": 0.9703780024470345,
        "reactedFrom": null,
        "attributionInfo": null,
        "crowdControlLevel": "OFF",
        "isCrowdControlFilterEnabled": false,
        "languageCode": "en",
        "isTranslatable": false,
        "isTranslated": false,
        "translatedLanguage": null,
        "removedByCategory": "MODERATOR",
        "modContentDiscussion": null,
        "predictedRemovalSavedResponses": []
      }
    ]
  }
}

💡 Note: For list data, the example shows only 1-2 items for simplicity. The actual count depends on the API response.