api-ninjas-com PIN Code API

The PIN Code API looks up Indian PIN codes (Postal Index Numbers) and returns the city, district, state and coordinates. One PIN code often covers several post offices and localities, so responses are always an array. For postal codes outside India, use the Postal Code API.

Operations 1

GET /v1/pincode Look up an Indian PIN code #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/api-ninjas-com:api-ninjas-com-pin-code-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

api-ninjas-com-pin-code-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Ninjas PIN Code API
  description: 'Combined OpenAPI specification for every API Ninjas endpoint. Requests go to https://api.api-ninjas.com with an `X-Api-Key` header; get a free key at https://api-ninjas.com/register. Human-readable docs: https://api-ninjas.com/api. Index for LLMs: https://api-ninjas.com/llms.txt.'
  version: 1.0.0
  contact:
    name: API Ninjas
    url: https://api-ninjas.com
  license:
    name: Proprietary
servers:
- url: https://api.api-ninjas.com
  description: API Ninjas Production
security:
- ApiKeyAuth: []
tags:
- name: PIN Code
  description: The PIN Code API looks up Indian PIN codes (Postal Index Numbers) and returns the city, district, state and coordinates. One PIN code often covers several post offices and localities, so responses are always an array. For postal codes outside India, use the Postal Code API.
paths:
  /v1/pincode:
    get:
      summary: Look up an Indian PIN code
      description: Returns the locations matching a six-digit Indian PIN code. Spaces and hyphens are normalized, so 110001, 110 001 and 110-001 all resolve. Searching by city, district or state instead of a pincode requires premium.
      operationId: getPinCode
      tags:
      - PIN Code
      parameters:
      - name: pincode
        in: query
        description: The six-digit Indian PIN code (Postal Index Number) to look up.
        required: false
        schema:
          type: string
      - name: city
        in: query
        description: Post office or locality name to search in reverse, as returned in the city field, e.g. Connaught Place. To list a whole city, use district. Premium only.
        required: false
        schema:
          type: string
      - name: district
        in: query
        description: District to search in reverse, e.g. Pune. Premium only.
        required: false
        schema:
          type: string
      - name: state
        in: query
        description: State or union territory to search in reverse, e.g. Maharashtra. Premium only.
        required: false
        schema:
          type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/PinCodeInfo'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PinCodeOpenapi_Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PinCodeOpenapi_Error'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PinCodeOpenapi_Error'
      security:
      - ApiKeyAuth: []
components:
  schemas:
    PinCodeOpenapi_Error:
      type: object
      properties:
        message:
          type: string
    PinCodeInfo:
      type: object
      properties:
        pincode:
          type: string
          example: '110001'
        city:
          type: string
          description: Post office or locality the row covers.
          example: New Delhi G.P.O.
        state:
          type: string
          example: Delhi
        state_code:
          type: string
          description: Numeric state code. Premium only.
          example: '07'
        district:
          type: string
          description: Premium only.
          example: New Delhi
        district_code:
          type: string
          description: Numeric district code. Premium only.
          example: 094
        lat:
          type: string
          description: Premium only.
          example: '28.6369'
        lon:
          type: string
          description: Premium only.
          example: '77.2183'
        accuracy:
          type: integer
          description: 'How precise the coordinates are, from 1 to 6 (higher is more precise): 6 = centroid of addresses or shape, 4 = gazetteer match, 1 = estimated. Published rather than implying uniform precision. Premium only.'
          example: 3
        timezone:
          type: string
          example: Asia/Kolkata
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-Api-Key
externalDocs:
  description: API Ninjas documentation
  url: https://api-ninjas.com/api