Sand AISand AI MAGI-2MAGI-2 kini tersedia di SandBase: video 1080p dengan audio nativeCoba sekarang

Reddit Post

Dokumentasi 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.

Harga
Dari $0.0005USD / panggilan
Metode
POST
Respons
JSON
Parameter
1 wajib · 0 opsional

Playground

Input
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.
OutputSiap

Output Anda akan muncul di sini

Lengkapi input, lalu klik Run.

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.

Jelajahi lebih lanjut

API Terkait

Semua APIs
APIHargaRespons
RedditDari $0.0005 per panggilanJSON
Reddit$0.001 per panggilanJSON
Reddit$0.001 per panggilanJSON
Reddit$0.001 per panggilanJSON
Reddit$0.001 per panggilanJSON
Reddit$0.001 per panggilanJSON

Panduan:Best Reddit API in 2026: Pricing Compared

Pertanyaan

FAQ

Bagaimana cara menggunakan API Reddit Post?

Kirim permintaan POST ke https://api.sandbase.ai/v1/api/reddit/post dengan kunci API SandBase Anda di header Authorization (Bearer) dan parameter sebagai body JSON. Anda juga dapat mencobanya di Playground di halaman ini tanpa menulis kode.

Berapa biaya API Reddit Post?

Mulai dari $0.0005 per panggilan, ditagihkan dari saldo SandBase Anda. Anda hanya dikenai biaya untuk panggilan yang Anda lakukan; tidak ada langganan.

Parameter apa yang diterima API Reddit Post?

Wajib: url (string). Tabel Parameters dan Playground di halaman ini mencantumkan setiap field.

Apa yang dikembalikan API Reddit Post?

Respons JSON yang dikembalikan dalam permintaan HTTP yang sama (sinkron). README di halaman ini menyertakan contoh respons.

Apakah saya memerlukan akun developer atau kunci API Reddit?

Tidak. Reddit Post berjalan melalui SandBase, jadi satu kunci API SandBase mencakup endpoint ini dan setiap API serta model lain di katalog. Anda tidak perlu mendaftar akses API Reddit secara terpisah.