go · sqlite · mcp · live

india api

free apis for indian data, all in one shape.

every indian app needs the same lookups: a pincode's district, a branch's ifsc, whether a gstin is well formed, which days the banks are shut in tamil nadu. the data is public. it's also scattered over portals, spreadsheets and pdfs, each shaped differently. india api cleans it once, in the open, and serves it from one place.

open india api ↗ read the docs ↗ view source ↗

81 apis and 225 endpoints on 1 december 2026. most need no key. the code is agpl-3.0.


what you can ask it

places
19,299 pincodes and 157,125 post offices. villages with their lgd codes, constituencies, railway stations, airports, rto codes, hospitals, census 2011 figures and std codes.
money
183,214 bank branches by ifsc, micr or swift. mutual fund navs and returns, rbi rates, gold and silver, hsn codes, upi qr codes, calculators, and a gst invoice as a pdf.
days
bank, government and market holidays, working days, t+1 settlement dates, festivals from 1950 to 2100, and the panchang for any pincode.
language
ocr, translation between english and 22 indian languages, speech to text and back, transliteration, and numbers in words in lakh and crore.
logos
companies on nse and bse, indian brands, global stocks, crypto. an unknown name gets an initials tile, never a broken image.
the network
dns, tls, whois, ipv6, and a traceroute that starts in india.

there are free tool pages for people who don't write code, a playground, and an mcp server with 129 tools, so an assistant can look these up instead of guessing.

ask it something

no key, no sign-up, open cors. is 16 january 2026 a working day for a bank in tamil nadu?

curl -G https://api.dharun.dev/v1/working-days/2026-01-16 \
     -d calendar=bank -d state=TN

{
  "data": {
    "date": "2026-01-16",
    "weekday": "Friday",
    "working": false,
    "reasons": ["Thiruvalluvar Day/Kanuma"],
    "nextWorkingDay": "2026-01-19",
    ...
  },
  "meta": {
    "source": { "name": "Bank holidays in India", ... },
    ...
  }
}

the answer is real, with a few fields cut to fit. every json answer is { data, meta }, and when it came from a dataset, meta.source names the dataset, its licence and when it was fetched. you can check my work.

how a dataset stays fresh

sources waiting at a gate, two copies of a dataset behind it, and one api handing out one answer. a refused sheet lies crumpled outside the gate

each dataset is its own read-only sqlite file. there can be two copies: the seed that ships inside a release, and the one the server fetched for itself. the newer one is served.

1. due?
once an hour, each dataset decides whether it's time. gold rates are checked every two hours, fund navs every four, ifsc weekly, rto codes monthly.
2. fetched
the source lands in a temporary directory. nothing being served is touched.
3. built
the same code that builds the seed builds a fresh file.
4. checked
the new file is compared with the one in use. if a weekly refresh loses more than five percent of the country's bank branches, the source broke; the branches didn't close. it's refused, and the old copy keeps serving.
5. swapped
the server notices the new file, opens it and swaps a pointer. no restart. the old file is closed a minute later.

how it's built

server
one go program. it owns the whole hostname: the apis, the website, the docs and the mcp server.
data
one sqlite file per dataset, 45 of them. some are too large for a repository and exist only on the server.
images
text is shaped in go with noto fonts and drawn as outlines, so tamil and hindi render the same everywhere. resvg turns it into png.
files
tesseract, ffmpeg, vips, typst and others, each run as a short-lived process with a nearly empty environment and a timeout.
models
onnx models, whisper.cpp and a small qwen through llama.cpp. most start on first use, stop when idle, and share one memory budget.
accounts
pocketbase, in a separate program that only listens on localhost. sign-in is a six-digit code by email. there are no passwords to leak.

decisions i'd defend

one catalogue writes everything
each endpoint is described once. the docs, openapi file, llms.txt, playground and agent skill are generated from that description, and a test requests every example in it. documentation that lies fails the build.
an mcp tool has no logic of its own
a tool call becomes a rest path and goes through the same router, in memory. an assistant gets exactly what curl gets.
your address isn't kept
ip addresses are never logged. endpoints that take something personal, like a gstin or a document, never log the input either. a photo or pdf you upload is deleted when the answer is sent.
the models run here
ocr, speech, translation and the small llm run on my own server. what you send isn't passed to another company, and nothing is trained on it.
a deploy is pulled, never pushed
the server fetches each release itself, verifies the checksum, and restarts. if the health check doesn't report the new version, it puts the old one back.

what it won't do

a format check says a gstin has the right shape and check digit. it doesn't say the number was ever issued, and the answer tells you so. it won't use data whose terms forbid it. and some data is old because the source is: the census is from 2011, and the hospital directory from may 2016.

a keyless caller gets 600 units a minute and a free key gets 3,000. a lookup costs one; heavier work costs more. the model endpoints need that key from 15 december 2026.

it runs on a server at home

the same machine in my family's home that runs d's labs. after a power cut it comes back on its own.