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

# List districts in a state+LGA

> District (PD) codes under a state+LGA. Districts have no human name — code only. Free, no credits consumed.



## OpenAPI

````yaml /api-reference/openapi.yaml get /v1/reference/districts
openapi: 3.1.0
info:
  title: NIPOST Postcode Gateway — Public API
  version: 0.1.0
  description: >
    Public API for Nigeria's national postcode system. Search and Lookup L1 are
    free; Lookup L2–L4 are commercial (credits); L5 is restricted. Authenticate
    with an API key.
servers:
  - url: https://api.postcode.gov.ng
    description: Production
security:
  - ApiKeyAuth: []
paths:
  /v1/reference/districts:
    get:
      tags:
        - Reference
      summary: List districts in a state+LGA
      description: >-
        District (PD) codes under a state+LGA. Districts have no human name —
        code only. Free, no credits consumed.
      parameters:
        - name: state
          in: query
          required: true
          schema:
            type: string
          description: 2-letter state code, e.g. FC
        - name: lga
          in: query
          required: true
          schema:
            type: string
          description: 2-digit LGA code, e.g. 01
      responses:
        '200':
          description: District codes under the state+LGA
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      districts:
                        type: array
                        items:
                          $ref: '#/components/schemas/NamedCode'
        '400':
          description: Missing/invalid state or lga
components:
  schemas:
    NamedCode:
      type: object
      description: A code with an optional full name (districts and areas are code-only).
      required:
        - code
      properties:
        code:
          type: string
          example: FC
        name:
          type: string
          example: Federal Capital Territory
  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.