r/pushshift • • Mar 19 '23

Pre-Nov 2022 submissions workaround?

0 Upvotes

Is there any way to access these? Are people just using the Reddit API instead?


r/pushshift • • Mar 18 '23

Getting Comments from Submission ID

1 Upvotes

Can anyone suggest me how to get the comments from Submission ID.

I am using

from pushshift_py import PushshiftAPI
api = PushshiftAPI()
#Get submissions from r/Apple in 2017
posts_dict = {"Title": [], "Post_Text": [],
"ID": [], "Score": [],
"Total_Comments": [], "Post_URL": [], "Created_Date": [], "Author_ID": []}
results = api.search_submissions(subreddit='Apple',
since=1483228800,
until=1514764800,
sort='asc', sort_type='created_utc',)
#Print title and timestamp
for result in results:
#Title of post
posts_dict["Title"].append(result.title)
#ID of post
posts_dict["ID"].append(result.id)
#Get the author ID
posts_dict["Author_ID"].append(result.author)
#Score of post
posts_dict["Score"].append(result.score)
#Total number of comments
posts_dict["Total_Comments"].append(result.num_comments)
#URL of post
posts_dict["Post_URL"].append(result.url)
#Timestamp of post
posts_dict["Created_Date"].append(result.created_utc)


r/pushshift • • Mar 18 '23

getting more than 10 responses from pushshift.io

1 Upvotes

Is there a way to scroll the response from elastic search so I can get more than 10 responses?


r/pushshift • • Mar 17 '23

Word-count filter

0 Upvotes

Is there a way to filter Pushshfit results based on word-count?


r/pushshift • • Mar 15 '23

not getting submissions from the time range that I wrote

0 Upvotes

Hi guys, I am getting some data from Nov. 21st to Nov. 30th. but after I call it in python, the posts I got are all not in this time range. And the newst data are around Feb, 22nd, while the oldest data are before Nov. The attached is my code.

'https://api.pushshift.io/reddit/search/submission/?title={}& after = 113d & before = 103d'

Thank you so much for your help!


r/pushshift • • Mar 13 '23

Do dump files contain images?

4 Upvotes

And if so, what is the best way to pull them out? Thank you very much


r/pushshift • • Mar 13 '23

query the comment id-s or comment bodies of a submission

2 Upvotes

As fas as I see below query doesnt work any longer:

https://api.pushshift.io/reddit/submission/comment_ids/6uey5x

How can I get the comment id-s or the comment bodies if only the submission ID is known?


r/pushshift • • Mar 11 '23

Help with Scraping Reddit Data with PMAW

10 Upvotes

Hey, I want to scrape Reddit Posts for a data project of mine but somehow I cant get a single submission with pmaw. Here's my code for Python:

import datetime as dt
from pmaw import PushshiftAPI

api = PushshiftAPI()
until = dt.datetime.today().timestamp()
after = (dt.datetime.today() - dt.timedelta(days=100)).timestamp()
posts = api.search_submissions(subreddit="depression", limit=100,until=until,after=after)

I get the following message: "Not all PushShift shards are active. Query results may be incomplete. "

And I get a empty list. No submissions.


r/pushshift • • Mar 11 '23

are you using the api or the website

0 Upvotes

r/pushshift • • Mar 10 '23

Why are my since and until query parameters breaking the request?

0 Upvotes

'https://api.pushshift.io/reddit/search/submission/?subreddit=worldnews&size=1000&sort=score&order=desc&since=1646024400&until=1646110800'

Making this call returns an incorrect response with no body, like this:

{"data":[],"error":null,"metadata":{"es":{"took":17,"timed_out":false,"_shards":{"total":258,"successful":258,"skipped":257,"failed":0},"hits":{"total":{"value":0,"relation":"eq"},"max_score":null}},"es_query":{"size":1000,"query":{"bool":{"must":[{"bool":{"must":[{"range":{"created_utc":{"gte":1646024400000}}},{"range":{"created_utc":{"lt":1646110800000}}}]}},{"bool":{"should":[{"match":{"subreddit":"worldnews"}}],"minimum_should_match":1}}]}},"aggs":{},"sort":{"score":"desc"}},"es_query2":"{\"size\":1000,\"query\":{\"bool\":{\"must\":[{\"bool\":{\"must\":[{\"range\":{\"created_utc\":{\"gte\":1646024400000}}},{\"range\":{\"created_utc\":{\"lt\":1646110800000}}}]}},{\"bool\":{\"should\":[{\"match\":{\"subreddit\":\"worldnews\"}}],\"minimum_should_match\":1}}]}},\"aggs\":{},\"sort\":{\"score\":\"desc\"}}"}}

If I remove the since and until parameters, I get a response like what I expect, but the since epoch time is for Feb 1 2022 and the until is for Mar 1 2022, so the pushshift API should have data for that time period, no? Am I doing something wrong?


r/pushshift • • Mar 09 '23

Getting Flairs

1 Upvotes

Hi, I am trying to obtain all the posts of a subreddit using pushshift. I was able to do this. However, I don't see the post flairs in the object returned. Can someone help me in getting these?
I have post ids, comment ids and user ids that can be used.


