API DocsredditSearchFetch Reddit APP Dynamic Search Results
Fetch Reddit APP Dynamic Search Results
What this API is for
- Perform Reddit APP dynamic search, supporting posts, communities, comments, media, and users
GET
/openapi/api/v1/reddit/app/fetch_dynamic_searchPrice:Price unavailable · Actual charges depend on free quota and account discounts
Authentication
All API requests require a Bearer project token in the Authorization header
Authorization header
Authorization: Bearer YOUR_API_TOKENRequest parameters
- query: Search keywords or expression; post searches may match only some terms in titles or post bodies. See the syntax reference below
- search_type: Search type, options:
- post: Search posts (default)
- community: Search communities/subreddits
- comment: Search comments
- media: Search media (images/videos/GIFs)
- people: Search users
- sort: Sort method (only for post/comment/media types), options:
- RELEVANCE: By relevance
- HOT: Hot/trending
- TOP: Most popular
- NEW: Newest
- COMMENTS: By comment count (only for post type)
- time_range: Time range (only for post/media types), options:
- all: All time
- year: Past year
- month: Past month
- week: Past week
- day: Today
- hour: Past hour
- safe_search: Safe search setting, "unset" or "strict"
- allow_nsfw: Allow NSFW content, "0" or "1"
- after: Pagination cursor; when need_format=true, pass pageInfo.endCursor unchanged to fetch the next page
- need_format: Defaults to false; true reduces data to children and pageInfo, retaining core result content and pagination
| Name | Location / type | Required | Notes | Example |
|---|---|---|---|---|
| language | query / string | No |
| |
| query | query / string | Yes |
| |
| search_type | query / string | No |
| post |
| sort | query / string | null | No |
| RELEVANCE |
| time_range | query / string | null | No |
| all |
| safe_search | query / string | No |
| unset |
| allow_nsfw | query / string | No |
| 0 |
| after | query / string | No |
| |
| need_format | query / boolean | No |
| false |
Request examples
curl -X GET "https://api.trmesh.com/openapi/api/v1/reddit/app/fetch_dynamic_search" \ -H "Authorization: Bearer sdc_your_project_token" \ -H "Accept: application/json"
Response fields
- need_format=false: Original nested search result data
- need_format=true: data contains only:
- children: Results containing the corresponding post, comment, community or author content for search_type
- pageInfo: Available pagination fields, including endCursor, startCursor, hasNextPage and hasPreviousPage
- An empty children list means no results; when hasNextPage is true, continue using endCursor
- Compact results retain IDs, titles, content, timestamps, statistics, authors, communities and media. Markdown is preferred for bodies; duplicate body representations and avatar sizes are removed
| Field | Type | Notes | Example |
|---|---|---|---|
| children | unknown |
| |
| pageInfo | unknown |
|
Common response envelope
Common fields for response status, request identifiers and data
| Field | Type | Notes | Example |
|---|---|---|---|
| code | integer |
| |
| request_id | string | null |
| |
| message | string |
| |
| message_zh | string |
| |
| support | string |
| |
| time | string |
| |
| time_stamp | integer |
| |
| time_zone | string |
| |
| docs | string | null |
| |
| cache_message | string | null |
| |
| cache_message_zh | string | null |
| |
| cache_url | string | null |
| |
| router | string |
| |
| params | unknown |
| |
| data | unknown | null |
|
Errors and limits
The docs cover not only success responses, but also auth failures, rate limits, and data-service errors
| Code | Meaning | Notes |
|---|---|---|
| 200 | Success | The request completed and returned the standard response envelope. |
| 401 | Unauthorized | The token is missing, invalid, or no longer active. |
| 429 | Rate limited | The request exceeded token, user, or plan-level throughput limits. |
| 502 | Service unavailable | The gateway could not obtain a healthy result. Retry in a moment. |
Next steps
New to the API? Read the guide or explore examples