IndiaRealTime
~20 independent WordPress plugins, one per public data source, feed a single site that tracks live mandi prices, fuel prices, air quality, weather alerts, earthquakes, and cricket scores across India. It keeps serving good data even when the government API behind it doesn't.
Live site: https://indiarealtime.com
Website screenshots
| Web view | Mobile view |
|---|---|
If you're building a data-aggregation site, a plugin-based architecture, or anything where "the upstream API will eventually lie to you" is a real design constraint, this is written for you. See Challenges below.
Why India Users needs this website
The data itself already exists and is mostly public. It's just scattered across dozens of separate government and PSU portals, each with its own format, update cadence, and (often) reliability problems.
Real User Stories
🌾 Rajesh - Farmer in Punjab
"I sell wheat at APMC Ludhiana. Every morning I had to visit 3 different websites to check prices in nearby markets to negotiate better rates. Now I check indiarealtime in 10 seconds before heading to the market."
🚖 Priya - Auto Driver in Bangalore
"Fuel prices change daily and affect my earnings. I used to call friends in different cities to know rates. Now I check one app, see petrol/diesel prices across Bangalore to plan my routes."
👨👩👧 Amit - Parent in Delhi
"Before letting my kids play outside, I need to check AQI. I used to google 5 different sources - Agmarknet, CPCB, weather sites - all showing different formats. Now one click and I know if it's safe to go out."
A farmer checking today's mandi price has to know Agmarknet exists. Someone checking whether it's safe to go outside needs to know CPCB publishes AQI, on a different site, in a different format. Fuel prices change daily and vary by state (different VAT rates), but each oil marketing company only publishes its own numbers, separately, for the cities it serves.
None of that requires new data to be collected. It requires someone to fetch what's already public, normalize the formats, and put mandi prices, fuel prices, AQI, weather alerts, and the rest in one place a person can actually check in a few seconds instead of five open tabs across five different government sites. That's the gap this project sits in.
Why this web exists (the engineering side)
Most "live data" sites in India either scrape once a day and call it real-time, or bolt a dozen unrelated widgets onto a page-builder theme until it can't be maintained. IndiaRealTime pulls from ~15 different public data sources (government APIs, exchanges, weather and seismic feeds) and turns each one into its own small, testable unit instead of one monolith.
What I cover now!
| Category | Examples |
|---|---|
| Prices | Mandi (agricultural commodity), fuel & LPG by state/city, precious metals, currency conversion, mutual fund NAVs, FD rates, toll rates |
| Environment | Air quality (AQI, CPCB bands), weather alerts, earthquake alerts |
| Civic / time | Bank holidays, pincode lookups, timezone conversion |
| Culture | Panchang & muhurat timings, vrat calendar, rashifal |
| Sport | Live cricket scores |
Coverage is city/state-granular where the underlying data supports it. Fuel prices, for instance, are tracked per city, not a national average.
The full list of free India data APIs behind this, including the government ones the site doesn't use yet, is in API/.
Quick Start for - Developer guide
Installation
Python SDK (recommended)
pip install indiarealtime
From source
git clone https://github.com/padmarajnidagundi/indiarealtime-com.git
cd indiarealtime-com
pip install -e .
Real-Life Integration Examples
Example 1: Farmer Checking Mandi Prices (CLI)
# Get wheat prices in Punjab
$ indiarealtime mandi --commodity wheat --state Punjab
Commodity Market State City Price (₹) Unit
wheat APMC Ludhiana Punjab Ludhiana 2450 Quintal
wheat APMC Amritsar Punjab Amritsar 2420 Quintal
Example 2: Startup Building Price Alert Bot (Python)
from indiarealtime import IndiaRealTime
irt = IndiaRealTime()
# Get current wheat prices
prices = irt.mandi_prices(commodity="wheat", state="Punjab", limit=5)
for price in prices:
print(f"📊 {price.market}: ₹{price.price}/{price.unit}")
# Alert if price drops below ₹2400
if price.price < 2400:
send_sms_alert(f"Wheat at {price.market} is ₹{price.price}!")
Example 3: Delivery App Checking Fuel Prices (REST API)
// Fetch fuel prices for driver earnings calculation
fetch('http://localhost:5000/v1/fuel/prices?state=Maharashtra&type=diesel')
.then(r => r.json())
.then(data => {
data.results.forEach(price => {
console.log(`Diesel in ${price.city}: ₹${price.price}/L`);
});
});
Example 4: News Website Scraping AQI (Python)
from indiarealtime import IndiaRealTime
import requests
irt = IndiaRealTime()
aqi = irt.air_quality(city="Delhi")
if aqi[0].aqi > 300:
# Post alert headline
headline = f"🚨 Air Quality SEVERE in {aqi[0].city}: AQI {aqi[0].aqi}"
post_to_website(headline)
Example 5: Finance Dashboard Showing Rates (React)
import { useState, useEffect } from 'react';
function CurrencyRates() {
const [rates, setRates] = useState({});
useEffect(() => {
fetch('/api/v1/finance/currency?base=INR&symbols=USD,EUR,GBP')
.then(r => r.json())
.then(d => setRates(d.rates));
}, []);
return (
<div>
<h2>INR Exchange Rates</h2>
<p>1 INR = ${rates.USD?.toFixed(4)} USD</p>
<p>1 INR = €{rates.EUR?.toFixed(4)} EUR</p>
</div>
);
}
Local Setup (Docker)
git clone https://github.com/padmarajnidagundi/indiarealtime-com.git
cd indiarealtime-com
# Start all services
docker-compose up
# WordPress at http://localhost:8080
# API Server at http://localhost:5000
# Monitoring at http://localhost:3000
More Examples
- FastAPI Server with auto-docs
- Telegram Bot for price alerts
- Google Sheets auto-update
- Next.js Dashboard
See examples/README.md for complete setup instructions.
Try it
scripts/fetch-pincode.js is a small standalone example of the fetch-and-normalize pattern the site's plugins use, pointed at one no-key-needed API from the list above:
node scripts/fetch-pincode.js 560001
How the India Real Time web site works for visitors / end users.
- Browse by location: URLs follow a
/state/city/category/pattern (e.g. a state page, drilling into a city, drilling into a specific data category like fuel prices or AQI). Most categories exist both as a national overview and a per-city detail page. - Compare prices: a price-comparison view lines up a commodity or fuel type across cities/states side by side instead of making you open each city page separately.
- Calculators: a metals calculator converts live gold/silver rates by weight and purity instead of just showing a per-gram number.
- Share cards: data pages generate a shareable image card (price, date, source) sized for social platforms, so a fact can be shared without a screenshot.
- Author hub: every article is attributed to a real author with a profile page, not an anonymous byline.
/authors/lists them,/author/<name>/shows their published work.
Architecture of the web application
Public data sources (govt APIs, exchanges, weather/seismic feeds, ~15 total)
│
▼
One WordPress plugin per source ──► WP-Cron fetch on its own schedule
(fetch → validate → normalize) (e.g. every 6h for commodities/AQI,
│ daily for fuel prices)
▼
WP transient cache (MySQL-backed) ◄── on fetch failure, keep serving the
│ last good cached value instead of
▼ erroring or showing nothing
Custom theme templates (PHP)
render location/category pages
│
▼
irt-dataset-schema → schema.org JSON-LD + irt-api-health-monitor watches
(machine-readable structured data) all fetchers from one dashboard
│
▼
IndexNow ping on update → search engines re-crawl fresh data within minutes,
not on their own schedule
The core decision: each data source is a fully independent plugin, not a shared ingestion pipeline. A plugin owns its own fetch schedule, cache, and failure handling. If one government API changes its response format or goes down, exactly one plugin breaks. The other ~19 keep serving. irt-api-health-monitor exists because with that many independent moving parts, you need one place that watches all of them rather than checking each plugin's logs by hand.
Challenges worth mentioning I faced while building it.
Each of these got long enough to deserve its own page:
- Serving stale data on purpose: government and exchange APIs are not reliable, and the site still has to look reliable.
- Accessibility and color are load-bearing: every semantic color is checked against WCAG contrast and color-vision-deficiency simulation.
- A hash has to agree across two languages: PHP and JavaScript disagree on integer overflow, and author attribution depends on them agreeing anyway.
- Location routing without a rewrite-rule regex per state: one routing path for every state and city page instead of one rewrite rule per region.
- ~20 plugins is a maintainability bet, not a free lunch: fault isolation costs more surface area to keep consistent.
Stack I used
- WordPress (custom theme, no page builder): PHP templates, vanilla JS/CSS
- ~20 custom plugins, one per data source, each with its own fetch/cache layer
- MySQL for storage and transient caching; Docker Compose for local dev
- Schema.org structured data via a dedicated plugin (
irt-dataset-schema) - IndexNow integration for near-instant search engine indexing on data updates
What's next
- Historical price tracking currently exists for fuel and AQI, not yet for mandi/commodity prices. Extending it there is the next real data gap to close.
- More granular city coverage as sources allow it.
- Broadening the accessibility audit in
STYLE-GUIDE.mdpast color contrast to full keyboard/screen-reader passes.
Talk to me
This repo is a project overview, not the site's source, the WordPress codebase is closed for now. The API list and the scripts/ folder are fair game for PRs though, missing APIs, corrections, more fetch examples. If you've solved a version of any of the problems above (stale-cache fallback strategies, plugin-per-source architectures, CVD-safe color systems, cross-language hash parity), or you're hitting the same wall right now, open a discussion. Genuinely want to compare notes.
If you have better ideas then reach me via email.
Metadata
Release files for indiarealtime 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| indiarealtime-0.1.0.tar.gz | 18.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| indiarealtime-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 31.7 kB
Release files / indiarealtime-0.1.0.tar.gz
| Download URL | indiarealtime-0.1.0.tar.gz |
|---|---|
| Size | 18.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6bbbc7a38eb58d08f2d4feee59bd834740e56a57c258cfed47f59a6aef108965
|
|
BLAKE2b-256 checksum How to use checksums |
12f21b02645b644f6acd274fed88a71c1c4d49007a6794ebc78635f70a9f7a07
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 23, 2026.
Transparency logRelease files / indiarealtime-0.1.0-py3-none-any.whl
| Download URL | indiarealtime-0.1.0-py3-none-any.whl |
|---|---|
| Size | 13.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8b020b2e1499a2a3002faf1bf1e2a645cfaebe8d0615635a05a9086092d1f44d
|
|
BLAKE2b-256 checksum How to use checksums |
ea6b4dcfb7dec260388739d1dffaa262afb45b0924e9a872fc8762473c5b81f9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 23, 2026.
Transparency log