PinPlace API Documentation

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>

API Key Types

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.

POST /shorten

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
}
Responses

Notes: Demo key returns a short link but does not write to DB. Admin keys have no rate limit.

GET /resolve/{code}

Retrieve coordinates for a given short link code.

URL: GET https://api.pinpl.ac/resolve/{code}

Path Parameter:

ParameterTypeDescription
code string 5-letter code of the short link
Responses

Example cURL Requests

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

Rate Limiting

Notes