Sheets Lab · Legal

Indian law in your Google Sheet

Convert IPC, CrPC and Evidence Act sections to BNS, BNSS and BSA, search inside Acts and judgments, follow court pendency and Parliament bills, and work out limitation and cheque-bounce dates, as formulas. Every formula starts with EJI_LEGAL_.

  1. Get your key

    Ask for a free beta key at legal.ejiapi.com/get-key. It is sent by email and starts with leg_.

  2. Copy your script

    Using more than one area in the same sheet? Tick it: one script carries every area you tick, with one EJI API menu.

  3. Paste it into your sheet

    Extensions → Apps Script
    Replace the code, Save
    Reload the sheet

    Google then asks you to allow the script. Because it is your own copy, it shows Google hasn’t verified this app: click Advanced → Go to … (unsafe) → Allow. The script reads only this sheet and talks only to ejiapi.com.

  4. Set your key, then type =EJI_

      Type =EJI_ in any cell and Google lists every formula with its help. Or use EJI API → Insert formula…: every formula with an example, and Pick fields where a formula has them.

      Something not working?
      “Set your key first”
      use EJI API › Legal › Set API key.
      “The Legal key was not accepted”
      copy the whole key again; it starts with leg_. Other EJI keys do not work here.
      “No match in the table”
      check the code (IPC, CrPC, IEA or BNS, BNSS, BSA) and the section number; sub-sections such as 304B are written without brackets.
      Permission errors
      run EJI API › Legal › Check setup once from the menu so Google can ask for permission.

    One sheet, one script. To change it, paste the new script over the old one.

    How the formulas behave
    Sections=EJI_LEGAL_SECTION("IPC", 420) gives 318 (BNS). The table is built from a community concordance and has not been reviewed by a lawyer; check the Gazette before you rely on it.
    DatesGive a date cell or text like 2026-01-15. Limitation and cheque-bounce answers say which provision they come from; a lawyer should confirm the Article and the starting day.
    JudgmentsMetadata for the Supreme Court and High Courts; names are hidden in matrimonial, child and sexual-offence cases. EJI_LEGAL_JUDGMENT_TEXT reads the text in parts of 45,000 characters, the most a cell holds.
    Fresh valuesAnswers are kept for one hour. EJI API › Refresh values fetches fresh ones.

    All formulas

    Reference information, not legal advice

    Statutes and judgments are shown as the sources publish them and may be out of date. A lawyer should confirm anything you rely on.

    Acts: India Code (Legislative Department). Judgments: eCourts and the Supreme Court of India, compiled by Dattam Labs (CC-BY-4.0). Pendency: NJDG. Bills: Sansad.