{"name":"Reddit Subreddit Posts API","description":"List the posts of a public subreddit with each post's title, author, score, comment count and link.","api_id":"generated_5d606dd36cbc1842abf1a210","slug":"reddit-subreddit-posts-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-26T09:41:34.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_5d606dd36cbc1842abf1a210_search","name":"List Reddit Subreddit Posts","description":"Return records within the accepted scope.","definition_version":"59b46515b6074f9d17ac46d11cbf7b0f6f5345fc9c560cdd02102e9ead1eb922","method":"POST","path":"/v1/catalog/public/apis/generated_5d606dd36cbc1842abf1a210/endpoints/generated_5d606dd36cbc1842abf1a210_search/run","url":"https://api.cleanedweb.com/v1/catalog/public/apis/generated_5d606dd36cbc1842abf1a210/endpoints/generated_5d606dd36cbc1842abf1a210_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":false,"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."},"sort":{"x-enum-labels":["New","Best","Hot","Top","Rising"],"x-value-status":["observed","verified","observed","observed","observed"],"x-input-proof":{"evidence":"declared","key":2,"kind":"link","notes":["same_records_as_collection"],"read":"listing","rule":"request_structure_v1","value":"best","where":"path"},"x-source-key":"sort","type":"string","pattern":"^[A-Za-z0-9][A-Za-z\\-_0-9]{0,127}$","minLength":1,"maxLength":128,"examples":["new","best","hot","top","rising"],"x-open-values":true,"description":"Optional. The name of a page of the same kind as the pages the pasted one links (any name that fits the pattern; the examples are the names it links). The site decides: a name it does not serve is refused as input_value_unverified. Omitted: new (New), the value of the page this API was built from.","not":{"type":"string","pattern":"\\n"},"x-source-route":"path_segment","x-input-type":{"kind":"string"},"default":"new","x-default-basis":"build_page"},"subreddit":{"x-enum-labels":["Python","Cooking"],"x-value-status":["observed","verified"],"x-source-key":"subreddit","type":"string","pattern":"^[A-Za-z_0-9][A-Za-z_\\-0-9]{0,127}$","minLength":1,"maxLength":128,"examples":["Python","Cooking"],"x-open-values":true,"description":"Required. The name of a page of the same kind as the pages the pasted one links (any name that fits the pattern; the examples are the names it links). The site decides: a name it does not serve is refused as input_value_unverified.","not":{"type":"string","pattern":"\\n"},"x-source-route":"path_segment","x-input-type":{"kind":"string"}}},"required":["subreddit"],"additionalProperties":false},"output_schema":{"type":"object","additionalProperties":false,"required":["title","url"],"properties":{"author":{"type":"string"},"author_id":{"type":"string"},"award_count":{"type":"integer"},"body":{"type":"string"},"comments":{"type":"integer"},"created_timestamp":{"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."},"domain":{"type":"string"},"icon":{"type":"string"},"ks_id":{"type":["string"]},"post_id":{"type":["string"]},"post_type":{"type":"string"},"score":{"type":"integer"},"title":{"type":"string"},"upvote_ratio":{"type":"number"},"url":{"type":"string","format":"uri"},"flair_names":{"type":"array","items":{"type":"string"}},"flair_urls":{"type":"array","items":{"type":"string"}},"privacy_policy_url":{"type":"string","description":"privacy policy url"},"author_url":{"type":"string","description":"author url"},"comment_count":{"type":"string","description":"comment count"},"detail_score":{"type":"string","description":"score"},"detail_upvote_ratio":{"type":"string","description":"upvote ratio"},"detail_subreddit_prefixed_name":{"type":"string","description":"subreddit prefixed name"},"shreddit_comments":{"type":"array","items":{"type":"object","additionalProperties":{"type":["string","number","boolean","array"],"items":{"type":"string"}}},"description":"shreddit comments"},"detail_flair":{"type":"string","description":"flair"},"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-26T09:41:34.468Z","live_verified":false,"request":{"input":{}},"records_shown":2,"records_saved":2,"records":[{"author":"AutoModerator","author_id":"t2_6l4z3","author_url":"https://www.reddit.com/user/AutoModerator/","award_count":0,"body":"Weekly Thread: Professional Use, Jobs, and Education 🏢 Welcome to this week's discussion on Python in the professional world! This is your spot to talk about job hunting, career growth, and educational resources in Python. Please note, this thread is not for recruitment . How it Works: Career Talk : Discuss using Python in your job, or the job market for Python roles. Education Q&A : Ask or answer questions about Python courses, certifications, and educational resources. Workplace Chat : Share your experiences, challenges, or success stories about using Python professionally. Guidelines: This thread is not for recruitment . For job postings, please see r/PythonJobs or the recruitment thread in the sidebar. Keep discussions relevant to Python in the professional and educational context. Example Topics: Career Paths : What kinds of roles are out there for Python developers? Certifications : Are Python certifications worth it? Course Recommendations : Any good advanced Python courses to recommend? Workplace Tools : What Python libraries are indispensable in your professional work? Interview Tips : What types of Python questions are commonly asked in interviews? Let's help each other grow in our careers and education. Happy discussing! 🌟","comment_count":"0","comments":0,"created_timestamp":"2026-11-26T00:00:14Z","detail_score":"4","detail_subreddit_prefixed_name":"r/Python","detail_upvote_ratio":"1","domain":"self.Python","icon":"https://styles.redditmedia.com/t5_1yz875/styles/profileIcon_klqlly9fc4l41.png?width=64&height=64&frame=1&auto=webp&crop=64%3A64%2Csmart&s=4cd002de4de73dc33950158eb385a54026d627e1","ks_id":"t3_1y5mnf3","post_id":"t3_1y5mnf3","post_type":"text","privacy_policy_url":"https://www.redditinc.com/policies/privacy-policy","score":3,"title":"Thursday Daily Thread: Python Careers, Courses, and Furthering Education!","upvote_ratio":1,"url":"https://www.reddit.com/r/Python/comments/1y5mnf3/thursday_daily_thread_python_careers_courses_and/","typed_comment_count":0},{"author":"DistributionBrief644","author_id":"t2_2mqepccoi8","author_url":"https://www.reddit.com/user/DistributionBrief644/","award_count":0,"body":"LLMs are still outputting code that is too sloppy for some engineers. However, there will come a point in the near future where a model can write a \"standard\" style of code. Style of code is something most python developers recognise, and i wonder if that conversation has started yet.","comment_count":"22","comments":22,"created_timestamp":"2026-11-13T09:07:23Z","detail_flair":"Discussion","detail_score":"0","detail_subreddit_prefixed_name":"r/Python","detail_upvote_ratio":"0.25862068965517243","domain":"self.Python","icon":"https://www.redditstatic.com/avatars/defaults/v2/avatar_default_0.png","ks_id":"t3_1xv34e5","post_id":"t3_1xv34e5","post_type":"text","privacy_policy_url":"https://www.redditinc.com/policies/privacy-policy","score":0,"title":"Eventually LLMs will write what will become industry standard python.","upvote_ratio":0.25862068965517243,"url":"https://www.reddit.com/r/Python/comments/1xv34e5/eventually_llms_will_write_what_will_become/","typed_comment_count":22}]}],"request_example":{"body":{"input":{"subreddit":"Python","sort":"new"},"version":1,"max_items":25},"curl":"curl -X POST https://api.cleanedweb.com/v1/catalog/public/apis/generated_5d606dd36cbc1842abf1a210/endpoints/generated_5d606dd36cbc1842abf1a210_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    \"subreddit\": \"Python\",\n    \"sort\": \"new\"\n  },\n  \"version\": 1,\n  \"max_items\": 25\n}'"},"result":{"method":"GET","url":"https://api.cleanedweb.com/v1/catalog/public/apis/generated_5d606dd36cbc1842abf1a210/endpoints/generated_5d606dd36cbc1842abf1a210_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-subreddit-posts-api/","markdown":"https://cleanedweb.com/catalog/reddit-subreddit-posts-api/index.md","live_contract":"https://app.cleanedweb.com/api/catalog/apis/generated_5d606dd36cbc1842abf1a210/endpoints/generated_5d606dd36cbc1842abf1a210_search/contract","run_docs":"https://cleanedweb.com/docs/run-catalog-api/"}}],"links":{"page":"https://cleanedweb.com/catalog/reddit-subreddit-posts-api/","markdown":"https://cleanedweb.com/catalog/reddit-subreddit-posts-api/index.md","contract":"https://cleanedweb.com/catalog/reddit-subreddit-posts-api/contract.json","catalog":"https://cleanedweb.com/catalog/","index":"https://cleanedweb.com/catalog/index.json","openapi":"https://cleanedweb.com/catalog/openapi.json"}}
