Targeting

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:

  1. Fetches and unions the requested boundary geometries
  2. Analyses shape complexity (concavity ratio)
  3. Auto-sizes the circle radius based on total area and complexity
  4. Generates inclusion circles via grid sampling inside the boundary
  5. Generates exclusion circles for overshoot areas outside the boundary
  6. 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)
get/v1/data/targeting/meta

Request

  • Base URL: https://api.mapulus.com
  • URL: https://api.mapulus.com/v1/data/targeting/meta
  • Auth: HTTP bearer

Query parameters

boundary_idstring required

Comma-separated boundary IDs to target (e.g. 'sa2:117011325,lga:17200'). Max 20.

radius_unit'kilometer' | 'mile'

Unit for output radius values.

mode'circles' | 'postal'

Targeting mode: 'circles' (default) or 'postal' (ZIP/postcode inclusion + exclusion circles).

format'json' | 'csv'

Output format: json or csv.

nocacheboolean

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.