JustDial provides a comprehensive, well‑organized directory with rich filters and up‑to‑date listings of possibly every business across every city and town in India.
infinity-scrool.py is an easy-to-use, reliable, lightweight program to download and save business listings from any page on JustDial.com.
- Ultra‑light output: Writes compact
.csv.gzfiles you can share or load into any analytical tool - Fresh data: Every time the program is run, it grows the dataset with new listings and updates old listings
- Gentle scraping: Human‑like scrolling to reduce bot detection
-
Prerequisites
- Python 3.9+
- Google Chrome installed
-
Create and activate a virtual environment
↪ python -m venv .venv ↪ source .venv/bin/activate # Windows: .venv\Scripts\activate
-
Install dependencies
↪ pip install -r requirements.txt
-
Basic usage: Scrape 50 results by default
↪ python infinity_scrool.py "https://www.justdial.com/Bangalore/Pg-Accommodations/" -
Get more results
↪ python infinity_scrool.py "https://www.justdial.com/Bangalore/Pg-Accommodations/" -n 150 -
Watch the magic as it happens in a browser window
↪ python infinity_scrool.py "https://www.justdial.com/Bangalore/Pg-Accommodations/" --no-headless -
Custom output filename
↪ python infinity_scrool.py "https://www.justdial.com/Bangalore/Pg-Accommodations/" -n 150 --output my_data
-
Results are saved to a CSV file. Filename is determined automatically based on the URL.
-
Our bot knows how to work with infinite scroll pages.
-
Scraper mimics human-like scrolling to play nicely with bot blockers.
-
Data is deduplicated and appended to existing files. Every time you run the program, you grow the dataset.
-
🦹♀️ PRO TIP: Use this tool judiciously. DO NOT OVERDO IT!
With that said, happy and responsible scraping! ✨✨✨
Thanks to the presence of Korean industries in Chennai, there's a fairly large expat community in the city, and in their service, quite a number of Korean restaurants. Let's say you want to try out some authentic Korean food on your upcoming visit to Chennai.
-
Step 1 — Search JustDial.com
Run a search on JustDial.com. Copy the url. Don't bother cleaning it.
-
Step 2 — Grab 10 results
↪ python infinity_scrool.py "https://www.justdial.com/Chennai/Korean-Restaurants/nct-10289122?trkId=2226764-chennai&term=korean" -n 10Automatic output filename:
Chennai-Korean-Restaurants.csv.gz -
Step 3 — Filter the list (using DuckDB, for instance)
↪ duckdb -c "SELECT name, address, city FROM 'Chennai-Korean-Restaurants.csv.gz' WHERE name LIKE '%Korean%' ORDER BY name"Why
.csv.gzhelps:- Tiny files, fast downloads and commits
- Opens directly in Pandas and DuckDB
import pandas as pd df = pd.read_csv('Chennai-Korean-Restaurants.csv.gz')
- Filenames are derived from the URL path. Example:
https://www.justdial.com/Bangalore/Pg-Accommodations/...→Bangalore-Pg-Accommodations.csv.gz
- Columns:
datestamp, name, address, city - Appends on subsequent runs and removes duplicates by
name + address + city.
- Please scrape responsibly. Don’t hammer pages. Increase
-ngradually. - Headless is on by default; use visible mode only when needed.
- Respect the platform. Credit your source when sharing results.
- Main script:
infinity_scrool.py - Data:
*.csv.gzfiles in this folder. Open the.gzto get a.csvfile. - Screenshots used above are in the
docs/folder.
Made for lightweight data collection and quick analysis.


