The Palos Publishing Company

Follow Us On The X Platform @PalosPublishing
Categories We Write About

Scrape Reddit AMA responses by user

Scraping Reddit AMA responses by a specific user requires accessing Reddit’s data either through the Reddit API (official and compliant method) or using web scraping techniques (less reliable, subject to Reddit’s anti-bot protections, and potentially against Reddit’s Terms of Service).

Method 1: Using Reddit API (Recommended)

  1. Register for Reddit API access:

    • Go to Reddit Apps

    • Click “Create another app”

    • Fill in:

      • name: e.g. “AMA Scraper”

      • type: “script”

      • redirect URI: http://localhost:8080

    • Note down the client_id and client_secret

  2. Use PRAW (Python Reddit API Wrapper):
    Install it:

    bash
    pip install praw

    Sample script to get AMA responses by a specific user:

    python
    import praw reddit = praw.Reddit( client_id="YOUR_CLIENT_ID", client_secret="YOUR_CLIENT_SECRET", user_agent="AMA Scraper by u/YOUR_USERNAME" ) username = "SPECIFIC_USER" # e.g. 'IamA' user = reddit.redditor(username) for comment in user.comments.new(limit=1000): if 'AMA' in comment.subreddit.display_name or comment.subreddit.display_name == 'IAmA': print(f"Subreddit: {comment.subreddit}") print(f"Comment ID: {comment.id}") print(f"Parent Post Title: {comment.submission.title}") print(f"Response: {comment.body}n{'-'*80}")

Method 2: Web Scraping (Not recommended unless API is not feasible)

Use requests + BeautifulSoup or Selenium, but Reddit’s structure is JavaScript-heavy, making scraping inefficient without rendering pages like a browser.


Notes:

  • Respect Reddit’s API rate limits.

  • Only public user comments are accessible.

  • AMA posts are usually found in r/IAmA, but other subs like r/science, r/AskReddit, etc., might also host AMAs.

Would you like a complete script that saves all AMA responses to a CSV or JSON file?

Share this Page your favorite way: Click any app below to share.

Enter your email below to join The Palos Publishing Company Email List

We respect your email privacy

Categories We Write About