Worked Examples

Copy-paste API workflows for common tasks. Each example shows a complete multi-step workflow with cURL commands and recommended fieldmasks.

Example 1: Competitive Analysis

Run a Scan

curl -X POST "https://api.localfalcon.com/v2/run-scan/" \
  -d "api_key=YOUR_API_KEY" \
  -d "placeId=ChIJ..." \
  -d "keyword=coffee shop" \
  -d "lat=30.2672" \
  -d "lng=-97.7431" \
  -d "gridSize=7" \
  -d "radius=3" \
  -d "measurement=mi" \
  -d "platform=google"

Poll for the Completed Report

Wait 30–60 seconds, then list reports filtered by your Place ID.

curl -X POST "https://api.localfalcon.com/v1/reports/" \
  -d "api_key=YOUR_API_KEY" \
  -d "placeId=ChIJ..." \
  -d "fieldmask=report_key,date,keyword,location.name,arp,atrp,solv"

Get the Competitor Report

List competitor reports for the same Place ID, then fetch the full report by key.

curl -X POST "https://api.localfalcon.com/v1/competitor-reports/" \
  -d "api_key=YOUR_API_KEY" \
  -d "placeId=ChIJ..." \
  -d "fieldmask=report_key,date,keyword,location.name,grid_size,platform"
curl -X POST "https://api.localfalcon.com/v1/competitor-reports/YOUR_REPORT_KEY/" \
  -d "api_key=YOUR_API_KEY" \
  -d "fieldmask=date,keyword,grid_size,radius,businesses.*.name,businesses.*.place_id,businesses.*.arp,businesses.*.atrp,businesses.*.solv,businesses.*.reviews,businesses.*.rating,businesses.*.lat,businesses.*.lng"

Analyze the Results

The response ranks all competitors by SoLV. Compare review counts and ratings to identify why top-ranked businesses outperform you.

Example 2: Multi-Location Campaign

Verify Locations Are Saved

All locations must already exist in your account. Confirm with a list call.

curl -X POST "https://api.localfalcon.com/v1/locations/" \
  -d "api_key=YOUR_API_KEY"

Create the Campaign

Schedule weekly scans for 3 locations across 2 keywords.

curl -X POST "https://api.localfalcon.com/v2/campaigns/create" \
  -d "api_key=YOUR_API_KEY" \
  -d "name=Weekly Monitoring" \
  -d "placeId=ChIJ...1,ChIJ...2,ChIJ...3" \
  -d "keyword=plumber,emergency plumber" \
  -d "gridSize=7" \
  -d "radius=5" \
  -d "measurement=mi" \
  -d "frequency=weekly" \
  -d "startDate=03/01/2026" \
  -d "startTime=9:00 AM"

Retrieve Campaign Results

After the campaign runs, pull the consolidated report.

curl -X POST "https://api.localfalcon.com/v1/campaigns/" \
  -d "api_key=YOUR_API_KEY" \
  -d "fieldmask=report_key,name,status,locations,keywords,arp,atrp,solv,arp_move,atrp_move,solv_move,frequency,last_run,next_run"

Compare Location Performance

Compare arp_move and solv_move across locations to identify which location is gaining or losing visibility.

Example 3: AI Visibility Audit

Run 3 Scans Across Platforms

Submit the same keyword on Google, ChatGPT, and Gemini.

# Scan 1: Google Maps
curl -X POST "https://api.localfalcon.com/v2/run-scan/" \
  -d "api_key=YOUR_API_KEY" \
  -d "placeId=ChIJ..." \
  -d "keyword=best coffee shop" \
  -d "lat=30.2672" \
  -d "lng=-97.7431" \
  -d "gridSize=7" \
  -d "radius=3" \
  -d "measurement=mi" \
  -d "platform=google"
# Scan 2: ChatGPT
curl -X POST "https://api.localfalcon.com/v2/run-scan/" \
  -d "api_key=YOUR_API_KEY" \
  -d "placeId=ChIJ..." \
  -d "keyword=best coffee shop" \
  -d "lat=30.2672" \
  -d "lng=-97.7431" \
  -d "gridSize=7" \
  -d "radius=3" \
  -d "measurement=mi" \
  -d "platform=chatgpt"
# Scan 3: Gemini
curl -X POST "https://api.localfalcon.com/v2/run-scan/" \
  -d "api_key=YOUR_API_KEY" \
  -d "placeId=ChIJ..." \
  -d "keyword=best coffee shop" \
  -d "lat=30.2672" \
  -d "lng=-97.7431" \
  -d "gridSize=7" \
  -d "radius=3" \
  -d "measurement=mi" \
  -d "platform=gemini"

Retrieve All 3 Reports

List reports filtered by Place ID. Each platform's scan produces its own report.

curl -X POST "https://api.localfalcon.com/v1/reports/" \
  -d "api_key=YOUR_API_KEY" \
  -d "placeId=ChIJ..." \
  -d "fieldmask=report_key,date,keyword,location.name,arp,atrp,solv,platform"

Compare Results

Google scans return SoLV; AI platform scans return SAIV (displayed in the solv field). Compare visibility across traditional and AI search to find gaps.

Non-Google platforms run in eager mode — the API returns immediately. Poll POST /v1/reports/ for each platform's results separately.

Next Steps