Reputation: 59
The GUI search documentation for reddit (https://www.reddit.com/wiki/search/) says that it is possible to do a reddit search and retrieve Posts, Comments and Subreddits related to the search term.
Is there anyway to do something similar using the API? I've gone through PRAW but it only shows how to search within a Subreddit. What I want is to search reddit using API and retrieve Posts, Comments and Subreddits related to the search term.
Hope I've been able to explain my problem clearly :) I'm very bad in explaining things
Upvotes: 0
Views: 1215
Reputation: 148
it is quite simple the docs I used are here if you need any more information
for submission in reddit.subreddit("all").search("SEARCH TERM"):
print(submission.url)
print(submission.id)
print(submission.title)
Upvotes: 1