Developers

Loc8ID API

Create and manage Loc8IDs programmatically. Requires a Business plan API key.

Base URL: https://loc8id.com/api Get an API key →

Try it

Make a live request right here—no curl or Postman needed. Uses your real API key against your account.

POST /api/loc8ids

Authentication

Every request must include your API key as a Bearer token:

Authorization: Bearer loc8id_your_key_here

Keys are created in your Dashboard → API Keys. Each key is shown only once at creation.

Endpoints

POST /api/loc8ids API Key required

Create a new Loc8ID for a geographic coordinate. Returns a short URL immediately.

Request body · application/json

Field Type Required Description
latitudenumberYes−90 to 90
longitudenumberYes−180 to 180
namestringNoLabel for this location
descriptionstringNoAdditional details
custom_slugstringNoCustom short code (Business)

Code samples

curl -X POST https://loc8id.com/api/loc8ids \
  -H "Authorization: Bearer loc8id_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "latitude": 40.7580,
    "longitude": -73.9855,
    "name": "Times Square"
  }'

Response · 201 Created

{
  "success": true,
  "data": {
    "loc8id": "xk7m",
    "url": "https://loc8id.com/xk7m",
    "latitude": 40.758,
    "longitude": -73.9855,
    "name": "Times Square",
    "description": null,
    "is_custom_slug": false
  }
}
GET /api/collections/{id}/items Public

Returns all Loc8IDs in a public collection. No authentication required.

curl https://loc8id.com/api/collections/your-collection-id/items

Response · 200 OK

{
  "success": true,
  "data": [
    {
      "loc8id": "xk7m",
      "url": "https://loc8id.com/xk7m",
      "name": "Times Square",
      "latitude": 40.758,
      "longitude": -73.9855
    }
  ]
}

Rate Limits

Rate limit status is returned in every response header.

Business

60 req / min

Response headers

X-RateLimit-Limit · X-RateLimit-Remaining · X-RateLimit-Reset

Exceeding the limit returns 429 Too Many Requests. The X-RateLimit-Reset header tells you when the window resets (Unix timestamp).

Error Codes

All errors return JSON with a message field.

Code Meaning
201Created — Loc8ID created successfully
400Bad Request—missing or invalid parameters
401Unauthorized—missing, invalid, or revoked API key
403Forbidden—plan limit reached or insufficient permissions
404Not Found
429Too Many Requests—rate limit exceeded, check X-RateLimit-Reset
500Server Error—try again, contact support if it persists

Ready to build?

API access is included on the Business plan.