Reddit Domain Posts API - Posts Linking to a Site

Posts that link to a site — hot, new, top, rising

Retrieve the Reddit posts that link to one site, such as github.com. Subdomains are included, so github.com also finds posts linking to gist.github.com. Supports sorting by hot, new, top, rising and controversial, with the same post fields, paging and include as community-posts. A site no post links to answers 200 with an empty items list and the note "No posts link to this site." Billed per page like community-posts: 1 credit per page of 25 posts.

POST /domain-posts Community
https://api.fetchlayer.dev/reddit/domain-posts
OpenAPI JSON

Headers

Authorization string required

Bearer token — your FetchLayer API key.

Parameters

domain string required

The site posts link to, such as github.com. A full URL is reduced to its host and a leading www. is dropped. Subdomains are included. Anything that is not a site name is a 400.

sort string optional

Feed sort order: hot, new, top, rising, or controversial. (default: hot)

limit integer optional

Maximum number of posts to return. (default: 25)

time string | null optional

Time filter for top and controversial sorts: hour, day, week, month, year, or all.

pages integer optional

How many pages of results to return, at most. Each page holds 25 results. If omitted, results continue until `limit` is reached (or the 45s time budget ends, returning partial results with `incompleteReason: "scrape_timeout"`), billed as `ceil(items returned / 25)`. If passed, results are capped at that many pages and billed per page actually returned (see `pagesScraped` in the response).

after string optional

Continue after this post: pass nextCursor from a previous response (a post fullname such as t3_abc123, or a bare id). Use the same sort and time.

include string[] optional

Extra fields per post: ["body"] adds the full post body as bodyText, bodyHtml and bodyMarkdown. Off by default, as it makes responses about three times larger. ["media"] adds media[] to each post, in display order: images, gallery slides with captions, videos with a still (poster), link preview images, with sizes, plus blurredUrl for NSFW or spoiler media. Same price as without it.

Response Fields

domain-posts

Posts that link to a site — hot, new, top, rising

listingType string

Always domain-posts for a successful response.

requestedUrl string

The Reddit URL the request was for.

finalUrl string

Final URL after redirects.

domain string

The site as searched: a host in lower case, without a leading www.

sort string

Applied feed sort order.

time string | null

Applied time filter, or null when none was supplied.

listingTitle string | null

Display title of the listing.

items[].id string | null

Reddit post ID without the t3_ prefix.

items[].fullname string | null

Reddit post fullname, including the t3_ prefix.

items[].subreddit string | null

Subreddit name without the r/ prefix.

items[].subredditPrefixed string | null

Subreddit name with the r/ prefix.

items[].author string | null

Author username.

items[].title string | null

Post title.

items[].permalink string | null

Absolute URL of the Reddit comments page.

items[].shortlink string | null

Short redd.it URL for the post.

items[].url string | null

Absolute post content URL.

items[].domain string | null

Hostname or Reddit domain associated with the post.

items[].createdAt string | null

ISO 8601 creation timestamp.

items[].flair string | null

Post flair text, or null when the post has no flair.

items[].score number | null

Post score.

items[].scoreText string | null

Score text as displayed by Reddit.

items[].commentCount number | null

Comment count.

items[].commentCountText string | null

Comment count text as displayed by Reddit.

items[].previewText string | null

Text preview for self posts, or null when unavailable.

items[].thumbnailUrl string | null

Post thumbnail URL, or null when unavailable.

items[].nsfw boolean

Whether the post is marked NSFW.

items[].spoiler boolean

Whether the post is marked as a spoiler.

items[].locked boolean

Whether the post is locked.

items[].stickied boolean

Whether the post is stickied.

items[].removed boolean | null

true when the post has been removed or deleted, false when it is live, null when its status could not be read for this response (notes says how many). Reddit leaves removed posts out of this listing, so a listed post is false; null appears only when its status could not be read.

items[].removedByCategory string | null

Almost always null: Reddit leaves removed posts out of this listing. When removed is true (rare), the same values as the post route.

itemCount number

Number of posts returned in items.

nextPageUrl string | null

The next page’s address, or null at the end. On endpoints that take `after` it is an api.fetchlayer.dev address: POST it with your key to get the next page (a body is optional; fields you send override the address), or pass its `after` parameter as `after`.

prevPageUrl string | null

The previous page’s address (its `before` parameter is the cursor), or null.

pagesRequested number

