Namashkar Bharat

For developers

Build on the official directory

One public, read-only, keyless JSON endpoint for the directory of official Government of India websites, an MCP connector for AI agents, and machine-readable versions of every page.

There are no API keys, accounts or sandbox. Everything here is public and read-only: the directory is the same data every visitor sees, nothing you send is stored, and there is nothing to write to, so there is nothing a key would protect or a sandbox would isolate. Use production directly.

Directory API

GET https://namashkarbharat.com/api/directory

The whole directory in one JSON response: { count, categories[], sites[] }. No parameters and no paging. CORS is open to every origin, and no credentials are used. The OpenAPI 3.1 description has the full schema.

  • id — Stable slug of the site name, e.g. passport-seva. Changes only if the site is renamed.
  • name — Site name (English).
  • url — Official URL on the owning body's own domain.
  • domain — Hostname without www.
  • category — One of the 18 category ids (listed in categories[]).
  • desc — One-line English description.
  • tags — Lowercase keywords, including common Hindi/Hinglish terms.
  • org — Owning ministry, department or body (may be empty).
  • state — ISO 3166-2:IN code without "IN-" (e.g. MH) for sites that serve one state or union territory; absent for national sites.

curl

curl -s https://namashkarbharat.com/api/directory \ | jq '.sites[] | select(.tags | index("passport")) | {name, url}'

JavaScript (fetch)

