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

# An LGA's wards

> The wards of one local government area, by name, each with its code, frame count and extent. No key is needed: the hierarchy is reference data about the grid, not anyone's dataset, and the response is cacheable for an hour. The same answer is on `GET /v1/frames/admin` for a key holder.



## OpenAPI

````yaml /api-reference/openapi.json get /v1/wards
openapi: 3.1.0
info:
  title: LOCI API
  version: 1.0.0
  summary: >-
    The Milsat spatial index over HTTP: find the frame at a location, the frames
    around it, what is recorded on them, and a worded answer about them.
  description: >-
    Four calls, all under `/v1/frames`, all read-only, all with an API key.


    Nigeria is covered by a grid of **frames**: cells roughly a kilometre
    across, each with a stable numeric id. Every dataset on LOCI falls within
    frames, so a frame id is the key to everything known about a place. The API
    lets your code resolve a location to its frame, list the frames around a
    point, read what the datasets your organisation owns or licenses record on
    those frames, and ask a question about them in plain language.


    Every response is wrapped in an envelope: a success carries `data`, a
    failure carries `error` with a machine-readable `code` and a human
    `message`. Branch on the code; the message may be reworded.


    Send the key as `Authorization: Bearer loci_sk_…`. A key acts for one
    organisation, is read-only, and expires.
servers:
  - url: https://api.loci.ng
    description: The LOCI API, which the app at loci.ng also uses.
  - url: http://localhost:8088
    description: A local development stack, which the examples here were captured against.
security:
  - apiKey: []
tags:
  - name: Frames
    description: The spatial index and what is recorded on it.
paths:
  /v1/wards:
    get:
      tags:
        - Frames
      summary: An LGA's wards
      description: >-
        The wards of one local government area, by name, each with its code,
        frame count and extent. No key is needed: the hierarchy is reference
        data about the grid, not anyone's dataset, and the response is cacheable
        for an hour. The same answer is on `GET /v1/frames/admin` for a key
        holder.
      operationId: wardsList
      parameters:
        - name: state
          in: query
          required: true
          description: The state, by name regardless of case.
          schema:
            type: string
          example: Katsina
        - name: lga
          in: query
          required: true
          description: The LGA, by name regardless of case.
          schema:
            type: string
          example: Kafur
      responses:
        '200':
          description: The units, by name.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/AdminUnits'
                required:
                  - data
              examples:
                wards:
                  summary: 'state=Katsina&lga=Kafur: its wards'
                  description: 10 wards came back, two shown.
                  value:
                    data:
                      level: ward
                      units:
                        - level: ward
                          name: DANTUTTURE
                          code: '1675'
                          state: KATSINA
                          lga: KAFUR
                          zone: NORTH WEST
                          frames: 106
                          bbox:
                            - 7.70348
                            - 11.71633
                            - 7.86981
                            - 11.78469
                        - level: ward
                          name: DUTSEN KURA/KANYA
                          code: '1673'
                          state: KATSINA
                          lga: KAFUR
                          zone: NORTH WEST
                          frames: 147
                          bbox:
                            - 7.55462
                            - 11.40059
                            - 7.69649
                            - 11.57982
        '400':
          description: A required parameter is missing.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security: []
components:
  schemas:
    AdminUnits:
      type: object
      properties:
        level:
          type: string
          enum:
            - state
            - lga
            - ward
          description: Which level the units are.
        units:
          type: array
          items:
            $ref: '#/components/schemas/AdminUnit'
      required:
        - level
        - units
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              description: Stable and machine-readable. Branch on it.
            message:
              type: string
              description: For people. May be reworded.
          required:
            - code
            - message
      required:
        - error
    AdminUnit:
      type: object
      properties:
        level:
          type: string
          enum:
            - state
            - lga
            - ward
        name:
          type: string
          description: As the baseline spells it.
          example: KAFUR
        code:
          type: string
          description: The baseline's code for the unit.
          example: '169'
        state:
          type: string
          description: The state above an LGA or a ward.
        lga:
          type: string
          description: The LGA above a ward.
        zone:
          type: string
          description: The geopolitical zone.
        frames:
          type: integer
          description: How many frames lie in the unit.
        bbox:
          $ref: '#/components/schemas/BBox'
      required:
        - level
        - name
        - frames
        - bbox
    BBox:
      type: array
      description: '`[minLon, minLat, maxLon, maxLat]` in degrees.'
      items:
        type: number
      minItems: 4
      maxItems: 4
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      bearerFormat: loci_sk_…
      description: >-
        An API key minted in the Developers tab of the LOCI app, sent as
        `Authorization: Bearer loci_sk_…`. Acts for one organisation, is
        read-only, and expires.

````

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