Markdown
All endpoints

Reddit search

GET/v1/posts/reddit/search

Find Reddit posts for a query: title, text, subreddit, score, comment count and date.

Price

Price
$0.00055 per call
Nothing found
Not charged when nothing is found
No data fetched
Not charged

Each call holds this price, charges it only when data is returned and releases it otherwise. This rule is for data endpoints only: when collecting AI answers, a no-answer or refused result is still a result and is charged.

Parameters

querystringRequired

The search query. Up to 500 characters.

cursorstring

The next_cursor from the previous page. Leave it out to start from the first page. Up to 200 characters.

Headers

AuthorizationRequired

Bearer followed by your API key.

Idempotency-KeyRecommended

An ID you choose, up to 255 characters with no spaces. After a network error, resend with the same value and nothing is run or charged twice. It is remembered for 24 hours. The same value with different parameters returns idempotency_conflict.

X-Max-PriceOptional

The most you are willing to spend in US dollars, such as 0.50. If the request could cost more, it is refused: nothing runs and nothing is charged.

X-SourceOptional

Your own label, such as the product the call came from, up to 100 characters. Usage can be broken down by it.

X-End-UserOptional

Your own label for the end user this call serves, up to 100 characters. Do not put names, emails or other personal data in it.

Response

A successful call returns HTTP 200 with the data in data.items, a list of Post objects. Every field is always present: [] means none this time and null means not available or unknown. Results come one page at a time; there is another page while page.next_cursor is not null. What the call cost is in meta.billing.

FieldTypeDescription
idstringID
urlstring | nullURL
titlestring | nullTitle
textstring | nullText
communitystring | nullThe community it was posted in
authorstring | nullAuthor
scoreinteger | nullScore
commentsinteger | nullNumber of comments
published_atstring | nullWhen it was published; null if the platform does not say

Nested objects

page4 fields
FieldTypeDescription
next_cursorstring | nullThe cursor for the next page; null on the last page
cursor_expires_atstring | nullWhen the cursor expires; null if it does not
has_morebooleanWhether there is another page
returnedintegerNumber of items on this page
meta7 fields
FieldTypeDescription
capabilitystringEndpoint ID
result_status"complete" | "partial" | "empty"complete: everything. partial: only part of it. empty: nothing found
fetched_atstringWhen the data was fetched
cachedbooleanWhether the result came from a cache. Always false at present
replayedbooleanWhether this is the earlier result returned again for the same Idempotency-Key
unavailablestring[]Fields that could not be provided this time
billing{ amount: string, currency: "USD", balance_after: string | null }What this call was charged and the balance afterwards

Common errors

An error means nothing was charged, except settlement_unknown: it means billing is not known yet, so ask again with the same Idempotency-Key. See every error code.

ErrorHTTPMeaningCharged?
invalid_params400A parameter is invalidNot charged
max_price_exceeded400The most this could cost is above the limit you setNot charged
insufficient_balance402The balance is too lowNot charged
key_budget_exceeded402This key's spending limit does not cover itNot charged
idempotency_conflict409This Idempotency-Key was used for a different requestNot charged
cursor_invalid400The cursor does not existNot charged
cursor_mismatch400The cursor was issued for another endpoint or other parametersNot charged
cursor_expired410The cursor expired; start again from the first pageNot charged
upstream_failed502No result came back this time and nothing was charged; retry shortlyNot charged
timeout504The data did not arrive in time; nothing was chargedNot charged
upstream_busy503Busy now; retry shortlyNot charged
call_in_progress409The call under this Idempotency-Key is still running; ask again with the same key shortlyNot charged
settlement_unknown500Whether this was charged is not known yet; ask again with the same Idempotency-KeyUnknown yet
unauthorized401No credential was sent, or it is invalid, disabled or expiredNot charged
rate_limited429Too many requests, or too many calls in progressNot charged