Generate Meta Ads targeting circles
Generate Meta Ads targeting circles from boundary polygons.
Decomposes one or more statistical boundaries into a set of inclusion (positive) and exclusion (negative) circles that approximate the boundary shape for use with Meta Ads Manager custom location targeting.
Caching: Results are cached by boundary hash. Repeat requests return instantly from cache regardless of boundary size. Pass nocache=true to force recomputation.
Async for large boundaries: Boundaries with total area > 100 km² are automatically offloaded to a background worker. The endpoint returns 202 with a poll_url to check progress.
How it works:
- Fetches and unions the requested boundary geometries
- Analyses shape complexity (concavity ratio)
- Auto-sizes the circle radius based on total area and complexity
- Generates inclusion circles via grid sampling inside the boundary
- Generates exclusion circles for overshoot areas outside the boundary
- Ensures total circles stay within Meta's 200-location limit
Output formats:
- json (default): structured response with inclusion/exclusion arrays
- csv: downloadable CSV with type, latitude, longitude, radius, distance_unit columns
Limits:
- 1–20 boundary IDs per request
- Combined output capped at 200 circles (Meta's limit)
- Radius range: 1.0–80 km (0.62–50 miles)
Request
- Base URL: https://api.mapulus.com
- URL: https://api.mapulus.com/v1/data/targeting/meta
- Auth: HTTP bearer
Query parameters
Comma-separated boundary IDs to target (e.g. 'sa2:117011325,lga:17200'). Max 20.
Unit for output radius values.
Targeting mode: 'circles' (default) or 'postal' (ZIP/postcode inclusion + exclusion circles).
Output format: json or csv.
Skip cache and recompute (dev/debug only).
Response
Meta Ads targeting circles.
Changes
No recorded changes to this operation across all 1 revision of this API.