> ## Documentation Index
> Fetch the complete documentation index at: https://docs-neevlegal.neeved.com/llms.txt
> Use this file to discover all available pages before exploring further.

# List districts within a state

> Returns all districts in a given state with their district codes.



## OpenAPI

````yaml get /court-structure/states/{state}/districts
openapi: 3.0.3
info:
  title: NeevLegal API
  description: >-
    The NeevLegal REST API provides structured, programmatic access to Indian
    court case data. Search cases, retrieve full case records by CNR number, and
    explore the court directory across district courts, high courts, and the
    Supreme Court of India.
  version: 1.0.0
servers:
  - url: https://api-neevlegal.neeved.com/api/v1
    description: Version 1
security: []
tags:
  - name: Case Detail
    description: Retrieve the complete case record for one or more CNR numbers.
  - name: Case Search
    description: >-
      Search across district courts, high courts, and the Supreme Court by party
      name, advocate, judge, FIR number, or other criteria.
  - name: Court Structure
    description: >-
      Browse the Indian court directory — states, districts, court complexes,
      and individual courts.
paths:
  /court-structure/states/{state}/districts:
    get:
      tags:
        - Court Structure
      summary: List districts within a state
      description: Returns all districts in a given state with their district codes.
      parameters:
        - name: state
          in: path
          required: true
          description: Two-letter state code — for example, MH for Maharashtra.
          schema:
            type: string
            example: MH
      responses:
        '200':
          description: Districts in state
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  response:
                    type: object
                    properties:
                      stateName:
                        type: string
                        example: Maharashtra
                      stateCode:
                        type: string
                        example: MH
                      totalDistricts:
                        type: number
                      data:
                        type: array
                        items:
                          type: object
                          properties:
                            districtName:
                              type: string
                              description: Full district name.
                              example: Pune
                            districtCode:
                              type: string
                              description: >-
                                District code for use in subsequent path
                                parameters.
                              example: PUNE
                          required:
                            - districtName
                            - districtCode
                    required:
                      - stateName
                      - stateCode
                      - totalDistricts
                      - data
                required:
                  - success
                  - response
        '401':
          description: Missing or invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: State code not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - apiKeyAuth: []
components:
  schemas:
    ErrorResponse:
      type: object
      description: Standard error envelope returned on all non-2xx responses.
      properties:
        success:
          type: boolean
          description: Always false for error responses.
          example: false
        message:
          type: string
          description: Human-readable description of what went wrong.
          example: API key not found or has been revoked.
        moreInfo:
          type: string
          description: Additional context when available.
          example: No additional info found.
      required:
        - success
        - message
        - moreInfo
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.