Every Reddit post that submitted one exact web page (an article, a product page, a video), most-commented first, up to 25 per page. A link nobody submitted answers an empty list; for every post linking anywhere on a website use /domain/posts. Billed 1 request per page.
HTTP Request
GET /post/by-url
Cost (in requests): 1 per page. Every successful answer reports its cost in data.billed_requests.
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
link | string | Yes | - | Full address of the page (https://example.com/some/page, scheme optional). Matching is exact apart from the scheme, a #fragment and a trailing slash: www. and http-vs-https as submitted on Reddit count as different links when Reddit indexed them separately; try both spellings if a page was shared both ways. |
page_token | string | No | - | Opaque page token from a previous response’s next_page_token. Omit for the first page. |
per_page | integer | No | 25 | Posts per page, 1–25 (default 25). Reddit’s search also returns posts of similar links; they are taken out, so a page can hold fewer. |
include_html | boolean | No | false | Adds body_html (the rendered HTML body) to every post and comment. Default: left out; body_text carries the same text. |
Response
Real response to GET /post/by-url?link=https://peps.python.org/pep-0851/ (arrays trimmed to 2 items, long texts cut with …).
| |
Response Fields
| Field | Type | Description |
|---|---|---|
status | boolean | true when the request succeeded |
request_id | string | Unique request identifier |
data | object | Posts that submitted the link (empty list when nobody did); null with error.code invalid_page_token. |
data.items | array | Posts that submitted this link, most comments first, 1-based position counted across pages. Each card’s url is the link as the author submitted it. |
data.has_next_page | boolean | More posts available. |
data.next_page_token | string / null | Token for the next page; null at the end. |
data.resolved_filters | object | The link as sent and as looked up. |
data.resolved_filters.link | object | input = the address as sent; resolved = the normalised link the lookup used (no scheme, no #fragment, no trailing slash). |
data.resolved_filters.link.input | string | What the caller sent. |
data.resolved_filters.link.resolved | string | What was applied on Reddit (null when not applied). |
data.resolved_filters.link.source | string | param (applied as given), default, not_found (the value does not exist on Reddit), private / banned / quarantined (a community in the scope that cannot be read: skipped), or not_available (translate_to only: Reddit had no translated listing, the rows are served in their original language). |
data.billed_requests | integer | Requests billed for this call (also sent as Requests in the X-RapidAPI-Billing header when it is not RapidAPI’s default of 1). |
request_params | object | Echo of the parameters you sent |
Error Responses
Invalid input returns HTTP 400, not billed. error is a plain string that names the parameter:
| |
| Status Code | Cause | Description |
|---|---|---|
| 400 | Invalid or missing parameter | Plain-English message per field. Not billed |
200 with status: false | Item not available | error.code is not_found, deleted (post removed or deleted). data is null. Billed 1 request |
| 503 | Reddit temporarily unreachable | "error": "Service temporarily unavailable". Not billed, retry later |
200 with status: false | Bad page token | error.code is invalid_page_token: pass next_page_token from the previous answer unchanged |
Code Examples
| |
| |
| |
Related Endpoints
- Post Extract : AI extraction of structured rows from a thread
- Post Crossposts : Crossposts and other discussions of a post
- Post Batch : Look up to 200 posts in one request