Polymarket Scraper
Welcome Windows User!
This guide will walk you through installing and running the Polymarket Scraper on Windows. Follow each step carefully, and you'll be searching markets in no time.
Time needed: About 15-20 minutes
What You'll Need
- A Windows computer (Windows 10 or 11)
- Internet connection
- Administrator access (to install software)
- The polymarket1.py file (the code you were given)
Step 1: Install Python
Python is the programming language that will run the script. Think of it as the engine.
Download Python
- Open your web browser (Edge, Chrome, Firefox, etc.)
- Go to python.org/downloads
- You'll see a big yellow button that says "Download Python 3.x.x" - click it
- The file will download (usually to your Downloads folder)
- The filename will be something like
python-3.12.0-amd64.exe
Install Python
- Find the downloaded file in your Downloads folder
- Double-click the file to run it
- VERY IMPORTANT: At the bottom of the installer window, you'll see a checkbox that says "Add Python to PATH" - YOU MUST CHECK THIS BOX!
- After checking the box, click "Install Now"
- Windows may ask "Do you want to allow this app to make changes?" - click Yes
- Wait for the installation (takes 2-3 minutes)
- When you see "Setup was successful", click Close
Verify Python is Installed
Let's make sure Python installed correctly:
- Press Win + R on your keyboard
- A small "Run" window will appear
- Type
cmdand press Enter - A black window (Command Prompt) will open
- Type this command and press Enter:
You should see something like:
Step 2: Install Required Library
The script needs a library called requests to download data from the internet. This is like adding a plugin to your browser.
Open Command Prompt
- Press Win + R
- Type
cmdand press Enter
Install the requests library
In the Command Prompt window, type this command and press Enter:
You'll see text scrolling by as it downloads and installs. This takes about 10-20 seconds.
Step 3: Save the Script File
Now you need to save the Python code as a file on your computer.
Create a Folder
- Right-click on your Desktop
- Select New → Folder
- Name the folder
PolymarketScraper(no spaces!) - Press Enter
Save the Python Code
- Open Notepad (search for "Notepad" in the Start menu)
- Copy ALL of the polymarket1.py code (from the very first line to the very last line)
- Paste it into Notepad
- Click File → Save As
- Navigate to the Desktop, then open the
PolymarketScraperfolder you just created - In the "File name" box, type:
polymarket1.py - IMPORTANT: Change the "Save as type" dropdown from "Text Documents (*.txt)" to "All Files (*.*)"
- Click Save
polymarket1.py (not polymarket1.py.txt). The "All Files" dropdown is crucial for this!
Step 4: Run the Script
Now for the exciting part - running the script!
Open Command Prompt
- Press Win + R
- Type
cmdand press Enter
Navigate to Your Folder
Type these commands (press Enter after each one):
cd means "change directory" - it's like opening a folder. We're telling the computer to go to Desktop, then into the PolymarketScraper folder.
Run the Script
Type this command and press Enter:
Or if that doesn't work, try:
The script will start and ask you three questions:
Question 1: Enter categories
Type the categories you want to search, separated by commas:
Available categories: politics, crypto, geopolitics, tech, world, trump, elections
Press Enter after typing.
Question 2: How many total markets to fetch?
Type a number (how many markets you want to see):
Press Enter.
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:
Press Enter.
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.
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
- Go to your Desktop
- Open the PolymarketScraper folder
- Find the file named polymarket_feed.html
- Double-click it
- It will open in your default web browser (Edge, Chrome, Firefox, etc.)
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
Running It Again
Want to update your data or search for different categories? Easy!
- Press Win + R
- Type
cmdand press Enter - Navigate to your folder:
cd Desktop\PolymarketScraper
- Run the script:
python polymarket1.py
- Answer the questions with your new preferences
- Go back to your browser and refresh the page (press F5) to see new results!
Troubleshooting Common Issues
Problem: 'python' is not recognized
Solution: Python wasn't added to PATH during installation. You need to:
- Go to Settings → Apps → Apps & features
- Find Python in the list and click Uninstall
- Reinstall Python, making SURE to check "Add Python to PATH" this time
Problem: No module named 'requests'
Solution: The requests library isn't installed. Open Command Prompt and run:
Problem: File saves as polymarket1.py.txt
Solution: Windows is hiding file extensions. When saving in Notepad:
- Click File → Save As
- Change "Save as type" to "All Files (*.*)"
- Type the filename as
polymarket1.py
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
- Your firewall might be blocking Python - allow it through Windows Defender
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 Tips for Windows Users
- Create a Shortcut: Right-click the PolymarketScraper folder and select "Create shortcut" - drag it to your desktop for quick access
- Pin Command Prompt: Right-click Command Prompt in your Start menu and select "Pin to Start" for easy access
- Save Multiple Versions: Before running the script again, rename your old HTML file (like
polymarket_feed_oct21.html) to keep historical data - Set up Daily Updates: Run the script each morning with your coffee to see how markets evolved overnight
- Share Results: Email the HTML file to friends - it works on any computer with a web browser!
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