Skip to main content
POST
/
api
/
reddit
/
search
/
posts
/reddit/search/posts
curl --request POST \
  --url https://api.anysite.io/api/reddit/search/posts \
  --header 'Content-Type: application/json' \
  --header 'access-token: <api-key>' \
  --data '
{
  "query": "<string>",
  "count": 2,
  "timeout": 300,
  "sort": "relevance",
  "time_filter": "all"
}
'
[
  {
    "id": "<string>",
    "title": "<string>",
    "url": "<string>",
    "@type": "@reddit_post",
    "author": {
      "id": "<string>",
      "name": "<string>",
      "@type": "@reddit_author"
    },
    "subreddit": "<string>",
    "subreddit_id": "<string>",
    "created_at": 123,
    "vote_count": 123,
    "comment_count": 123,
    "post_type": "<string>",
    "content_url": "<string>",
    "text": "<string>",
    "thumbnail_url": "<string>",
    "nsfw": false,
    "spoiler": false
  }
]

Documentation Index

Fetch the complete documentation index at: https://docs.anysite.io/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

access-token
string
header
required

API token from the dashboard

Headers

access-token
string
required

Body

application/json
query
string
required

Search query

Minimum string length: 1
Example:

"crypto bitcoin"

count
integer
required

Max result count

Required range: x >= 1
Example:

20

timeout
integer
default:300

Max scrapping execution timeout (in seconds)

Required range: 20 <= x <= 1500
sort
enum<string>
default:relevance

Result sorting

Available options:
relevance,
hot,
top,
new,
comments
time_filter
enum<string>
default:all

Time window for results

Available options:
all,
year,
month,
week,
day,
hour

Response

Successful Response

id
string
required
title
string
required
url
string
required
@type
string
default:@reddit_post
author
RedditAuthor · object
subreddit
string | null
subreddit_id
string | null
created_at
integer | null
vote_count
integer | null
comment_count
integer | null
post_type
string | null
content_url
string | null
text
string | null
thumbnail_url
string | null
nsfw
boolean
default:false
spoiler
boolean
default:false