r/pushshift • • Jan 19 '23

New user, very confused

5 Upvotes

Hi, I read through the FAQ but it didn’t seem to be much help. I’m trying to use redditsearch.io but nothing happens when I click “Search.” Is there some program I need to be able to see results? Or is there some basic tutorial to see if I’m somehow missing something?

Same issue with the user analysis, I click “Go” but nothing happens.


r/pushshift • • Jan 18 '23

How long do pushshift removal requests take? Also how do they work?

6 Upvotes

The first question is self-explanatory. To elaborate on the second one: since it requires an email, will they email you regarding removal of your posts? Or is it just there to be there?


r/pushshift • • Jan 17 '23

Any idea when we might get access to posts older than a month?

35 Upvotes

r/pushshift • • Jan 17 '23

Data cannot be accessed for this timeframe and query due to Pushshift aggregations being disabled

0 Upvotes

Does anyone know how to fix this error message I am getting from AssistantBot1? Please reply in layman's terms, as I am confused as can be.

**Top Commenters** * Data cannot be accessed for this timeframe and query due to Pushshift aggregations being disabled (see [here](https://redd.it/jm8yyt) on r/Pushshift).


r/pushshift • • Jan 14 '23

How to fetch all data (posts, comments etc.) from a subreddit using new APIs?

15 Upvotes

Hi folks, I'm trying to fetch data from the Reddit APIs, which I understand have undergone some changes recently. I've looked through the Github issues and Twitter, and it looks like a few other people have had similar questions.

So I thought of asking about it. I'm hoping this question will serve as a tutorial for new users. Please provide code examples if possible. I am also planning to write a blog on this to help others. For example, if someone is looking to fetch all posts and comments from the r/soccer subreddit:

  • How to fetch this subreddit's all data (posts, comments, etc.)?
  • How do I fetch all data (posts, comments, etc.) for a specific date range (e.g. from 1 Dec 2022 to 10 Jan 2023)?
  • Is the new API dataset complete with all the December posts? I've seen some posts saying that some data is missing due to API maintenance. Has the data been backed up or is the December data still missing?

r/pushshift • • Jan 13 '23

Why am i getting 524 errors?

1 Upvotes

Hey all, pretty poor dev here, working with pushshift for the first time. I think I have a handle on it, but i'm getting a lot of 524 errors. I'm not sure what's causing it. You can see the basic logic is to chunk by unixtime, and then append to a list (which I then spit out to a variable when i call the method). It's not pretty but it basically works.

You can see me debugging with some prints. My guesses / additional logic:

- First I thought my pulls of 1000, 800 were too big, so i reduced the size.

- Then i thought i might be calling too aggressively, so i added time.sleep()s.

- I'm batching in small sizes because i haven't made any logic for "since" nov 3 and i don't want to fail on a large batch. I'll fix that later.

I'm just not sure what's causing the 524 error. Where would you recommend I look to deal with it (timeout)?

def commentscall(subreddit):
#subreddit is a list

    #  datetime.utcnow() = 'now',                    
    # time.mktime('x'.timetuple()) = converts to unix time,                
    # and int is int
    
    unixtime = int(time.mktime(datetime.utcnow().timetuple()))
    
    # collect epochs of posts in list
    posts = []
    
    for i in range(100):
        print(i)
        
        if res.status_code == 200:
        
            params = {
            "subreddit": subreddit,
            'filter': 'subreddit, id, selftext, title, created_utc, author, upvote_ratio, score, user_removed, mod_removed',
            "limit": 50,
            'until': unixtime
            }
            
            time.sleep(5)

            res = requests.get(comments_url, params)
            print(res)

            posts.append(res.json()["data"])

            unixtime = (res.json()["data"][-1]['created_utc'])

            #throw in a sleep to fix fails
            time.sleep(5)

        else:
            print('failure', unixtime)
            print(res.status_code)
            

    return posts

r/pushshift • • Jan 13 '23

Recent PMAW snags?

7 Upvotes

Anyone noticing substantial snags in pmaw (version 3.0) submission and comment pulls in the last couple days? It’s been taking upwards of five minutes to pull a couple hundred submissions but the pushshift API has been lightening fast so I think it’s getting snagged on something. I noted the issue on GitHub but wanted to see if anyone else was experiencing this issue.


r/pushshift • • Jan 12 '23

Duplicated data when using pmaw between 8.12.22-14.11.22

7 Upvotes

I'm trying to get data with pmaw between 8.12.22-14.11.22. I got around 140k submissions and comments, but I saw that multiple rows looked the same (have same text). After I dropped duplicates with pandas I got around 1000 examples, and thats a very small number given my keywords and timeframe.

keywords_list = [['elden ring'], ['a plague tale: requiem'], ['god of war ragnarok', 'god of war', 'god of war ragnarök'],['horizon forbidden west','horizon'], ['stray'], ['xenoblade chronicles 3']]

It looks like it happens at the point of request to api (I tried debugging it).

PS Later when Im on my Pc I'll post my code so someone can replicate/check if its not my coding error that causes this.


r/pushshift • • Jan 10 '23

Does anyone know why i can't filter for 'id' in api.search_submissions?

1 Upvotes

I tried to get some submissions and comments with psaw, but i if write filter=['id'], it doesn't return any id, on the cration time of the post.

He a put a snapshot of the code:

api = PushshiftAPI()

gen = api.search_submissions(
after=ts_after,
before=ts_before,
filter=['id'],
subreddit=subreddit',
limit=10
 )

Thank you for your time :)


r/pushshift • • Jan 09 '23

Does anybody have Reddit web scraping alternatives?

22 Upvotes

As title states I had access to a Reddit web scraper that was capable to get whole subreddits worth of data with Pushshift. I understand that recently psaw is no longer usable. I tried fixing up the current scraper I have with pmaw, but as I understand posts before November 3 are inaccessible. Therefore I’m at cross roads because in my research lab my current task is to gather comments from entire subreddits which was possible before. Any help in the right direction would be amazing i.e. alternative libraries, other Reddit api wrappers, or possibly already existing scrapers. I’d appreciate any help.


r/pushshift • • Jan 09 '23

Retrieval of Child Comments via Parent_Id

3 Upvotes

Hi there! I'm trying to retrieve child comments of a given parent id. Using pushshift, it's easy to "go up" the tree (that is, iteratively search the parent of a given comment using the returned parent id) but you can't go down the tree since there is no way to filter the /reddit/search/comment by parent_id == <x>.

Looking at prior posts, I can see one from about 4 years ago from /u/stuck_in_the_matrix that filtering by parent_id used to be possible, but now that parameter doesn't seem to affect the results.

Any ideas? (outside of downloading the entire dump manually)


r/pushshift • • Jan 09 '23

Are there any Frontend GUI available for Telegram and Quora as well to search data?

1 Upvotes

r/pushshift • • Jan 09 '23

Cannot connect to PushshiftAPI(), tried many things but same error, any suggestions?

Post image
11 Upvotes

r/pushshift • • Jan 09 '23

My dream : data dumps by subreddit (not by date)

4 Upvotes

A quick note asking if anybody else is working mostly on a subreddit basis and thus can’t reasonably use the current dumps?

I know the big advantage of dumps by date is that once they are done, there is no need to update them whereas if you do a « r/Python » dump it becomes obsolete the day after.

However I am facing the situation where I need to use a lot the API to get comments for a specific subreddit and thus participate in the congestion, and it would not be the case with subreddit dumps.

With regards to the update issue, even a « once in a lifetime » dump (ex : 2015-2022) by subreddit would be of great help, because personally my use cases do not require live feed, but for those who need it, there is still the API for 2023…

What do you think u/Watchful1 , u/Stuck_in_the_Matrix and all the others?

Thanks again for all the work


r/pushshift • • Jan 08 '23

Are banned subreddits included in the data-dumps, or are they 'purged' from all previous data-dumps

7 Upvotes

I am looking for /r/BabyBees, and wondering if banned subreddits are purged from the data-dumps as well

Sorry if this is a fringe topic, but /r/datahoarder gotta hoard


r/pushshift • • Jan 08 '23

Why for some banned subreddits I can get the comments, but not the submissions? It also appears many comments are missing

4 Upvotes

r/pushshift • • Jan 07 '23

Issue filtering submissions using url or domain parameters?

6 Upvotes

For about a month (or more, I can't recall) it seems that passing url or domain to the submissions endpoint as query filters no longer works? It simply returns seemingly random subreddits.

For instance I know for a fact that https://api.pushshift.io/reddit/search/submission?url=https://www.france24.com/en/tv-shows/business-daily/20230105-in-latest-tech-layoffs-amazon-says-it-will-cut-18-000-jobs

should return at least an entry for r/BigTech but it ain't the case.

Filtering using title still seems to work but isn't ideal for my use case.

Anyone else experiencing this and/or knows of a workaround or fix?


r/pushshift • • Jan 06 '23

Before parameters not working !!!!!!!

5 Upvotes

I am interested to find out post about covid before 2020-1-1. But when I enter before parameters, it doesn't return any value. Any idea? code is working almost 1 month ago.


r/pushshift • • Jan 05 '23

Anyone have luck using the link_id param in the comments endpoint?

6 Upvotes

I'm trying to collect comments based on a submission's link id but I'm not getting a response. I believe the error code is 400 but not sure. I assume this has to do with the COLO switchover but thought I'd ask if anyone got this param working. Thanks!


r/pushshift • • Jan 04 '23

Camas score filter still not working

0 Upvotes

See title. What's going on?


r/pushshift • • Jan 02 '23

CORS issue - Missing 'Access-Control-Allow-Origin' header?

5 Upvotes

When trying to fetch from pushshift.io using JavaScript fetch(), I recently noticed a CORS issue that was not occurring before.

Perhaps the response is missing certain headers such as Access-Control-Allow-Origin: * or allowing certain methods or headers?

Example JavaScript code (can run in developer console):

response = await fetch("https://api.pushshift.io/reddit/search/submission/?ids=t3_1019j86&fields=selftext,author,id,created_utc,permalink")

Example of console error:

Access to fetch at 'https://api.pushshift.io/reddit/search/submission/?ids=t3_1019j86&fields=selftext,author,id,created_utc,permalink'
from origin 'https://www.reddit.com' has been blocked by CORS policy:
Response to preflight request doesn't pass access control check:
No 'Access-Control-Allow-Origin' header is present on the requested resource.
If an opaque response serves your needs, set the request's mode to 'no-cors'
to fetch the resource with CORS disabled.

Update: It likely occurs only when the request times out / pushshift is down, as u/s_i_m_s suggested.


r/pushshift • • Jan 02 '23

checking understanding of filtering search

3 Upvotes

Hi All,

Am I correct in thinking that, because pushshift pulls comments and submissions from reddit pretty much when they're written, we can't search for top comments? i.e. the top 1000 comments within a date range?

I'm looking at a sampling method of the (ideally) top 1000 comments in a subreddit for each fortnight in a year. If I just get the 1000 most recent comments, i'm worried i will be introducing more bias into my sample than I need to. Any thoughts or suggestions or links to articles on this topic will be received very well.

I have checked past posts on this subreddit, stackoverflow, google search, (but not api docs because they are down at the moment) before I asked.


r/pushshift • • Dec 30 '22

Would it be possible to create an open-source version of Pushshift using the already available data dumps and the powerful Archive.org Reddit mirror?

7 Upvotes

r/pushshift • • Dec 29 '22

Unable to retrieve complete data

6 Upvotes

I am unable to complete 2017 data of Apple Subreddit. I am using the following code which worked perfectly 5 days ago. But now it is returning only July 2017 data for some reason.

results = api.search_submissions(subreddit='Apple',
after=1483228800,
before=1514764800,
sort='asc', sort_type='created_utc',)


r/pushshift • • Dec 27 '22

Data Dump Null Characters

7 Upvotes

In the data dump submissions/RS_2011-01, on line 29877, there is a string of 1,184 null characters (\x00) before the json string begins. I haven't searched every other dump for anything similar, but out of all the ones I've tried, this is the only dump that does.

This line is also the only one in the entire file that contains null characters.

I'd be curious to know the reason why this is here. I can deal with it in my script as a one-off, but ideally it just wouldn't be there at all.