Location Services API

Geolocation Block

Maps, Locations & Spatial Intelligence

Store locations, define geofences, calculate distances, and build location-aware applications with our powerful spatial API.

1M+
Locations Stored
<50ms
Query Response
99.9%
Geocoding Accuracy
Real-time
Geofence Events

Powerful Location Features

Everything you need to build location-aware applications

Location Storage

Store and manage points of interest with rich metadata, categories, and custom attributes.

  • Custom metadata fields
  • Category hierarchies
  • Bulk import/export

Geofencing

Define virtual boundaries and trigger events when users enter or exit zones.

  • Polygon & circle zones
  • Enter/exit webhooks
  • Dwell time tracking

Distance Calculations

Calculate distances between points with support for different formulas and units.

  • Haversine formula
  • Multiple unit support
  • Matrix calculations

Address Geocoding

Convert addresses to coordinates and coordinates to addresses with high accuracy.

  • Forward geocoding
  • Reverse geocoding
  • Address autocomplete

Nearby Search

Find locations within a radius or bounding box with powerful filtering options.

  • Radius search
  • Bounding box queries
  • Category filtering

Route Optimization

Calculate optimal routes between multiple waypoints with time and distance constraints.

  • Multi-stop routing
  • Time windows
  • Vehicle capacity

Simple API, Powerful Results

Store locations, find nearby points, and trigger geofence events with just a few lines of code.

GeoJSON Support

Full GeoJSON compatibility for points, polygons, and complex geometries.

Real-time Events

Instant webhooks when entities enter, exit, or dwell in geofenced zones.

Multiple Providers

Integrate with Google Maps, Mapbox, or OpenStreetMap for geocoding.

geolocation.ts
import { BlocksClient } from '@23blocks/sdk';

const client = new BlocksClient({
  baseUrl: 'https://api.23blocks.com',
  appId: process.env.BLOCKS_APP_ID
});

// Store a new location
const store = await client.geo.createLocation({
  name: 'Downtown Coffee Shop',
  coordinates: {
    lat: 40.7128,
    lng: -74.0060
  },
  category: 'coffee',
  metadata: {
    hours: '7am-7pm',
    wifi: true
  }
});

// Find nearby locations
const nearby = await client.geo.findNearby({
  lat: 40.7128,
  lng: -74.0060,
  radius: 5000, // 5km
  category: 'coffee',
  limit: 10
});

// Create a geofence
const zone = await client.geo.createGeofence({
  name: 'Delivery Zone A',
  type: 'polygon',
  coordinates: [[...]],
  webhookUrl: 'https://api.yourapp.com/geofence'
});

Built for Any Use Case

From store locators to delivery optimization

Store Locators

Build store finders with distance-based search, directions, and store details.

  • Find nearest locations
  • Filter by services
  • Get directions

Delivery Apps

Track deliveries, optimize routes, and manage service coverage areas.

  • Route optimization
  • Service area validation
  • ETA calculations

Location Marketing

Send targeted promotions when users enter specific zones or visit locations.

  • Proximity triggers
  • Competitor zones
  • Dwell-time offers

Works with Your Favorite Maps

Integrate with leading mapping providers or use our built-in services. Bring your own API keys or use ours.

Google Maps
Mapbox
OpenStreetMap
HERE Maps

Platform Compatibility

Mobile SDKsiOS & Android
Web IntegrationJavaScript SDK
BackendREST API
Real-timeWebSocket Events

Start Building Location-Aware Apps

Get started free with generous limits. No credit card required.

Stay in the loop

Get product updates, engineering posts, and new block announcements delivered to your inbox.

No spam. Unsubscribe anytime. Privacy policy.