{"id":13961404,"url":"https://github.com/pushshift/reddit_sse_stream","last_synced_at":"2025-06-30T19:08:39.154Z","repository":{"id":102302524,"uuid":"134253442","full_name":"pushshift/reddit_sse_stream","owner":"pushshift","description":"A Server Side Event stream to deliver Reddit comments and submissions in near real-time to a client.","archived":false,"fork":false,"pushed_at":"2022-05-30T20:22:51.000Z","size":36,"stargazers_count":48,"open_issues_count":7,"forks_count":3,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-05-02T22:35:44.951Z","etag":null,"topics":["bigdata","flask","reddit","server-side-events","sse","stream"],"latest_commit_sha":null,"homepage":"http://stream.pushshift.io","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pushshift.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2018-05-21T10:20:52.000Z","updated_at":"2025-04-27T10:17:02.000Z","dependencies_parsed_at":"2023-05-01T20:17:48.862Z","dependency_job_id":null,"html_url":"https://github.com/pushshift/reddit_sse_stream","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/pushshift/reddit_sse_stream","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pushshift%2Freddit_sse_stream","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pushshift%2Freddit_sse_stream/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pushshift%2Freddit_sse_stream/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pushshift%2Freddit_sse_stream/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pushshift","download_url":"https://codeload.github.com/pushshift/reddit_sse_stream/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pushshift%2Freddit_sse_stream/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262834796,"owners_count":23371851,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bigdata","flask","reddit","server-side-events","sse","stream"],"created_at":"2024-08-08T17:01:06.856Z","updated_at":"2025-06-30T19:08:39.113Z","avatar_url":"https://github.com/pushshift.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# Reddit SSE Stream\n\n### Link: http://stream.pushshift.io/\n\n## What is this?\n\nThis is an SSE stream that you can connect to using a browser or other programs to get a live feed of near real-time Reddit data (couple seconds delayed).\n\nThere is a caveat however -- SSE streams currently only work via http (no SSL). However, it does support compression! I highly encourage you to connect using compression headers to conserve bandwidth if you use the full feed.\n\n    curl --verbose --compressed 'http://stream.pushshift.io/?type=comments'\n\n## Parameters Supported\n\n| Parameter        | Description           | Possible Values  |\n| ------------- |:-------------| -----:|\n| type        |  Restrict feed to a particular event type.  Leave out to receive all event types. | comments,submissions |\n| author      | Restrict to certain authors.  Separate multiple authors with a comma.      |   String |\n| domain      } Restrict submissions to a domain or group of domains (Comma-delimited)       |   String |\n| submission  | Restrict to certain subreddits.  Separate multiple subreddits with a comma.       |    String |\n| submission_backfill | Starts stream X submissions ago (up to 25,000 submissions) | INT (1-100000)|\n| comment_backfill | Starts stream X comments ago (up to 100,000 submissions) | INT (1-100000) |\n| submission_start_id | Starts stream at specific submission ID (Used for continuation if the stream is broken | INT |\n| comment_start_id | Starts stream at specific comment ID (Used for continuation if the stream is broken) | INT |\n| over_18 | Restrict submissions in stream to NSFW or SFW content | Boolean (true or false) |\n| is_self | Restrict submissions in stream to self posts or linked posts | Boolean (true or false) |\n| filter  | Restrict the returned JSON object to specific keys (comma-delimited for multiple values) | String |\n\n## Examples:\n\nGet only submissions from news and politics:\n\n    curl --verbose --compressed 'http://stream.pushshift.io/?type=submissions\u0026subreddit=politics,news'\nGet only comments from automoderator:\n\n    curl --verbose --compressed 'http://stream.pushshift.io/?type=comments\u0026author=automoderator'\n\nNotice: When connecting with compression. It generally takes a little bit of time before it gets started.  Also, only one connection per IP is supported.  If you need additional streams, please contact me.\n\n## Event Types:\n\n| Event        | Description | Currently Implemented |\n| ------------- |:-------------|:------------|\n| rc | A new Reddit comment in json format | Yes|\n| rs | A new Reddit submission in json format | Yes |\n| rr | A new Reddit subreddit in json format| No |\n| keepalive | A keepalive message (every 30 seconds)| Yes|\n\n## Keepalive Messages:\n\nCurrently, a keepalive event is sent to the client every 30 seconds regardless if previous data was sent.  The keepalive event has the following information:\n\n| Key        | Value Description |\n| ------------- |:-------------|\n| tcs | Total Comments Sent\n| tss | Total Submissions Sent |\n| tbs | Total bytes sent (uncompressed)|\n\n## Python Consumer Example\n\npip install sseclient (From this wonderful github: https://github.com/btubbs/sseclient)\n\nTake a look at the consumer_example.py file that shows how to interact with the stream using Python and sseclient.\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpushshift%2Freddit_sse_stream","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpushshift%2Freddit_sse_stream","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpushshift%2Freddit_sse_stream/lists"}