{
  "openapi": "3.1.0",
  "info": {
    "title": "Nyaykosh Indian Laws as Data",
    "version": "1.0",
    "description": "Indian laws as structured JSON: sections, penalties, XML/PDF and a compliance check\n\nCalled through the ApiClay gateway with an ApiClay token or API key (https://apiclay.com/dashboard/keys). Pricing, trial, fees and full parameter notes: https://apiclay.com/api/nyaykosh/llms.txt",
    "x-apiclay-vendor": "nyaykosh",
    "x-apiclay-pricing": "0.0029 credits/request, 10 trial requests"
  },
  "externalDocs": {
    "description": "Full documentation for AI agents (Markdown)",
    "url": "https://apiclay.com/api/nyaykosh/llms.txt"
  },
  "servers": [
    {
      "url": "https://api.apiclay.com/v1/api/nyaykosh"
    }
  ],
  "security": [
    {
      "bearerAuth": []
    },
    {
      "tokenHeader": []
    }
  ],
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "ApiClay API key (apiclay_…) or session token"
      },
      "tokenHeader": {
        "type": "apiKey",
        "in": "header",
        "name": "token",
        "description": "ApiClay API key (apiclay_…) or session token"
      }
    }
  },
  "paths": {
    "/laws": {
      "get": {
        "operationId": "get_laws",
        "summary": "List laws",
        "responses": {
          "200": {
            "description": "The upstream response (JSON unless the route or `X-ApiClay-Html` chooses another output)"
          },
          "default": {
            "description": "Gateway error, JSON: SOURCE_UNAVAILABLE = upstream or datasource failed, unknown path, or malformed request; POLICY_LIMIT_EXCEEDED = rate limit, daily cap, or the vendor's request policy was hit; SERVER_BUSY = gateway at capacity; retry with backoff; INSUFFICIENT_BALANCE = no credits left once trial and plan requests are used up; AUTH_FAILED = missing or invalid token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "category",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Category of the law. Today every law is in Governance; /categories lists the names Nyaykosh plans to use. Leave empty to get all laws."
            },
            "description": "Category of the law. Today every law is in Governance; /categories lists the names Nyaykosh plans to use. Leave empty to get all laws."
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Legal status, e.g. In force (not case-sensitive). Leave empty for all."
            },
            "description": "Legal status, e.g. In force (not case-sensitive). Leave empty for all."
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Keyword search over title, description and authority, e.g. data, aadhaar, gaming"
            },
            "description": "Keyword search over title, description and authority, e.g. data, aadhaar, gaming"
          }
        ]
      }
    },
    "/law": {
      "get": {
        "operationId": "get_law",
        "summary": "Get one law (all sections and penalties)",
        "responses": {
          "200": {
            "description": "The upstream response (JSON unless the route or `X-ApiClay-Html` chooses another output)"
          },
          "default": {
            "description": "Gateway error, JSON: SOURCE_UNAVAILABLE = upstream or datasource failed, unknown path, or malformed request; POLICY_LIMIT_EXCEEDED = rate limit, daily cap, or the vendor's request policy was hit; SERVER_BUSY = gateway at capacity; retry with backoff; INSUFFICIENT_BALANCE = no credits left once trial and plan requests are used up; AUTH_FAILED = missing or invalid token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "law",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Law slug (apiSlug from /laws), e.g. the-information-technology-act-2000 or the-digital-personal-data-protection-act-2023"
            },
            "description": "Law slug (apiSlug from /laws), e.g. the-information-technology-act-2000 or the-digital-personal-data-protection-act-2023"
          }
        ]
      }
    },
    "/law/sections": {
      "get": {
        "operationId": "get_law_sections",
        "summary": "List a law's sections",
        "responses": {
          "200": {
            "description": "The upstream response (JSON unless the route or `X-ApiClay-Html` chooses another output)"
          },
          "default": {
            "description": "Gateway error, JSON: SOURCE_UNAVAILABLE = upstream or datasource failed, unknown path, or malformed request; POLICY_LIMIT_EXCEEDED = rate limit, daily cap, or the vendor's request policy was hit; SERVER_BUSY = gateway at capacity; retry with backoff; INSUFFICIENT_BALANCE = no credits left once trial and plan requests are used up; AUTH_FAILED = missing or invalid token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "law",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Law slug (apiSlug from /laws), e.g. the-information-technology-act-2000 or the-digital-personal-data-protection-act-2023"
            },
            "description": "Law slug (apiSlug from /laws), e.g. the-information-technology-act-2000 or the-digital-personal-data-protection-act-2023"
          }
        ]
      }
    },
    "/law/section": {
      "get": {
        "operationId": "get_law_section",
        "summary": "Get one section of a law",
        "responses": {
          "200": {
            "description": "The upstream response (JSON unless the route or `X-ApiClay-Html` chooses another output)"
          },
          "default": {
            "description": "Gateway error, JSON: SOURCE_UNAVAILABLE = upstream or datasource failed, unknown path, or malformed request; POLICY_LIMIT_EXCEEDED = rate limit, daily cap, or the vendor's request policy was hit; SERVER_BUSY = gateway at capacity; retry with backoff; INSUFFICIENT_BALANCE = no credits left once trial and plan requests are used up; AUTH_FAILED = missing or invalid token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "law",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Law slug (apiSlug from /laws), e.g. the-information-technology-act-2000 or the-digital-personal-data-protection-act-2023"
            },
            "description": "Law slug (apiSlug from /laws), e.g. the-information-technology-act-2000 or the-digital-personal-data-protection-act-2023"
          },
          {
            "name": "provision",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Section number as listed by /law/sections (the num field), e.g. 1, 43A or 72A"
            },
            "description": "Section number as listed by /law/sections (the num field), e.g. 1, 43A or 72A"
          }
        ]
      }
    },
    "/law/penalties": {
      "get": {
        "operationId": "get_law_penalties",
        "summary": "Penalty schedule of a law",
        "responses": {
          "200": {
            "description": "The upstream response (JSON unless the route or `X-ApiClay-Html` chooses another output)"
          },
          "default": {
            "description": "Gateway error, JSON: SOURCE_UNAVAILABLE = upstream or datasource failed, unknown path, or malformed request; POLICY_LIMIT_EXCEEDED = rate limit, daily cap, or the vendor's request policy was hit; SERVER_BUSY = gateway at capacity; retry with backoff; INSUFFICIENT_BALANCE = no credits left once trial and plan requests are used up; AUTH_FAILED = missing or invalid token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "law",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Law slug (apiSlug from /laws), e.g. the-information-technology-act-2000 or the-digital-personal-data-protection-act-2023"
            },
            "description": "Law slug (apiSlug from /laws), e.g. the-information-technology-act-2000 or the-digital-personal-data-protection-act-2023"
          }
        ]
      }
    },
    "/law/xml": {
      "get": {
        "operationId": "get_law_xml",
        "summary": "Law as LegalDocML XML",
        "responses": {
          "200": {
            "description": "The upstream response (JSON unless the route or `X-ApiClay-Html` chooses another output)"
          },
          "default": {
            "description": "Gateway error, JSON: SOURCE_UNAVAILABLE = upstream or datasource failed, unknown path, or malformed request; POLICY_LIMIT_EXCEEDED = rate limit, daily cap, or the vendor's request policy was hit; SERVER_BUSY = gateway at capacity; retry with backoff; INSUFFICIENT_BALANCE = no credits left once trial and plan requests are used up; AUTH_FAILED = missing or invalid token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "law",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Law slug (apiSlug from /laws), e.g. the-information-technology-act-2000 or the-digital-personal-data-protection-act-2023"
            },
            "description": "Law slug (apiSlug from /laws), e.g. the-information-technology-act-2000 or the-digital-personal-data-protection-act-2023"
          }
        ]
      }
    },
    "/law/pdf": {
      "get": {
        "operationId": "get_law_pdf",
        "summary": "Law as official PDF",
        "responses": {
          "200": {
            "description": "The upstream response (JSON unless the route or `X-ApiClay-Html` chooses another output)"
          },
          "default": {
            "description": "Gateway error, JSON: SOURCE_UNAVAILABLE = upstream or datasource failed, unknown path, or malformed request; POLICY_LIMIT_EXCEEDED = rate limit, daily cap, or the vendor's request policy was hit; SERVER_BUSY = gateway at capacity; retry with backoff; INSUFFICIENT_BALANCE = no credits left once trial and plan requests are used up; AUTH_FAILED = missing or invalid token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "law",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Law slug (apiSlug from /laws), e.g. the-information-technology-act-2000 or the-digital-personal-data-protection-act-2023"
            },
            "description": "Law slug (apiSlug from /laws), e.g. the-information-technology-act-2000 or the-digital-personal-data-protection-act-2023"
          }
        ]
      }
    },
    "/categories": {
      "get": {
        "operationId": "get_categories",
        "summary": "Category names (today every law is in Governance)",
        "responses": {
          "200": {
            "description": "The upstream response (JSON unless the route or `X-ApiClay-Html` chooses another output)"
          },
          "default": {
            "description": "Gateway error, JSON: SOURCE_UNAVAILABLE = upstream or datasource failed, unknown path, or malformed request; POLICY_LIMIT_EXCEEDED = rate limit, daily cap, or the vendor's request policy was hit; SERVER_BUSY = gateway at capacity; retry with backoff; INSUFFICIENT_BALANCE = no credits left once trial and plan requests are used up; AUTH_FAILED = missing or invalid token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/compliance/personas": {
      "get": {
        "operationId": "get_compliance_personas",
        "summary": "Compliance personas and their rules",
        "responses": {
          "200": {
            "description": "The upstream response (JSON unless the route or `X-ApiClay-Html` chooses another output)"
          },
          "default": {
            "description": "Gateway error, JSON: SOURCE_UNAVAILABLE = upstream or datasource failed, unknown path, or malformed request; POLICY_LIMIT_EXCEEDED = rate limit, daily cap, or the vendor's request policy was hit; SERVER_BUSY = gateway at capacity; retry with backoff; INSUFFICIENT_BALANCE = no credits left once trial and plan requests are used up; AUTH_FAILED = missing or invalid token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/compliance/check": {
      "post": {
        "operationId": "post_compliance_check",
        "summary": "Compliance check (what is missing, penalty exposure)",
        "responses": {
          "200": {
            "description": "The upstream response (JSON unless the route or `X-ApiClay-Html` chooses another output)"
          },
          "default": {
            "description": "Gateway error, JSON: SOURCE_UNAVAILABLE = upstream or datasource failed, unknown path, or malformed request; POLICY_LIMIT_EXCEEDED = rate limit, daily cap, or the vendor's request policy was hit; SERVER_BUSY = gateway at capacity; retry with backoff; INSUFFICIENT_BALANCE = no credits left once trial and plan requests are used up; AUTH_FAILED = missing or invalid token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              },
              "example": {
                "personaId": "persona_data_principal",
                "triggerId": "persona_data_principal-applies",
                "checkedKeys": [
                  "persona_data_principal-r1::action::0"
                ]
              }
            }
          }
        }
      }
    }
  }
}
