How chota-org/justdial-api works
Vyapar Leads API aggregates Indian business-directory listings into normalized, deduplicated leads, with search and CSV export as its main user-facing results. The workflow runs from an API request through source selection, platform-specific extraction, and aggregation; Justdial also resolves popular categories. Scrapers normalize contact and location data and can expand searches by locality. The README documents five source platforms, API-key protection, rate limiting, source discovery, health checks, and CSV export. Some server and scraper code was only sampled, so unsourced runtime links are omitted.
Main entry points: index.js Source aggregator · normalizer.js Input and contact normalization · grotal.js Grotal scraper · justdial.js Justdial scraper
Components 20
API
- HTTP API
src/server.js - Search and CSV
src/server.js - Health and sources
src/server.js
Lead harvesting
- Source aggregator
src/scrapers/index.js
Query and quality
- Input and contact normalization
src/utils/normalizer.js - Category lookup
src/utils/categories.js - City locality catalog
src/utils/cityAreas.js - Locality discovery queue
src/utils/dynamicLocality.js - Lead relevance filter
src/utils/relevanceFilter.js
Directory sources
- Justdial scraper
src/scrapers/justdial.js - Grotal scraper
src/scrapers/grotal.js - IndiaMART scraper
src/scrapers/indiamart.js - TradeIndia scraper
src/scrapers/tradeindia.js - Sulekha scraper
src/scrapers/sulekha.js
Other components
- API client
- Justdial
- Grotal
- IndiaMART
- TradeIndia
- Sulekha
Connections 28
- API client → HTTP API: requests
README.md - HTTP API → Search and CSV: routes search and export
src/server.js - HTTP API → Health and sources: serves endpoints
README.md - Search and CSV → Source aggregator: dispatches searches
src/server.js - Source aggregator → Justdial scraper: dispatches
src/scrapers/index.js - Source aggregator → Grotal scraper: dispatches
src/scrapers/index.js - Source aggregator → IndiaMART scraper: dispatches
src/scrapers/index.js - Source aggregator → TradeIndia scraper: dispatches
src/scrapers/index.js - Source aggregator → Sulekha scraper: dispatches
src/scrapers/index.js - Justdial scraper → Justdial: extracts listings
README.md - Grotal scraper → Grotal: extracts listings
src/scrapers/grotal.js - IndiaMART scraper → IndiaMART: extracts listings
README.md - TradeIndia scraper → TradeIndia: extracts listings
README.md - Sulekha scraper → Sulekha: extracts listings
README.md - Source aggregator → Input and contact normalization: normalizes and deduplicates
src/scrapers/index.js - Source aggregator → Lead relevance filter: filters leads
src/scrapers/index.js - Justdial scraper → Input and contact normalization: cleans listing data
src/scrapers/justdial.js - Grotal scraper → Input and contact normalization: cleans listing data
src/scrapers/grotal.js - IndiaMART scraper → Input and contact normalization: cleans listing data
src/scrapers/indiamart.js - TradeIndia scraper → Input and contact normalization: cleans listing data
src/scrapers/tradeindia.js - Sulekha scraper → Input and contact normalization: cleans listing data
src/scrapers/sulekha.js - Justdial scraper → Category lookup: looks up categories
src/scrapers/justdial.js - Grotal scraper → Locality discovery queue: discovers areas
src/scrapers/grotal.js - Grotal scraper → City locality catalog: uses fallback areas
src/scrapers/grotal.js - IndiaMART scraper → Locality discovery queue: discovers areas
src/scrapers/indiamart.js - TradeIndia scraper → Locality discovery queue: discovers areas
src/scrapers/tradeindia.js - Sulekha scraper → Locality discovery queue: discovers areas
src/scrapers/sulekha.js - Search and CSV → Input and contact normalization: normalizes query
src/server.js