πŸ“ DigiPin API

Open-source API for DigiPin - India's National Level Addressing Grid

πŸ”— Official DigiPin by India Post

🌍 What is DigiPin?

DigiPin (Digital Postal Index Number) is India's revolutionary addressing system developed by the Department of Posts, Government of India. It's a game-changing technology that transforms how we identify and locate places across the country.

🎯 Key Features:

🏠 Real-World Applications:

πŸ“ How It Works:

DigiPin uses a hierarchical grid system that progressively narrows down locations:

Example: Dak Bhawan, New Delhi has DigiPin 39J-49L-L8T4, which pinpoints its exact location within a 3.8m Γ— 3.8m area!

πŸš€ Available Endpoints

GET /health

Health check endpoint to verify API status

GET /api/v1/info

Get system information and API details

GET /api/v1/example

See a working example with Dak Bhawan coordinates

GET /api/v1/digipin/encode

Encode latitude/longitude coordinates to DigiPin code

?lat=28.622788&lon=77.213033
GET /api/v1/digipin/decode

Decode DigiPin code to latitude/longitude coordinates

?digipin=39J-49L-L8T4

πŸ“– Example Usage

πŸ”— Encode Coordinates to DigiPin

Convert latitude/longitude coordinates to DigiPin code:

# Using curl
curl "https://digipin.pratikbutani.com/api/v1/digipin/encode?lat=28.622788&lon=77.213033"

# Using browser
https://digipin.pratikbutani.com/api/v1/digipin/encode?lat=28.622788&lon=77.213033

πŸ—ΊοΈ Decode DigiPin to Coordinates

Convert DigiPin code back to latitude/longitude coordinates:

# Using curl
curl "https://digipin.pratikbutani.com/api/v1/digipin/decode?digipin=39J49LL8T4"

# Using browser
https://digipin.pratikbutani.com/api/v1/digipin/decode?digipin=39J49LL8T4

πŸ“Š Other Endpoints

Additional utility endpoints for API information and health checks:

# Health Check
curl "https://digipin.pratikbutani.com/health"

# API Information
curl "https://digipin.pratikbutani.com/api/v1/info"

# Working Example
curl "https://digipin.pratikbutani.com/api/v1/example"

πŸ› οΈ Tech Stack

Built entirely using Warp Terminal with AI assistance - 100% without writing a single line of code manually!

⚠️ Disclaimer

This is NOT an official API. This is an experimental project created for testing and educational purposes only. DigiPin is an official system developed by the Department of Posts, Government of India. This API is built purely for "vibe coding" and demonstration purposes.