{"name":"Reddit Post Search API","description":"Reddit posts matching a search query: title, subreddit, author, score, comment count and post link.","api_id":"generated_e28c9d4fe6f0af75564476a4","slug":"reddit-post-search-api","source":{"name":"Reddit","domain":"reddit.com","url":"https://www.reddit.com/"},"category":"social_communities","countries":[],"languages":[],"record_types":[],"tags":[],"limitations":[],"updated":"2026-11-27","note":"Sample records are saved samples, not a live run. CleanedWeb is not affiliated with the source.","version":"1.0","versions":[{"major":1,"latest_minor":"1.0","status":"current","sunset_at":null}],"changelog":[{"version":"1.0","date":"2026-11-26T11:21:17.000Z","kind":"major","changes":[]}],"version_note":"Pin a major with \"version\": N in the run body (an integer). Leave it out and the call runs on the latest major. A sunset major runs on the latest major and the response says rerouted. An unknown major answers 404 catalog_version_not_found and lists the available majors.","endpoints":[{"endpoint_id":"generated_e28c9d4fe6f0af75564476a4_search","name":"Search Reddit Posts","description":"Return records within the accepted scope.","definition_version":"bb7c1a8b73343131ffaf3bc81b3fc78f01efc382c3dcf772b9b5077edb5a9e6f","method":"POST","path":"/v1/catalog/public/apis/generated_e28c9d4fe6f0af75564476a4/endpoints/generated_e28c9d4fe6f0af75564476a4_search/run","url":"https://api.cleanedweb.com/v1/catalog/public/apis/generated_e28c9d4fe6f0af75564476a4/endpoints/generated_e28c9d4fe6f0af75564476a4_search/run","authentication":{"type":"bearer","scheme":"Authorization: Bearer <API key>","scope":"run","note":"Reading this file and the live catalog needs no credential. A run needs a CleanedWeb account and uses the credits of its workspace.","docs":"https://cleanedweb.com/docs/run-catalog-api/"},"required_headers":[{"name":"Authorization","value":"Bearer YOUR_API_KEY","description":"An API key with the run scope."},{"name":"Idempotency-Key","value":"UNIQUE_REQUEST_ID","description":"Required. Save it before you send; reuse it only to retry the same request and to read the result. 1-200 characters: letters, numbers, . _ : -"},{"name":"Content-Type","value":"application/json","description":"The body is JSON."}],"request_body":{"input":"An object that follows input_schema.","max_items":"Optional. Stop after this many records.","timeout_seconds":"Optional, 60-86400, default 10800.","wait_seconds":"Optional, 0-86400, default 90. How long the request waits before answering 202.","version":"Optional integer major. Leave it out for the latest major."},"input_schema":{"type":"object","properties":{"enrich_records":{"type":"boolean","default":true,"description":"true: read each returned record's product/detail page and merge its fields into the record. false: return list/search-level fields only, with no detail page reads. Every returned record's detail page is read within the run's time budget; records the time budget leaves unread are returned without detail fields, and summary.record_enrichment reports how many records were enriched and why any were not (run_time_budget). Detail fields are optional."},"search":{"anyOf":[{"type":"string","minLength":1,"maxLength":100,"pattern":"^[^\\x00-\\x1f\\x7f]+$","description":"Required. Text sent to the site's own search form; its result pages are read and revalidated like the collection."},{"type":"array","minItems":1,"items":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[^\\x00-\\x1f\\x7f]+$","description":"Required. Text sent to the site's own search form; its result pages are read and revalidated like the collection."}}],"description":"Required. Text sent to the site's own search form; its result pages are read and revalidated like the collection. Supply an array to union distinct results from each source search, in query order.","default":"cheesecake","x-source-key":"q"},"type":{"x-enum-labels":["All","Posts","Communities","Media","Comments","Profiles"],"x-value-status":["verified","observed","observed","observed","observed","observed"],"description":"Optional. One observed value of the site's own filter; the pasted page is read with only this value changed and revalidated like the collection. Omit for the pasted page. Setting this input runs the item's alternate html route (input_route:1), which reads the source page itself and is slower than the default route; limits and continuations are that route's.","x-input-proof":{"evidence":"declared","key":"type","notes":["same_records_as_collection"],"read":"listing","rule":"request_structure_v1","value":"all","where":"query"},"x-source-key":"type","type":"string","enum":["all","posts","communities","media","comments","people"],"x-input-type":{"kind":"enum"},"x-input-route":"input_route:1"},"cid":{"description":"Filter toggle (All): true sends cId=e52da069-addf-41f9-8a38-bc8d84a6ee91; false or omitted leaves it off, like the pasted page. Applies only within type=all: sent alone it selects type=all too; with another type the call is refused. Setting this input runs the item's alternate html route (input_route:1), which reads the source page itself and is slower than the default route; limits and continuations are that route's.","x-input-proof":{"evidence":"declared","key":"cId","notes":["same_records_as_collection"],"read":"listing","rule":"request_structure_v1","value":"e52da069-addf-41f9-8a38-bc8d84a6ee91","where":"query"},"x-source-key":"cId","type":"boolean","x-toggle-label":"All","x-source-checkbox-value":"e52da069-addf-41f9-8a38-bc8d84a6ee91","x-applies-with":{"input":"type","value":"all"},"x-input-type":{"kind":"boolean"},"x-input-route":"input_route:1"},"t":{"x-enum-labels":["All time","Past year","Past month","Past week","Today","Past hour"],"x-value-status":["verified","observed","observed","observed","observed","observed"],"description":"Optional. One observed value of the site's own filter; the pasted page is read with only this value changed and revalidated like the collection. Omit for the pasted page. Applies only within type=posts: sent alone it selects type=posts too; with another type the call is refused. Setting this input runs the item's alternate html route (input_route:1), which reads the source page itself and is slower than the default route; limits and continuations are that route's.","x-input-proof":{"evidence":"declared","key":"t","notes":["same_records_as_collection"],"read":"listing","rule":"request_structure_v1","value":"all","where":"query"},"x-source-key":"t","type":"string","enum":["all","year","month","week","day","hour"],"x-applies-with":{"input":"type","value":"posts"},"x-input-type":{"kind":"enum"},"x-input-route":"input_route:1"},"sort":{"type":"string","enum":["new","hot"],"x-enum-labels":{"new":"new","hot":"hot"},"x-source-keys":["sort"],"x-value-status":"verified","x-combination":"unproven","description":"Order of the collection, as the site's own sort control offers it; omitted keeps the site's default order. Setting this input runs the item's alternate html route (input_route:1), which reads the source page itself and is slower than the default route; limits and continuations are that route's.","x-combinable-with":["search"],"x-input-route":"input_route:1"}},"required":["search"],"additionalProperties":false},"output_schema":{"type":"object","additionalProperties":false,"required":["title","url"],"properties":{"comments":{"type":"integer"},"date":{"type":"string","format":"date-time","x-precision":"second","description":"ISO 8601 value computed from the source's relative date text (such as '3 months ago') at delivery time; precise to about one second."},"post_id":{"type":["string"]},"post_image":{"type":"string"},"post_nsfw":{"type":["boolean"]},"post_spoiler":{"type":["boolean"]},"profile_id":{"type":["string"]},"profile_name":{"type":["string"]},"score":{"type":"integer"},"src":{"type":["string"]},"subreddit_id":{"type":["string"]},"subreddit_name":{"type":["string"]},"subreddit_nsfw":{"type":["boolean"]},"subreddit_quarantined":{"type":["boolean"]},"title":{"type":"string"},"url":{"type":"string","format":"uri"},"privacy_policy_url":{"type":"string","description":"privacy policy url"},"author_url":{"type":"string","description":"author url"},"content_href":{"type":"string","description":"content href"},"comment_count":{"type":"string","description":"comment count"},"award_count":{"type":"string","description":"award count"},"created_timestamp":{"type":"string","description":"created timestamp"},"domain":{"type":"string","description":"domain"},"post_type":{"type":"string","description":"post type"},"upvote_ratio":{"type":"string","description":"upvote ratio"},"subreddit_prefixed_name":{"type":"string","description":"subreddit prefixed name"},"author_id":{"type":"string","description":"author id"},"author":{"type":"string","description":"author"},"icon":{"type":"string","description":"icon"},"permalink":{"type":"string"},"award_id":{"type":"string"},"award_icon_url":{"type":"string"},"typed_award_count":{"type":"integer","minimum":0,"description":"Reviewed numeric reading of award_count; source value is preserved."},"typed_comment_count":{"type":"integer","minimum":0,"description":"Reviewed numeric reading of comment_count; source value is preserved."},"typed_comments":{"type":"integer","minimum":0,"description":"Reviewed numeric reading of comments; source value is preserved."}}},"examples":[{"kind":"saved_validation_records","saved_at":"2026-11-26T11:21:17.524Z","live_verified":false,"request":{"input":{}},"records_shown":2,"records_saved":2,"records":[{"author":"_wrpd","author_id":"t2_4mpdhmwt","author_url":"https://www.reddit.com/user/_wrpd/","award_count":"22","award_icon_url":"https://www.redditstatic.com/marketplace-assets/v1/core/awards/bravo_v1_40.png","award_id":"award_bravo","comment_count":"1389","comments":1389,"content_href":"https://www.reddit.com/gallery/1hnnfb8","created_timestamp":"2024-12-27T19:58:25.459000+0000","date":"2024-12-27T19:58:25Z","domain":"reddit.com","icon":"https://www.redditstatic.com/avatars/defaults/v2/avatar_default_5.png","permalink":"/r/Baking/comments/1hnnfb8/my_best_cheesecake_to_date/","post_id":"t3_1hnnfb8","post_image":"https://preview.redd.it/my-best-cheesecake-to-date-v0-nton3wwj5g9e1.jpg?width=640&crop=smart&auto=webp&s=ce720707ec394b8e6a64d75ddb40918cf204fbe9","post_nsfw":false,"post_spoiler":false,"post_type":"gallery","privacy_policy_url":"https://www.redditinc.com/policies/privacy-policy","profile_id":"t2_4mpdhmwt","profile_name":"_wrpd","score":71571,"src":"https://b.thumbs.redditmedia.com/hbDHsJIGH1gWNGMaD4bZ2E9JyGiLxA3p9WqNT6RNunU.jpg","subreddit_id":"t5_2qx1h","subreddit_name":"Baking","subreddit_nsfw":false,"subreddit_prefixed_name":"r/Baking","subreddit_quarantined":false,"title":"My best cheesecake to date.","upvote_ratio":"0.9666490206458443","url":"https://www.reddit.com/r/Baking/comments/1hnnfb8/my_best_cheesecake_to_date/","typed_award_count":22,"typed_comment_count":1389},{"author":"hiimedddddgy","author_id":"t2_36ntlu2f","author_url":"https://www.reddit.com/user/hiimedddddgy/","award_count":"0","comment_count":"722","comments":722,"content_href":"https://www.reddit.com/gallery/1jpnv4z","created_timestamp":"2025-04-02T12:55:07.568000+0000","date":"2025-04-02T12:55:07Z","domain":"reddit.com","icon":"https://www.redditstatic.com/avatars/defaults/v2/avatar_default_7.png","permalink":"/r/Baking/comments/1jpnv4z/is_my_cheesecake_undercooked/","post_id":"t3_1jpnv4z","post_image":"https://preview.redd.it/is-my-cheesecake-undercooked-v0-fzx1lgkh5fse1.jpg?width=640&crop=smart&auto=webp&s=cb22bd1c2e0e80f28599eae81808aa05e2d42963","post_nsfw":false,"post_spoiler":false,"post_type":"gallery","privacy_policy_url":"https://www.redditinc.com/policies/privacy-policy","profile_id":"t2_36ntlu2f","profile_name":"hiimedddddgy","score":11605,"src":"https://a.thumbs.redditmedia.com/HGzPXNri-R3AfdjschllF6ZYrEUBypQeP3DqtlQfuV4.jpg","subreddit_id":"t5_2qx1h","subreddit_name":"Baking","subreddit_nsfw":false,"subreddit_prefixed_name":"r/Baking","subreddit_quarantined":false,"title":"Is my cheesecake undercooked?","upvote_ratio":"0.969076429827283","url":"https://www.reddit.com/r/Baking/comments/1jpnv4z/is_my_cheesecake_undercooked/","typed_award_count":0,"typed_comment_count":722}]}],"request_example":{"body":{"input":{"search":"cheesecake","type":"all"},"version":1,"max_items":25},"curl":"curl -X POST https://api.cleanedweb.com/v1/catalog/public/apis/generated_e28c9d4fe6f0af75564476a4/endpoints/generated_e28c9d4fe6f0af75564476a4_search/run \\\n  -H \"Authorization: Bearer YOUR_API_KEY\" \\\n  -H \"Idempotency-Key: UNIQUE_REQUEST_ID\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n  \"input\": {\n    \"search\": \"cheesecake\",\n    \"type\": \"all\"\n  },\n  \"version\": 1,\n  \"max_items\": 25\n}'"},"result":{"method":"GET","url":"https://api.cleanedweb.com/v1/catalog/public/apis/generated_e28c9d4fe6f0af75564476a4/endpoints/generated_e28c9d4fe6f0af75564476a4_search/result","note":"A run that does not end within wait_seconds answers 202. Read the result with the same API key and the same Idempotency-Key."},"links":{"page":"https://cleanedweb.com/catalog/reddit-post-search-api/","markdown":"https://cleanedweb.com/catalog/reddit-post-search-api/index.md","live_contract":"https://app.cleanedweb.com/api/catalog/apis/generated_e28c9d4fe6f0af75564476a4/endpoints/generated_e28c9d4fe6f0af75564476a4_search/contract","run_docs":"https://cleanedweb.com/docs/run-catalog-api/"}}],"links":{"page":"https://cleanedweb.com/catalog/reddit-post-search-api/","markdown":"https://cleanedweb.com/catalog/reddit-post-search-api/index.md","contract":"https://cleanedweb.com/catalog/reddit-post-search-api/contract.json","catalog":"https://cleanedweb.com/catalog/","index":"https://cleanedweb.com/catalog/index.json","openapi":"https://cleanedweb.com/catalog/openapi.json"}}
