The PinPlace API allows developers to create short links for geographic locations and retrieve coordinates via simple HTTP requests.
Base URL: https://api.pinpl.ac
All POST requests require a valid API key in the header:
Authorization: Bearer <API_KEY>
| Key Type | Example | Behavior |
|---|---|---|
| Demo Key | DEMO1234567890 | Works for testing, returns dummy data, does not write to DB, no rate limit. |
| Regular Key | User-generated | Writes to DB, increments usage_count, rate-limited to 15 requests/min. |
| Admin / Paid Key | User-generated | No rate limit, full access. |
Create a short link from latitude and longitude.
URL: POST https://api.pinpl.ac/shorten
Headers:
Content-Type: application/json
Authorization: Bearer <API_KEY>
Request Body (JSON):
{
"lat": 40.689989,
"lng": -74.045144
}
{
"url": "https://pinpl.ac/abcde",
"code": "abcde"
}
{
"error": "Missing lat/lng"
}
{
"error": "API key missing or invalid"
}
{
"error": "Rate limit exceeded",
"message": "Max 15 requests per minute"
}
{
"error": "Database error",
"message": "Error details..."
}
Notes: Demo key returns a short link but does not write to DB. Admin keys have no rate limit.
Retrieve coordinates for a given short link code.
URL: GET https://api.pinpl.ac/resolve/{code}
Path Parameter:
| Parameter | Type | Description |
|---|---|---|
| code | string | 5-letter code of the short link |
{
"latitude": 40.689989,
"longitude": -74.045144
}
{
"error": "Missing code"
}
{
"error": "API key missing or invalid"
}
{
"error": "Code not found"
}
{
"error": "Rate limit exceeded",
"message": "Max 15 requests per minute"
}
{
"error": "Database error",
"message": "Error details..."
}
Create a short link:
curl -X POST https://api.pinpl.ac/shorten \
-H "Content-Type: application/json" \
-H "Authorization: Bearer DEMO1234567890" \
-d '{"lat":40.689989,"lng":-74.045144}'
Resolve a code:
curl -H "Authorization: Bearer DEMO1234567890" https://api.pinpl.ac/resolve/abcde