const res = await fetch("https://namashkarbharat.com/api/directory"); if (!res.ok) { const problem = await res.json(); // application/problem+json throw new Error(`${problem.code}: ${problem.detail}`); } const { sites } = await res.json(); const official = new Set(sites.map((s) => s.domain)); console.log(official.has("passportindia.gov.in")); // true

Python (standard library)

import json, urllib.request with urllib.request.urlopen("https://namashkarbharat.com/api/directory", timeout=10) as r: directory = json.load(r) for site in directory["sites"]: if site.get("state") == "MH" and "land" in site["tags"]: print(site["name"], site["url"])

MCP connector

AI agents can use the remote MCP server at https://namashkarbharat.com/mcp (Streamable HTTP, no sign-in) to find the official site for a need, check whether a URL is official, follow step-by-step playbooks and check portal status. Setup for Claude and other clients, and agents.md, are on the AI agents page.

For agents reading the site

  • /agents.md: instructions for agents that use this site (workflow, tools, human checkpoints, hard rules).
  • /llms.txt and /llms-full.txt (every directory entry).
  • Every page returns Markdown with Accept: text/markdown, or at <page>.md, for example /index.md.
  • /.well-known/api-catalog (RFC 9727) lists the API with its OpenAPI description and this page.
  • schema.org JSON-LD in every page, and WebMCP tools in browsers that support WebMCP.

Rate limits

  • GET /api/directory — No per-client limit: it is a static file served from the CDN. It only changes when the directory is updated, so fetch it once and cache it (refreshing daily is plenty); don't poll.
  • /mcp (MCP connector) — 120 requests per minute per network (higher for known agent platforms), plus 12 portal_status checks per minute and 60 report_outcome calls per hour. Over the limit: HTTP 429 or a tool error.
  • /llms.txt, /llms-full.txt, /openapi.json — Static files served from the CDN. No limit.
  • /api/search, /api/feedback — Not for third-party use (see below): 10 smart searches per network per day, 1 per 3 s and 6 per minute; 60 feedback requests per minute.

Caching

  • /api/directory — Cache-Control: public, max-age=3600, s-maxage=86400, stale-while-revalidate=604800
  • /openapi.json, /llms.txt, /llms-full.txt — Cache-Control: public, max-age=3600, s-maxage=86400
  • /mcp and every error response — Cache-Control: no-store

Errors

Every error from an /api endpoint is RFC 9457 application/problem+json: type (a link to the entry below), title, status, detail, plus code (stable, machine-readable) and hint (what to do next). Unknown /api paths return a JSON 404, unsupported methods a 405 with an Allow header, and any other path returns a JSON 404 when the client prefers application/json. /mcp answers with JSON-RPC errors instead.

HTTP/1.1 404 Not Found Content-Type: application/problem+json { "type": "https://namashkarbharat.com/developers#errors-not_found", "title": "Not found", "status": 404, "detail": "There is no API endpoint at this path.", "code": "not_found", "hint": "See /developers for the available endpoints and /openapi.json for their description." }

bad_request · 400 Bad request

The body isn't the JSON object the endpoint expects (malformed JSON, `null`, an array, unknown fields or a filled-in honeypot).

Hint: Send a JSON object with only the documented fields.

Returned by: /api/search, /api/feedback

too_short · 400 Question too short

The question is missing or shorter than 3 characters after cleaning.

Hint: Describe what you need in a few words.

Returned by: /api/search

too_long · 400 Question too long

The question is longer than 100 characters.

Hint: Keep the question under 100 characters.

Returned by: /api/search

gibberish · 400 Not a question

The question has too few letters or long runs of repeated characters.

Hint: Use words that describe what you need.

Returned by: /api/search

forbidden · 403 Cross-origin request refused

The endpoint only serves namashkarbharat.com's own pages (Origin / Sec-Fetch-Site check).

Hint: Use GET /api/directory (public, CORS-enabled) or the MCP connector at /mcp instead.

Returned by: /api/search, /api/feedback

verify · 403 Human check failed

The Cloudflare Turnstile token was missing or invalid. The daily quota unit is refunded.

Hint: Refresh the page and try again.

Returned by: /api/search

not_found · 404 Not found

There is no endpoint or page at this path.

Hint: See /developers for the available endpoints and /openapi.json for their description.

Returned by: any /api path; any path when the client prefers application/json

method_not_allowed · 405 Method not allowed

The endpoint exists but doesn't support this HTTP method.

Hint: Use one of the methods listed in the Allow header.

Returned by: every /api endpoint

too_large · 413 Request too large

The body is over the endpoint's limit (2 KB for /api/search, 1 KB for /api/feedback).

Hint: Send a smaller body; only the documented fields are needed.

Returned by: /api/search, /api/feedback

unsupported_type · 415 Unsupported media type

The body's Content-Type isn't application/json or text/plain.

Hint: Send Content-Type: application/json.

Returned by: /api/feedback

burst · 429 Too many searches too quickly

More than 1 search in 3 seconds or 6 in a minute from one network, or a search sent less than 0.8 s after the page loaded.

Hint: Wait a few seconds (see Retry-After) and try again.

Returned by: /api/search

daily · 429 Daily smart-search limit reached

This network has used its smart searches for today. Cached answers still work.

Hint: The limit resets at midnight IST (see resetIn and Retry-After, in seconds). Browse /directory or use /api/directory meanwhile.

Returned by: /api/search

rate_limited · 429 Too many requests

More than 60 feedback requests in a minute from one network.

Hint: Slow down and retry after a minute.

Returned by: /api/feedback

server_error · 500 Server error

Something unexpected failed on our side. Nothing was stored.

Hint: Retry later. If it keeps happening, report it on X (@ajinkya_shejul).

Returned by: every /api endpoint

Not for third-party use

/api/search (the site’s AI-assisted search) and /api/feedback only accept requests from namashkarbharat.com’s own pages; other origins get 403 forbidden. They are left out of the OpenAPI description on purpose. Use the directory API or the MCP connector instead.

Fair use

  • Free to use, with no key or sign-up. Please cache /api/directory instead of fetching it on every request.
  • Send people to the official website itself, never to a copy, a mirror or a paid intermediary, and don't mix unofficial sites into anything you present as this directory.
  • Don't imply that Namashkar Bharat, or your product, is a government service or endorsed by the government. We are an independent guide.
  • Leave logins, OTPs, payments and final submissions on official portals to the person. Agents must hand over at those steps.
  • No uptime guarantee. The directory is maintained by one person and checked regularly, but government sites move; report problems on X.

Privacy

  • No keys, accounts or cookies on the API, so there is nothing that identifies you.
  • Never send personal data (Aadhaar, PAN, phone numbers, passwords, OTPs) to any endpoint here. None of them need it.
  • GET /api/directory and the static files are plain CDN responses. We add no logging of our own; the hosting platform keeps its standard short-lived request logs.
  • The MCP connector doesn't log search words, checked URLs or tool arguments; rate limits use a salted hash of the network address, never the address itself.

API changelog

  • Unreleased: The agent setup page moved from /connect to /agents (permanent redirect), and /agents.md serves instructions for agents. Errors from every /api endpoint are RFC 9457 application/problem+json with a stable code and hint; unknown /api paths return a JSON 404 and unsupported methods a 405 with Allow. This developer page, /.well-known/api-catalog (RFC 9727) and service-desc/service-doc links. Directory sites that serve one state carry a state field.
  • 2026-09-30: GET /api/directory opened to other origins (CORS, categories[] added), /openapi.json, /llms.txt, /llms-full.txt, Markdown versions of every page, and the MCP connector at /mcp.

Contact

Questions, broken links and data requests: @ajinkya_shejul on X. Namashkar Bharat is an independent guide, not a government website (about).

Only official government websites
Developers · Namashkar Bharat