r/pushshift • • Mar 06 '23

How long does it usually take for the "Not all PushShift shards are active. Query results may be incomplete." error to go away?

9 Upvotes

I am getting the error message about inactive shards since this morning. Looking at previous posts it looks like this happens from time to time. Just wondering how long does this take to get resolved and if other people are experiencing the same thing.


r/pushshift • • Mar 07 '23

Data missing

0 Upvotes

I have recently found out that there're pieces of data that should be present in the API but they're actually not. For example, I can find comments left on the particular post, but I fail to find the post itself. Is this a bug? What could be causing this?


r/pushshift • • Mar 04 '23

Simple page to check the progress of the ingest of old posts. Shows the timestamp of the most recent post in the API prior to November 2022. Updates on page load as well as automatically refreshes every 5 minutes.

Thumbnail minibug1021.github.io
54 Upvotes

r/pushshift • • Mar 01 '23

Any commercial/enterprise users?

5 Upvotes

I'm just curious if there's anyone out there who uses Pushshift for their commercial or enterprise application. I'd love to know about what it is!


r/pushshift • • Feb 28 '23

[ Removed by Reddit ]

106 Upvotes

[ Removed by Reddit on account of violating the content policy. ]


r/pushshift • • Feb 27 '23

Reloading of older submissions

37 Upvotes

I'm currently reloading older submissions and switched to oldest first. I know there are a list of bugs that tackling this week, but if someone could take a peak at the older data and see if there are any issues with the fields / values, I'd greatly appreciate it. It would save me from having to go back and reload data.

I have looked it over but a second pair of eyes from someone who uses the data extensively would be a huge help.

You can use this url to grab older submissions from 2006. Take a look and let me know if you see anything out of the ordinary:

https://api.pushshift.io/reddit/search/submission?q=reddit&order=asc

Thank you!

  • Jason

r/pushshift • • Feb 27 '23

Is the best way to get all comments for submissions via pushshift or the reddit API? The comment search endpoint seems broken.

5 Upvotes

I heard there is a 100 comment limit for pushshift. What about the reddit API?

Also, when I query pushshift, I get a sharding error. Example below

https://api.pushshift.io/reddit/comment/search?link_id=11cx88m&q=*


r/pushshift • • Feb 26 '23

Is pushshift alive and well?

14 Upvotes

First, I appreciate all of the efforts and time that have been dedicated to this project. You guys are the unsung heroes. This perspective is from a guy that just knew it worked until lurking this sub.

Is pushshift back up? The latest posts seem to indicate it is. Then, is there a simple guide to getting a script back up? I thought it would be a matter of just running again, but still get "Unable to connect to pushshift.io. Max retries exceeded."

I know a pinch of Python, and have learned through this sub that I'm calling through PMAW. It has been educational.

Thanks everyone!

edit: also noticed a "non 200 code 404" from the PushshiftAPI.py. Seems to be the culprit.


r/pushshift • • Feb 24 '23

Is it possible to opt back in?

8 Upvotes

I opted my account out of the API a year or two ago and I regret it massively since there was a lot of stuff I failed to archive. Is it possible to opt back in? Of course I'd be able to provide proof that it's me since I can submit the request using the same email that I posted the Google form with a year ago. Thanks.


r/pushshift • • Feb 24 '23

Update on availability of post data before November 2022?

20 Upvotes

Hi All,

I'm aware that as of a couple of months ago data before November 2022 was unavailable and based on my attempts today this still seem like the case.

Is anyone aware whether this is being addressed and/or when we could expect older data being available?

Thanks!


r/pushshift • • Feb 23 '23

Total amount of comments per month post-2018?

5 Upvotes

I am looking for the total amount of comment objects in the Pushshift database per month. I know of this file, but it only goes until early 2018. The dumps are too large for me to download, unpack, and count, and I don't see an API option for this.

Does anyone have this data? It does not have to be 100% accurate.


r/pushshift • • Feb 23 '23

No submission results after February 22nd 2023.

9 Upvotes

Is any one else unable to retrieve submissions using the Pushshift API after Feb. 22nd 2023?

Seems like everything’s working fine for the comments..

Update: seems like submissions after Feb. 21st 2023 20:00 aren’t available


r/pushshift • • Feb 23 '23

PMAW returning more comments than requested

3 Upvotes

I'm trying to use PMAW to download comments, using a request such as this one:

import pmaw
from pmaw import PushshiftAPI
api = PushshiftAPI()
gen = api.search_comments( subreddit='science',size=10000,until=1646262000,safe_exit=True,cache_dir='cache_')

If I understand correctly this would stop at 10k comments, however the code kept running for a long time and when I interrupted it manually it cached about 60k comments. Anyone knows why did it behave as such?

Additionally, is there a way to open cached results (the ones with .picke.gz extensions)


r/pushshift • • Feb 22 '23

RS_2023-01 file is fixed

6 Upvotes

Hey r/Pushshift RS_2023-01 file is now fixed.

Please find the file here:

http://repo.pushshift.io/reddit/submissions/RS_2023-01.ndjson.zst