Card image cap

PinPlace API

This API allows you to create and retrieve short links to geographic locations. To post you need a valid API Key.

OpenAPI Specification: Download / View YAML

Full documentation: View in browser


Generate custom API key
Looks good!

POST /shorten

Create a short link from latitude and longitude. All requests require a valid API key via the Authorization: Bearer <API_KEY> HTTP header.

Headers:

Authorization: Bearer <API_KEY>
Content-Type: application/json

Request Body (JSON):

{
  "lat": 40.689989,
  "lng": -74.045144
}

Example cURL:

curl -X POST https://api.pinpl.ac/shorten \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer DEMO1234567890" \
  -d '{"lat":40.689989,"lng":-74.045144}'

Response:

{
  "url":"https://pinpl.ac/abcde",
  "code":"abcde"
}
Try it here:
Latitude: Longitude: API Key:




GET /resolve/<code>

Retrieve coordinates for a given code generated with POST. Requires a valid API key in the Authorization header.

Example:

GET https://api.pinpl.ac/resolve/abcde

Headers:

Authorization: Bearer YOUR_API_KEY

Example cURL:

curl -H "Authorization: Bearer DEMO1234567890" https://api.pinpl.ac/resolve/abcde

Response:

{
  "latitude": 40.689989,
  "longitude": -74.045144
}
Try it here:
Code: API Key:




Errors

  • 400 – Missing code
  • 401 – API key missing or invalid
  • 404 – Code not found
  • 429 – Rate limit exceeded
  • 500 – Database or server error

Limitations

  • Format: JSON
  • Coordinates in WGS84
  • Rate limit: 15 requests per minute per API key
  • Requests with the test/demo API key (DEMO1234567890) return dummy data only