Capture a page as a PNG
Automatically capture a page as a PNG on reddit.com. Screenshot any URL (not limited to Reddit) at a pinned viewport width and pixel density, and save it to the machine's Downloads folder as a real browser download. Runs signed in when the target host has a session, so Reddit captures have no cookie banner and no logged-out login panel. fullPage:true captures the whole scrollable page for assets that need scrolling; pass clipHeight to bound a very long page. Returns the filename, size in bytes, image width and height, and the page title. Confirmed on reddit.com: capturing while signed OUT triggers Reddit's bot detection (tab gets detached non-deterministically); once the device is actually logged into Reddit, both fullPage and viewport-only captures are clean.
Input
url requiredURL to capture.
filename requiredDownload filename, e.g. search-tall.png
fullPage optionalCapture the whole scrollable page rather than just the viewport.
Default: truesettleMs optionalHow long to let the page settle before shooting.
Default: 4500clipHeight optionalOptional CSS-px cap on captured height; useful when fullPage would be enormous.
viewportWidth optionalCSS viewport width to pin.
Default: 1280viewportHeight optionalCSS viewport height to pin.
Default: 1000deviceScaleFactor optionalDPR. 2 yields a 2x asset.
Default: 2Output
bytes optionaltitle optionalwidth optionalheight optionalfilename optionalloggedIn optionalFAQ
Get Reddit thread
Fetch a Reddit thread by its id or URL: the post (title, text, author, score, upvote ratio, comment count, type, link) and its comments in thread order, each with author, text, score, date, permalink and nesting depth. Needs a browser signed in to Reddit. By default it returns the first page of comments Reddit shows when the thread opens; set all_comments to expand every "more replies" and get the whole tree. num_comments counts deleted and removed comments too, so the list can be shorter than that number even when it is complete. sort picks Reddit's own comment order (best, top, new, controversial, old, Q&A).
Get subreddit threads
List a subreddit's threads by Reddit's native sort (best/hot/new/top/rising). "new" is chronological (filter with `since`); "top" takes a `time` window (hour…all); others paginate by `limit`. Returns url, title, author, score, num_comments, created, post_type, and body — the post's full text (never truncated; null for link/image posts). `limit` is a maximum, not a guarantee: fewer matching threads returns what exists.
Search Reddit
Search posts across all of Reddit (no subreddit restriction), with optional sort and time window. Returns count and threads (each with id, url, title, author, subreddit, score, num_comments, created, nsfw, preview_text). `limit` is a maximum: fewer matching posts than requested returns however many exist. Useful to discover which subreddits discuss a topic. The sort changes how relevant the results are: `top` orders Reddit's matches by score, and because Reddit matches loosely, a heavily upvoted post only tangentially related to the query can outrank the genuine matches. That is Reddit's own ranking, returned as-is. Use the default `relevance` sort when on-topic results matter, and treat a non-zero count under `top` as "Reddit returned something", not as proof the posts are about the topic. Reddit refuses connections from datacenter addresses, so this works as-is on your own browser; on a hosted cloud browser the session has to be given a country so it exits through a residential address, otherwise Reddit blocks it and the script says so.
