AI-Native API

Spatix API

The simplest way for AI agents and developers to create maps

Quick Start

Create a map with a single POST request. No complex setup required.

curl -X POST https://api.spatix.io/api/map \
  -H "Content-Type: application/json" \
  -d '{
    "data": {"type": "Point", "coordinates": [-122.4194, 37.7749]},
    "title": "San Francisco"
  }'

Response:

{
  "success": true,
  "id": "abc123",
  "url": "https://spatix.io/m/abc123",
  "embed": "<iframe src='https://spatix.io/m/abc123?embed=1' ...></iframe>"
}

Authentication

Free tier: No authentication required. Rate limited to 60 maps/hour per IP.

Pro/Team: Use the X-API-Key header.

curl -X POST https://api.spatix.io/api/map \
  -H "X-API-Key: your_api_key" \
  -H "Content-Type: application/json" \
  -d '{"data": {...}}'

Create Map

POST /api/map

Request Body

FieldTypeDescription
dataobjectGeoJSON, coordinates, or geometry
titlestringOptional map title
stylestringlight, dark, satellite, streets

Get Map

GET /api/map/:id

Retrieve map data and metadata.

curl https://api.spatix.io/api/map/abc123

Supported Formats

Input Formats

  • • GeoJSON (Point, LineString, Polygon, FeatureCollection)
  • • Coordinate arrays [[lng, lat], ...]
  • • Shapefile (.zip)
  • • KML / KMZ
  • • GPX
  • • CSV (with lat/lng columns)
  • • GeoPackage

Output

  • • Shareable URL
  • • Embeddable iframe
  • • PNG preview image
  • • GeoJSON export

Examples

Multiple Points

{
  "data": [
    [-122.4194, 37.7749],
    [-118.2437, 34.0522],
    [-73.9857, 40.7484]
  ],
  "title": "US Cities"
}

GeoJSON Feature

{
  "data": {
    "type": "Feature",
    "geometry": {
      "type": "Polygon",
      "coordinates": [[[-122.5, 37.7], [-122.3, 37.7], [-122.3, 37.9], [-122.5, 37.9], [-122.5, 37.7]]]
    },
    "properties": {"name": "SF Bay Area"}
  }
}