Skip to main content
Radar’s Context API provides rich location context for any geographic coordinate, including nearby places, active geofences, country, state, DMA, and postal code information.

Overview

The Context API returns location information without requiring device or user identifiers, making it ideal for privacy-conscious applications and server-side integrations.

What’s Included

Geofences

All geofences containing the location

Place

The place at the location, if any

Regions

Country, state, DMA, and postal code

No Tracking

No device or user identifiers sent

Get Context

Context for Current Location

Get context for the device’s current location:

Context for Specific Location

Get context for any geographic coordinate:

Context Properties

The RadarContext object provides comprehensive location information:

Geofences

An array of all geofences that contain the location:

Place

The place at the location, if any:

Country

Country information for the location:

State

State or province information:

DMA (Designated Market Area)

Media market information:

Postal Code

Postal code or ZIP code information:

Use Cases

1

Geofence Detection

Detect when a user enters specific geofences without continuous tracking:
2

Location Verification

Verify a user’s location for compliance or fraud prevention:
3

Place Detection

Determine if a user is at a specific type of location:
4

Regional Customization

Customize app experience based on location:

Privacy Considerations

The Context API is designed with privacy in mind:
No User Tracking: Context requests do not send device identifiers, user IDs, or other personally identifiable information to the server.
Use the Context API instead of full tracking when you only need occasional location context without continuous monitoring.

Comparison with Track API

Use the Context API for one-time location queries. Use the Track API for continuous location monitoring and event generation.

Error Handling

Handle errors gracefully with status codes:

Best Practices

1

Check for nil

Always check if context properties are nil before using them:
2

Handle empty arrays

Geofences array may be empty if the location isn’t in any geofences:
3

Respect rate limits

The Context API is subject to rate limits. Don’t call it too frequently:

Learn More

Context API

Explore the complete Context API reference

Geofences

Learn about geofencing capabilities

Places

Understand place search and detection

Regions

Explore region data model