API › Documentation
The Neolex API
Every instrument Neolex holds is served as data from : its structure, every provision's text on any date, its amendment history, its definitions and the duties extracted from it. A provision comes as HTML and as plain text together, with a list of what it depends on — the defined terms, the other provisions and the other instruments it relies on — and the call that returns each. Every response is JSON unless a call asks for a PDF, and every JSON response carries the same three fields at the top: instrument (the work id, or null), publishedVersion (the data tag the served copy comes from, data-v2026.09.66) and generatedAt. Reads need no key. The data is CC BY 4.0; the code Apache 2.0. Try any call on the explorer; the machine-readable reference is at /docs.
How an instrument and a provision are named
An instrument has a work id, the registry's id for it: sebi-lodr-regulations-2015, act-sebi-1992,notifications-fmc-merger-2015. GET /v1/instruments lists them all.
A provision has a stable id inside its instrument: the printed numbers, lower case, joined by dots, without brackets. It never changes once published, however the provision is later renumbered, so a link to it holds.
| As cited | Id |
|---|---|
| Regulation 4 | 4 |
| Regulation 4(2)(b)(iii) | 4.2.b.iii |
| Regulation 30A, the proviso to regulation 30(4) | 30a, 30.4.prov1 |
| Section 11(2)(a) of an Act; section 15HAA | 11.2.a, 15haa |
| Chapter IV; Chapter VA; a Part of a chapter | ch-4, ch-5a, ch-8.pt-2 |
| Schedule III, Part A, paragraph 6, clause (b) | sch-3.pt-a.6.b |
| Form A of the First Schedule | sch-1.form-a |
| Notification S.O. 2362(E) | so-2362e |
Not sure of an id? GET /v1/instruments/{id}/search?q=4(2)(b)(iii) finds a provision by its citation, or by words in it, and returns its id.
The text of a date
Add as_of=YYYY-MM-DD to any call that returns text, and the text is what was in force on that day: provisions inserted later are absent, omitted ones present, substituted ones in their earlier wording. Without it, the current text. A malformed date is a 400. Every such response says the date it is for, asOf (null: the current text), and a provision or chapter also carriesonDate: its standing that day (inForce, notYetInForce, omitted…) and the version whose words were served — its dates, the amending instrument that made it (causedBy, a registry id) and its textStatus. A date before a provision began gives notYetInForce and no words. The duties take as_of too: each duty's state in force that day, with the limits that applied, and none that was not yet in force.
The calls
| Call | Returns | Parameters |
|---|---|---|
GET /v1/instruments | every published instrument: id, title, regulator, profile, path, whether it has duties, and what the reader can open | — |
GET /v1/instruments/{id} | one instrument: title, dates, description, its divisions with the units under each (the contents), the amendment register, the definitions, the relaxations, the sources, the master PDF if any; for a regulation the masthead's facts — updatedAsOn, amendmentCount and gazetteNotifications (each with its date, title, readerUrl where Neolex holds it, SEBI's url and a pdfUrl); for a circular its standing — ceased (how, when and by what; where a later master circular has replaced the one it went into, the edition in force today as latest), commences (the day it comes into force, where that is still to come; null otherwise), standing.partlyCeased, standing.amendedBy and amends, each instrument named with its title, links and date; guide=true adds guide, the description and every chapter's and schedule's summary, drafts included — a map for finding provisions, never the law | as_of, guide |
GET /v1/instruments/{id}/nodes/{node} | one provision: its citation, number, type, status and dates; its words as html (with the notes) and as plain text, its sub-provisions included; and its dependencies (below). verbose=true adds its breadcrumb, parents, heading, every earlier wording with its cause, the amendments and relaxations touching it, the defined terms it uses, what it refers to, its duties and the decisions on it. format=text gives the provision's own words alone, without its sub-provisions; clean its HTML without amendment marks; json its stored JSON | as_of, verbose, format (html, text, clean, json), children, footnotes, links, definitions, clean |
GET /v1/instruments/{id}/chapters/{chapter} | one division (a chapter, schedule, Part or annexure) as html with its notes and as plain text, and the dependencies of its provisions outside it; verbose=true adds every provision's metadata | as_of, verbose, clean, footnotes, links, definitions |
GET /v1/render/instrument?instrument={id} | the whole instrument (or chapters=, nodes=) as HTML, with the notes list, as the reader shows it; text=true adds the same as plain text | as_of, text, clean, footnotes, notes (chapter, end), links, definitions, caselaw, summaries, chapters, nodes |
GET /v1/instruments/{id}/search?q= | provisions whose citation or words match: id, citation, snippet | q, limit, as_of |
GET /v1/instruments/{id}/obligations | the duties extracted from it, with their bearers, conditions and computability; node= keeps those sourced to a provision, its parents or its children; fields=card gives each duty as the Obligations page shows it, its earlier states without their detail and its check without its code; with as_of it leaves no duty out, each shown by its state in force that day, else the first to come, else its last (stateShown says which), with the day its limits are of (readOn: that day, or the day a duty not yet in force begins, later) and those limits | as_of, node, verbose, fields (card) |
GET /v1/obligations/catalog | every instrument with duties, by section, with how many it has, and every bearer — the listed entity, the stock broker, the investment adviser — with its count and the instruments that name it: the Obligations page's picker, so a client opens only the stores it needs | |
POST /v1/instruments/{id}/obligations/{duty}/check | a computable duty's verdict for the inputs posted, judged by the limits in force on the date | a JSON body: {"inputs": {…}, "asOf": "YYYY-MM-DD"} |
GET /v1/instruments/{id}/amendments | every change between two dates, to the whole instrument or one provision and what it holds, grouped by the notification that made it, in date order: each provision with its citation, the kind of change, the wording before and after and the note, in plain words | from, to, scope (a provision's id) |
GET /v1/instruments/{id}/compare?from=&to= | what changed between two dates, provision by provision: each one inserted, omitted (or repealed) or amended — in its words or its title — with its words on each date and the change marked word by word (diff: runs of equal, delete and insert; html: the same with <del> and <ins>); and the notifications that took effect in between. Where the earlier wording was not recovered from the source, nothing is marked: the change carries wordingNotRecovered | from, to (both required), scope (a provision's or chapter's id) |
GET /v1/instruments/{id}/nodes/{node}/history | a provision's whole history in one call: its lifecycle (in force from, omitted on, and the instruments that did each), every version of its words and of its title, oldest first, with its dates, the instrument that made it and the note in plain words. A version whose wording was not recovered has textStatus: "unknown" and no text | — |
GET /v1/instruments/{id}/export | the whole instrument as on a date, to take away: the tree of provisions in force that day, each with its id, number, citation, title and words, with the licence (CC BY 4.0) and the attribution to give; format=text gives it as plain text | as_of, format (json, text), html |
GET /v1/search?q= | words searched across every instrument Neolex holds, as on a date: up to three terms joined by AND, OR, NOT, whole words in any case, judged per provision; each hit names the instrument, the provision and where each term stands. A wording not recovered from the source is never found on an earlier date. The first search after a new version of the data may answer 503 with Retry-After while the index is built | q, op2, q2, op3, q3, as_of, kind (regulations, circulars, master-circulars…), limit, offset |
GET /v1/board-meetings | SEBI's Board meetings since December 2008 and the items on their agendas, with the agenda and decision papers on sebi.gov.in and the instruments each item names | instrument, from, to, q (words of the subject) |
GET /v1/board-meetings/{meeting}/items/{n}/{paper} | the words of one agenda or decision paper, read from sebi.gov.in when asked for, a piece at a time | offset, limit |
GET /v1/instruments/{id}/informal | SEBI's informal guidance on the instrument — its interpretive and no-action letters, newest first, each with SEBI's view and reasons in its own words, the provisions it maps (with the regulation each sits in) and the letter on sebi.gov.in; with node, the letters on that provision, under it, or on its regulation. Not binding: a department's view on the facts given | node |
GET /v1/informal | words searched across every informal guidance letter, those on instruments Neolex does not hold included | q, instrument, limit |
GET /v1/instruments/{id}/cases | the orders Neolex holds that bear on a provision or a regulation — citing it, a provision in it, or it as part of its regulation — newest first, each with how it cites each provision (charged, read with, penalty under, power, held), what it found against whom, and what it held about them; without node, how many orders cite each regulation | node, as_of |
GET /v1/cases/{id} | one order held as a record, with its history: the orders of its case oldest first (held and named), the appeals they record — SAT and beyond, as the orders themselves recite them — and whether it was appealed (true, or null when no order held records an appeal — silence is not whether it was appealed (true, false, or null when no order held says)quot;not appealedwhether it was appealed (true, false, or null when no order held says)quot;) | |
GET /v1/cases/directory | the cases by the law they apply: every held instrument the orders cite, regulation by regulation in the instrument's order, with the orders citing each | instrument |
GET /v1/knowledge | the knowledge base: consultation papers, committee reports, Board papers, speeches, articles and Neolex's notes — every document, newest first, or with q the sections that match, best first. Context and argument for the law, never the law itself | q, kind, instrument, limit |
GET /v1/knowledge/{doc}, /sections/{section} | one document's facts and sections (text=true adds their words), or one section's words, a piece at a time | text; offset, limit |
GET /v1/instruments/{id}/jurisprudence | the decisions on the instrument and what each teaches, by provision | as_of, relation, forum, year, tag |
GET /v1/decisions, GET /v1/decisions/{id} | the served judgments and orders; one decision with what it cites, what cites it, and every provision it touches | instrument, node, relation, forum, year, tag, as_of |
GET /v1/corpus | when the corpus was last updated: updatedOn, the newest day the data's changelog records a change to the data or the registry — the date every top bar of the site shows | none |
GET /v1/legal, GET /v1/legal/{section} | SEBI's seven Legal pages with their counts; one page's updated list and historical data, each row saying whether it opens the reader | lists (updated, historical) |
GET /v1/legal/{section}/search?q= | words searched across the instruments of a page that Neolex holds, whole words, per provision, up to three terms with AND, OR and NOT | q, op2, q2, op3, q3 |
GET /v1/registry, GET /v1/registry/{id} | the link dictionary of every instrument, amending notification, Act and forum; q= matches a title or a label; a retired id redirects to the entry that took its place | q, kind, regulator, view=links |
GET /v1/recipients, /v1/recipients/label?text=, /v1/recipients/search | the recipients dictionary of circulars and master circulars (categories, standard tags, every printed label with its tags); one printed label and its tags; the circulars addressed to a tag or to the recipients some words name, those that name it before those that only reach it (include=narrow for the first alone) | text; tag, q, include, kind |
GET /v1/pdf?instrument={id} | the official PDF of an instrument, whole or cut by chapter | chapters (ch-3,ch-4) |
POST /v1/check, POST /v1/citations | for editors: whether a posted draft may be merged; every provision's derived citation for a posted file | a JSON body |
GET /llms.txt | the API described for language models, in plain text | — |
An example
curl "/v1/instruments/sebi-lodr-regulations-2015/nodes/30.4.i?verbose=true&as_of=2024-01-01"
returns regulation 30(4)(i) of the SEBI (Listing Obligations and Disclosure Requirements) Regulations, 2015 as it stood on 1 January 2024 — "citation": "Regulation 30(4)(i)", its html and text, effectiveFrom, the versions before and after that day with the amending regulation that caused each, and its dependencies. Drop as_of for today's text; dropverbose for the text and its dependencies alone.
The text is a line for each provision, indented two spaces for each level, its number before its first words:
(i) The listed entity shall consider the following criteria for determination of materiality of events/information : (a) the omission of an event or information, which is likely to result in discontinuity … (b) the omission of an event or information is likely to result in significant market reaction …
Following what a provision depends on
A provision seldom stands alone: it uses defined terms, cites other provisions and schedules, and cites or amends other instruments. Every provision and chapter lists these in dependencies, so a program can fetch them too. Each entry has api, the path of the call that returns it (put the API's address before it), and from, the ids of the served provisions that rely on it. The provision served and its own sub-provisions are never listed.
"dependencies": {
"definitions": [
{ "id": "def-listed-entity", "term": "listed entity", "definedIn": "2.1.p",
"definedInCitation": "Regulation 2(1)(p)", "text": "\"listed entity\" means an entity which has listed …",
"api": "/v1/instruments/sebi-lodr-regulations-2015/nodes/2.1.p", "from": ["30.4.i", "30.4.i.c.1"] }
],
"provisions": [
{ "id": "sch-3.pt-a", "citation": "Part A of Schedule III",
"api": "/v1/instruments/sebi-lodr-regulations-2015/nodes/sch-3.pt-a", "how": ["citesInText"], "from": ["30.2"] }
],
"instruments": [
{ "registryId": "sebi-icdr-regulations-2018", "title": "Securities and Exchange Board of India (Issue of …) Regulations, 2018",
"node": "ch-5", "held": true, "api": "/v1/instruments/sebi-icdr-regulations-2018/nodes/ch-5", "url": null,
"how": ["citesInText"], "from": ["30.11.prov3"] }
]
}- definitions: every defined term the words link to, with where it is defined and the definition's words, so most callers need no second call.
- provisions: every other provision of the same instrument that the words cite (
how:citesInText) or that a recorded relationship names (amends,substitutes…). - instruments: every other instrument cited or amended, with the provision named where there is one. Where Neolex does not hold its text,
heldis false,apiis null andurlis the regulator's page or PDF.
What the HTML carries
Text comes rendered by one renderer, the same the reader uses. Inside it: <a class="def" data-term="…"> marks a defined term,<a href="#n-30.4"> a cross-reference inside the instrument, <a class="ext" href="/act-sebi-1992#n-11"> a reference to another document the reader holds (or to its official page when it does not), and <sup class="fnref"> a marker whose note is in the response's notes list. footnotes=false leaves the markers and notes out; links=false turns references into plain words. The text beside the HTML has none of this markup: no footnote markers, no amendment brackets, no links — the words as they read, which the dependencies list resolves.
Limits and errors
An unknown instrument, provision, section or decision is a 404 with {"error": …}; a bad date or operator a 400 or 422. Whole instruments are large — the LODR Regulations render to about 0.7 MB of HTML — so a caller that wants one chapter should ask for it. CORS is open for reads. Every answer in JSON or text carries an ETag: send it back as If-None-Match and an unchanged answer is a 304 with no body. Answers are gzipped for a caller that accepts it.