Sand AISand AI MAGI-2MAGI-2 jest teraz na SandBase: wideo 1080p z natywnym dźwiękiemWypróbuj teraz

Reddit Post

Dokumentacja API
https://api.sandbase.ai/v1/api/reddit/post

Fetch a single Reddit post by URL, including its full body text, score, comment count, upvote ratio, and subreddit, as normalized JSON.

Cena
Od $0.0005USD / wywołanie
Metoda
POST
Odpowiedź
JSON
Parametry
1 wymaganych · 0 opcjonalnych

Playground

Wejście
Reddit post URL on reddit.com, e.g. "https://www.reddit.com/r/IAmA/comments/z1c9z/i_am_barack_obama_president_of_the_united_states/". The /r/<subreddit>/comments/<id>/, /user/<name>/comments/<id>/, /comments/<id>/ and /gallery/<id> forms are accepted. Any other link, such as a share link or a link to another site, is refused as invalid input, with no charge.
WyjścieGotowe

Twój wynik pojawi się tutaj

Uzupełnij dane wejściowe, a następnie kliknij Uruchom.

README API

Reddit Post API

Returns one Reddit post as JSON, including its title, full body text, author, score, comment count, upvote ratio, and subreddit. It needs a single Reddit post url on reddit.com.

Use cases

  • Archive the text and score of a specific Reddit thread for a research dataset.
  • Check how well a linked post performed by reading its score, numComments, and upvoteRatio.
  • Flag NSFW or locked posts before showing them in a content feed.
  • Resolve a post URL to its id, subreddit, and author for later lookups.

Request

curl -X POST "https://api.sandbase.ai/v1/api/reddit/post" \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://www.reddit.com/r/IAmA/comments/z1c9z/i_am_barack_obama_president_of_the_united_states/"}'

The result is returned in outputs[0].data.

Parameters

NameTypeRequiredDescription
urlstringYesReddit post URL on reddit.com, e.g. "https://www.reddit.com/r/IAmA/comments/z1c9z/i_am_barack_obama_president_of_the_united_states/". The /r/<subreddit>/comments/<id>/, /user/<name>/comments/<id>/, /comments/<id>/ and /g

Example response

Real response for the request above, trimmed: lists keep their first item and long strings are cut.

{
  "data": {
    "author": "PresidentObama",
    "authorId": "8t1cq",
    "body": "Hi, I’m Barack Obama, President of the United States. Ask me anything. I’ll be t…",
    "createdUtc": 1346270496,
    "domain": "self.IAmA",
    "editedUtc": 1346276503,
    "id": "z1c9z",
    "image": "https://external-preview.redd.it/KftOKw5o_G5ug7ENkLFbplFDpcApH0MvkQoOQD4nKng.jpg…",
    "isArchived": true,
    "isLocked": false,
    "isNsfw": false,
    "numComments": 22716
  },
  "found": true
}

Response fields

FieldMeaning
data.titleTitle of the post.
data.bodyFull text of the post. Link or image posts may have little or no text here.
data.author / data.authorIdUsername of the post author and the author's ID.
data.subredditName of the subreddit the post belongs to, without the r/ prefix.
data.score / data.numCommentsNet score of the post and the number of comments on it.
data.upvoteRatioShare of votes that were upvotes, as a decimal between 0 and 1.
data.createdUtc / data.editedUtcCreation time and last edit time of the post, as Unix timestamps in seconds.
data.isArchived / data.isLocked / data.isNsfwBoolean flags for archived, locked, and NSFW status.
data.permalink / data.urlPath of the post on Reddit and its full URL.
foundtrue when the post was found. A lookup that finds nothing returns found: false.

Notes

  • Send the post link in url. The /r/<subreddit>/comments/<id>/, /user/<name>/comments/<id>/, /comments/<id>/ and /gallery/<id> forms are accepted. Share links and links to other sites are refused as invalid input.
  • The post id is the short code in the URL, such as z1c9z.
  • To read the replies to a post, call Reddit Post Comments.
  • To list more posts from the same community, call Reddit Subreddit Posts.

Pricing

Billed at the actual cost of each call, about $0.0005 for the request above. Failed calls are not charged.

Odkryj więcej

Powiązane APIs

Wszystkie APIs
APICenaOdpowiedź
RedditOd $0.0005 za wywołanieJSON
Reddit$0.001 za wywołanieJSON
Reddit$0.001 za wywołanieJSON
Reddit$0.001 za wywołanieJSON
Reddit$0.001 za wywołanieJSON
Reddit$0.001 za wywołanieJSON

Przewodniki:Best Reddit API in 2026: Pricing Compared

Pytania

FAQ

Jak używać API Reddit Post?

Wyślij żądanie POST do https://api.sandbase.ai/v1/api/reddit/post z kluczem API SandBase w nagłówku Authorization (Bearer) oraz parametrami w treści JSON. Możesz też wypróbować je w Playground na tej stronie bez pisania kodu.

Ile kosztuje API Reddit Post?

Od $0.0005 za wywołanie, rozliczane z salda SandBase. Płacisz tylko za wykonane wywołania; nie ma subskrypcji.

Jakie parametry przyjmuje API Reddit Post?

Wymagane: url (string). Tabela Parameters oraz Playground na tej stronie zawierają wszystkie pola.

Co zwraca API Reddit Post?

Odpowiedź JSON zwrócona w tym samym żądaniu HTTP (synchronicznie). README na tej stronie zawiera przykładową odpowiedź.

Czy potrzebuję konta deweloperskiego Reddit lub klucza API?

Nie. Reddit Post działa przez SandBase, więc jeden klucz API SandBase obejmuje ten endpoint i każde inne API oraz model w katalogu. Nie musisz osobno ubiegać się o dostęp do API Reddit.