Reference

API documentation

All endpoints are static JSON files. No authentication, no rate limiting, no SDK required. Fetch them with anything that speaks HTTP.

Endpoints

Path Returns Sample
/codes/<CODE>.json One code record. /codes/MH-12.json
/states/<STATE_CODE>.json All codes in one state. /states/MH.json
/states.json List of every state/UT with code counts. /states.json
/index.json Compact array of every code string. Use for autocomplete. /index.json
/all.json Every full record in one file (~200 KB). /all.json

Base URL: https://rto.oriz.in · also available at https://cdn.jsdelivr.net/gh/oriz-org/rto-api@main

Record schema

Each /codes/<CODE>.json file returns one record:

type RtoCode = {
  code:       string;   // e.g. "MH-12"
  state_code: string;   // 2-letter prefix, e.g. "MH"
  state:      string;   // expanded name, e.g. "Maharashtra"
  office:     string;   // RTO office city / location (may be empty)
  district:   string;   // jurisdiction (may be empty)
  notes:      string;   // annotation (may be empty)
}

Special cases

AP-39 / AP-40 — one-state-one-code

Andhra Pradesh consolidated to a single registration code in Feb 2019. These records replace district with a districts: string[] array.

{
  "code": "AP-39",
  "state_code": "AP",
  "office": "RTA",
  "districts": ["Tirupati district", "Krishna district", "..."],
  "notes": "One state-one code policy from Feb 2019. ..."
}

AS-20, AS-30, CG-01 — fleet / police codes

Some codes are reserved for state-owned fleets (e.g. State Transport Corporation buses) or police vehicles. The district field carries the operator name; the office field may be empty.

Errors

The only possible error is 404 — unknown code. There is no authentication, no rate limit, and no quota, so 401/403/429 cannot occur. CORS is wide open on both origins (Cloudflare Pages and jsDelivr).

License

Attribution: "Source: Wikipedia / List of Regional Transport Office districts in India".