Polymarket Scraper - Mac Guide ← Back to OS Selection

Polymarket Scraper

Mac Guide

Welcome Mac User!

This guide will walk you through installing and running the Polymarket Scraper on macOS. Follow each step carefully, and you'll be searching markets in no time.

Time needed: About 15-20 minutes

What You'll Need

  • A Mac computer (macOS 10.13 or newer)
  • Internet connection
  • Administrator password (you'll need it for installation)
  • The polymarket1.py file (the code you were given)

Step 1: Install Python

Python is the programming language that will run the script. Your Mac might already have Python, but we need Python 3 specifically.

Download Python

  1. Open Safari or your preferred web browser
  2. Go to python.org/downloads
  3. Click the big yellow button that says "Download Python 3.x.x"
  4. The file will download to your Downloads folder
  5. The filename will be something like python-3.12.0-macos11.pkg

Install Python

  1. Open your Downloads folder (Cmd+Option+L or click Downloads in the Dock)
  2. Double-click the downloaded .pkg file
  3. The installer will open - click Continue
  4. Read through the terms and click Continue
  5. Click Agree to accept the license
  6. Click Install
  7. Enter your Mac password when prompted
  8. Wait for installation to complete (takes 2-3 minutes)
  9. Click Close when installation is successful
Note: The installer may ask if you want to move it to Trash. You can click "Move to Trash" to clean up - we don't need it anymore.

Verify Python is Installed

Let's make sure Python installed correctly. We'll use Terminal:

Open Terminal:

  1. Press Cmd + Space to open Spotlight
  2. Type Terminal
  3. Press Return

A window will open with a command line interface. Type this command and press Return:

python3 --version

You should see something like:

Python 3.12.0
Success! If you see a Python version number (3.x.x), you're ready for Step 2!
Mac Tip: On Mac, the command is python3 (not just python). Remember this - you'll use it throughout this guide!

Step 2: Install Required Library

The script needs a library called requests to download data from the internet.

Install the requests library

In your Terminal window (still open from Step 1), type this command and press Return:

pip3 install requests

You'll see text scrolling by as it downloads and installs. This takes about 10-20 seconds.

Success! When you see "Successfully installed requests" you're done with this step!
Tip: Keep Terminal open - we'll use it again in Step 4!

Step 3: Save the Script File

Now you need to save the Python code as a file on your Mac.

Create a Folder

  1. Right-click (or Control+click) on your Desktop
  2. Select New Folder
  3. Name the folder PolymarketScraper (no spaces!)
  4. Press Return

Save the Python Code

  1. Open TextEdit (press Cmd+Space, type "TextEdit", press Return)
  2. If TextEdit opens in "Rich Text" mode, go to Format → Make Plain Text (or press Cmd+Shift+T)
  3. Copy ALL of the polymarket1.py code (from the very first line to the very last line)
  4. Paste it into TextEdit
  5. Go to File → Save (or press Cmd+S)
  6. Navigate to your Desktop and select the PolymarketScraper folder
  7. In the "Save As" field, type: polymarket1.py
  8. If you see a warning about using ".py", click "Use .py"
  9. Click Save
Important: Make sure TextEdit is in Plain Text mode (not Rich Text). Rich Text will mess up the code! If you see formatting buttons at the top, you're in Rich Text mode - convert it using Format → Make Plain Text.
Alternative: If you're more comfortable, you can use any text editor like Sublime Text, VS Code, or even the built-in Terminal text editor (nano). Just make sure to save it as polymarket1.py!

Step 4: Run the Script

Now for the exciting part - running the script!

Open Terminal

If you closed Terminal, open it again:

  1. Press Cmd + Space
  2. Type Terminal
  3. Press Return

Navigate to Your Folder

Type these commands (press Return after each one):

cd Desktop
cd PolymarketScraper
What does this do? cd means "change directory" - it's like opening a folder. We're telling Terminal to go to Desktop, then into the PolymarketScraper folder.

Run the Script

Type this command and press Return:

python3 polymarket1.py

The script will start and ask you three questions:

Question 1: Enter categories

Type the categories you want to search, separated by commas:

politics,crypto,tech

Available categories: politics, crypto, geopolitics, tech, world, trump, elections

Press Return after typing.

Question 2: How many total markets to fetch?

Type a number (how many markets you want to see):

150

Press Return.

Question 3: Minimum volume filter?

Type 0 to see all markets, or a number like 10000 to only see markets with at least $10,000 in volume:

0

Press Return.

First Time? Try these settings: politics,crypto, 50 markets, 0 minimum volume. This will be quick and show you how it works!

The script will now fetch data from Polymarket. You'll see messages like "Fetching markets from Polymarket..." This takes 10-30 seconds.

Success! When you see "Successfully scraped X markets" and file creation messages, it's done!

Step 5: View Your Results

The script creates two files in your PolymarketScraper folder:

  • polymarket_feed.html - Your beautiful results page!
  • polymarket_data.json - Raw data (for advanced users)

Open the Results

  1. Go to your Desktop
  2. Open the PolymarketScraper folder
  3. Find the file named polymarket_feed.html
  4. Double-click it
  5. It will open in Safari (or your default browser)
Congratulations! You should now see a beautifully formatted page with all the Polymarket markets you requested, organized by category!

What You'll See

  • Markets organized by category (Politics, Crypto, Tech, etc.)
  • For each market:
    • The question/prediction
    • Trading volume (how much money is in the market)
    • Liquidity
    • Current odds (YES/NO percentages)
    • End date
    • A link to view it on Polymarket.com
Tip: You can drag the HTML file to your Dock for quick access, or add the folder to your Favorites in Finder!

Running It Again

Want to update your data or search for different categories? Easy!

  1. Open Terminal (Cmd + Space, type "Terminal")
  2. Navigate to your folder:
    cd Desktop/PolymarketScraper
  3. Run the script:
    python3 polymarket1.py
  4. Answer the questions with your new preferences
  5. Go back to your browser and refresh the page (press Cmd + R) to see new results!
Note: Each time you run the script, it overwrites the old files with fresh data.

Troubleshooting Common Issues

Problem: 'python3: command not found'

Solution: Python isn't installed or isn't in your PATH. Try:

  1. Reinstall Python from python.org
  2. Or try using just python instead of python3

Problem: No module named 'requests'

Solution: The requests library isn't installed. Open Terminal and run:

pip3 install requests

Problem: Permission denied

Solution: You might need to use sudo (administrator privileges):

sudo pip3 install requests

You'll be asked for your Mac password. Type it (it won't show as you type - that's normal) and press Return.

Problem: TextEdit saves with wrong formatting

Solution: Make sure TextEdit is in Plain Text mode:

  1. Open TextEdit
  2. Go to Format → Make Plain Text (or press Cmd+Shift+T)
  3. Paste your code again and save

Problem: Error fetching markets

Solution: This usually means:

  • Your internet connection is down - check your WiFi
  • Polymarket's API might be temporarily down - try again in a few minutes

Problem: No markets found

Solution:

  • Your volume filter might be too high - try setting it to 0
  • Try different categories (politics and crypto usually have the most markets)
  • Increase the number of markets to fetch (try 200)

Understanding Your Results

What Do the Numbers Mean?

Volume: The total amount of money traded on this market. Higher volume = more people betting = usually more accurate odds. A market with $500,000 volume is more reliable than one with $1,000.

Liquidity: How easy it is to buy or sell positions in this market. Higher liquidity means you can trade without affecting the price much.

YES/NO Odds: The current probability of each outcome according to the market. For example:

  • "YES 65% / NO 35%" means traders think there's a 65% chance it will happen
  • "YES 20% / NO 80%" means traders think there's only a 20% chance it will happen

End Date: When the market closes and the outcome is determined. After this date, the market resolves to either YES or NO.

Pro Tip: Markets with higher volume (over $50,000) tend to have more accurate odds because more informed traders are participating. Look for the volume numbers when evaluating predictions!

Pro Tips for Mac Users

  • Add to Dock: Drag the PolymarketScraper folder to your Dock for quick access
  • Quick Terminal: Add Terminal to your Dock too - you'll use it often
  • Keyboard Shortcuts: Learn Cmd+Space (Spotlight) and Cmd+R (refresh browser) - they're lifesavers
  • Save Multiple Versions: Before running the script again, rename your old HTML file (like polymarket_feed_oct21.html) to keep historical data
  • Automator: Advanced users can create an Automator workflow to run the script with one click
  • Share Results: AirDrop the HTML file to your iPhone/iPad - it works great on mobile Safari

Next Steps

Now that you've successfully run the script, you can:

  • Experiment with different categories (try all 7 categories!)
  • Adjust volume filters to focus on high-activity markets
  • Track how specific markets change over time
  • Share your HTML reports with friends interested in prediction markets
  • Visit Polymarket.com to learn more and potentially trade
  • Use AirDrop to share results with other Apple devices
Congratulations! You've successfully installed Python, run a Python script, and generated custom market reports. You're officially a Polymarket data analyst!