> ## 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.

# Graded postcode lookup (Postcode Validator, Postcode Autofill, and beyond)



## OpenAPI

````yaml /api-reference/openapi.yaml get /v1/lookup
openapi: 3.1.0
info:
  title: NIPOST Postcode Gateway — Public API
  version: 0.1.0
  description: >
    Public API for Nigeria's national postcode system. Autocomplete, nearby
    search and Lookup at the Postcode Validator level are free; elevated lookups
    (starting with Postcode Autofill) are commercial (credits). Authenticate
    with an API key.
servers:
  - url: https://api.postcode.gov.ng
    description: Production
  - url: http://localhost:8081
    description: Local gateway
security:
  - ApiKeyAuth: []
paths:
  /v1/lookup:
    get:
      summary: >-
        Graded postcode lookup (Postcode Validator, Postcode Autofill, and
        beyond)
      parameters:
        - name: code
          in: query
          required: true
          schema:
            type: string
        - name: level
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 5
            default: 1
      responses:
        '200':
          description: Graded attributes
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/LookupResponse'
components:
  schemas:
    LookupResponse:
      type: object
      properties:
        postcode:
          type: string
        valid:
          type: boolean
        administrative_address:
          type: object
          description: Included with Postcode Autofill
        recent_house_address:
          type: object
          description: Included with Postcode Autofill
        building_use_status:
          type: string
          description: Included with Postcode Autofill
  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.