Maps, Locations & Spatial Intelligence
Store locations, define geofences, calculate distances, and build location-aware applications with our powerful spatial API.
Everything you need to build location-aware applications
Store and manage points of interest with rich metadata, categories, and custom attributes.
Define virtual boundaries and trigger events when users enter or exit zones.
Calculate distances between points with support for different formulas and units.
Convert addresses to coordinates and coordinates to addresses with high accuracy.
Find locations within a radius or bounding box with powerful filtering options.
Calculate optimal routes between multiple waypoints with time and distance constraints.
Store locations, find nearby points, and trigger geofence events with just a few lines of code.
Full GeoJSON compatibility for points, polygons, and complex geometries.
Instant webhooks when entities enter, exit, or dwell in geofenced zones.
Integrate with Google Maps, Mapbox, or OpenStreetMap for geocoding.
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'
});From store locators to delivery optimization
Build store finders with distance-based search, directions, and store details.
Track deliveries, optimize routes, and manage service coverage areas.
Send targeted promotions when users enter specific zones or visit locations.
Integrate with leading mapping providers or use our built-in services. Bring your own API keys or use ours.
Get started free with generous limits. No credit card required.
Get product updates, engineering posts, and new block announcements delivered to your inbox.