Number of pages requested.

pagesScraped number

Pages of results returned. This is what the request is billed at: 1 credit per page actually returned, never per page requested.

scrapedAt string

ISO 8601 time the result was produced.

transport string

The data source: always the platform id, "reddit".

notes string[]

Caveats about this result, for example how many posts had a removal status that could not be checked.

items[].authorId string | null

The author’s account id (t2_…), which stays the same if the username changes.

items[].subredditId string | null

The subreddit’s id (t5_…).

items[].numCrossposts integer | null

Exact number of crossposts; null when it could not be checked.

items[].postType string | null

What kind of post it is: text, link, image, video or gallery; null when not known. Only text posts have a body.

items[].media object[] | null

Only with include ["media"]. The post's media, in display order. null for a text post, a removed post, or a post whose media could not be read on that request; notes says how many. Image and gallery originals (i.redd.it) are stable addresses. Preview and poster addresses (preview.redd.it, external-preview.redd.it) can expire or change, so **download them rather than linking to them long-term.**

items[].media[].kind string

image, gallery_item (one slide of a gallery, in Reddit's order), video, or link_preview (a link post's preview image).

items[].media[].url string

The real, unblurred media. Reddit-hosted video has no single MP4 with audio: url is the video's HLS streaming playlist (.m3u8, audio and video together, playable by HLS players such as ffmpeg, VLC or hls.js). Embedded videos (for example Streamable or YouTube) point to the provider's page.

items[].media[].width number | null

Width in pixels; null when not known.

items[].media[].height number | null

Height in pixels; null when not known.

items[].media[].caption string | null

gallery_item only: the slide's caption, null when it has none.

items[].media[].poster object | null

video only: a still image of the video, { url, width, height }.

items[].media[].blurredUrl string | null

Reddit's blurred version of an NSFW or spoiler post's media, when Reddit provides one; otherwise null. The post keeps its nsfw and spoiler flags; url is always the real media.

items[].linkUrl string | null

What a non-text post points to: the external site, the image, video or gallery, or a crosspost’s original. Null for a text post. url is unchanged.

items[].bodyText string | null

Only with include ["body"]: the full post body as plain text. Null when postType is not text. For a text post, null means a title-only post with no body text, or — when a note says so — a body that could not be returned this time.

items[].bodyHtml string | null

Only with include ["body"]: the full post body as HTML.

items[].bodyMarkdown string | null

Only with include ["body"]: the full post body as Markdown, converted from the HTML — it renders the same, but is not byte-identical to what the author typed.

nextCursor string | null

Pass as after to continue exactly where this response stopped, even partway through a page; null at the end.

Request

curl -X POST "https://api.fetchlayer.dev/reddit/domain-posts" \
  -H "Authorization: Bearer ss-your-key" \
  -H "Content-Type: application/json" \
  -d '{"domain":"github.com","sort":"top","time":"week","limit":1}'

Response

{
  "listingType": "domain-posts",
  "requestedUrl": "https://www.reddit.com/domain/github.com/top/?t=week",
  "finalUrl": "https://www.reddit.com/domain/github.com/top/?t=week",
  "domain": "github.com",
  "sort": "top",
  "time": "week",
  "listingTitle": "Posts linking to github.com",
  "items": [
    {
      "id": "xyz",
      "fullname": "t3_xyz",
      "subreddit": "opensource",
      "subredditPrefixed": "r/opensource",
      "title": "A small tool that does one thing well",
      "author": "maintainer42",
      "score": 1800,
      "scoreText": "1.8K",
      "commentCount": 120,
      "commentCountText": "120",
      "permalink": "https://www.reddit.com/r/opensource/comments/xyz/a_small_tool_that_does_one_thing_well/",
      "shortlink": "https://redd.it/xyz",
      "url": "https://github.com/example/tool",
      "domain": "github.com",
      "createdAt": "2026-11-10T09:00:00.000Z",
      "flair": "Project",
      "previewText": null,
      "thumbnailUrl": null,
      "nsfw": false,
      "spoiler": false,
      "locked": false,
      "stickied": false
    }
  ],
  "itemCount": 1,
  "nextCursor": "t3_xyz",
  "pagesRequested": 1,
  "pagesScraped": 1,
  "notes": [],
  "scrapedAt": "2026-11-10T09:30:00.000Z",
  "transport": "reddit"
}
Product overview Reddit API: what it returns, pricing and use cases