Why Use PincodeAPI?
Everything you need for pincode lookups, without the complexity.
Blazing Fast
Our API is optimized for speed, delivering responses in milliseconds so your applications stay responsive.
Completely Free
No fees, no rate limits, and no API key required. Perfect for projects of any scale.
Always Up-to-Date
We regularly update our database from official sources to ensure you get the most accurate data.
Simple Integration
A clean and straightforward REST API that returns JSON. Integrate it into any project in minutes.
Reliable & Secure
Hosted on a robust infrastructure to ensure high availability. Served over HTTPS for secure communication.
Comprehensive Data
Get post office name, district, state, and more for over 150,000 pincodes across India.
How It Works
Just make a GET request to our endpoint. It's that simple.
API Endpoint
To get details for a specific pincode, use the following URL structure:
https://pincodeapi.pages.dev/pincode/{PINCODE}
API Usage Examples
Here’s how to call the API from popular programming languages.
fetch('https://pincodeapi.pages.dev/pincode/110001')
.then(response => {
if (!response.ok) {
throw new Error('Network response was not ok');
}
return response.json();
})
.then(data => {
console.log(data);
})
.catch(error => {
console.error('There has been a problem with your fetch operation:', error);
});
import requests
import json
pincode = "110001"
api_url = f"https://pincodeapi.pages.dev/pincode/{pincode}"
try:
response = requests.get(api_url)
response.raise_for_status() # Raise an exception for bad status codes
data = response.json()
print(json.dumps(data, indent=2))
except requests.exceptions.HTTPError as http_err:
print(f"HTTP error occurred: {http_err}")
except Exception as err:
print(f"Other error occurred: {err}")
<?php
$pincode = "110001";
$apiUrl = "https://pincodeapi.pages.dev/pincode/" . $pincode;
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $apiUrl);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HEADER, false);
$response = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
if ($httpCode == 200) {
$data = json_decode($response, true);
print_r($data);
} else {
echo "Error fetching data. HTTP Status Code: " . $httpCode;
}
?>
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.io.IOException;
public class PincodeApiClient {
public static void main(String[] args) {
String pincode = "110001";
String apiUrl = "https://pincodeapi.pages.dev/pincode/" + pincode;
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create(apiUrl))
.build();
try {
HttpResponse response = client.send(request, HttpResponse.BodyHandlers.ofString());
if (response.statusCode() == 200) {
System.out.println(response.body());
} else {
System.out.println("Error: Received status code " + response.statusCode());
}
} catch (IOException | InterruptedException e) {
e.printStackTrace();
}
}
}
Live API Demo
Enter a 6-digit Indian pincode to test the API in real-time.
Enter a pincode and click "Fetch Details" to see the results.
Frequently Asked Questions
Is this API really free?
Yes, absolutely. There are no hidden charges, rate limits, or API keys. You can use it for any personal or commercial project.
Where does the data come from?
Our data is sourced from India Post's official public records. We strive to keep it as accurate and up-to-date as possible.
How often is the data updated?
We perform regular checks and update our database periodically to reflect the latest information from India Post.
What happens if I enter an invalid pincode?
The API will return a "No records found" message with a "Error" status, so you can handle these cases gracefully in your application.