AI location intelligence
Pricing
from $100.00 / 1,000 location-analyses
AI location intelligence
Analyze multiple locations (via Google Maps URLs) for a given business type and generate a suitability score using OpenStreetMap (Overpass API) + OpenAI (GPT-4o)
Pricing
from $100.00 / 1,000 location-analyses
Rating
0.0
(0)
Developer
Aadhithya
Actor stats
0
Bookmarked
1
Total users
0
Monthly active users
9 hours ago
Last modified
Categories
Share
AI Location Intelligence Analyzer
A production-ready Apify Actor that analyzes multiple locations for business suitability using OpenStreetMap data and OpenAI GPT-4o.
π― What It Does
This Actor converts Google Maps URLs into actionable location intelligence by:
- Extracting coordinates from Google Maps URLs
- Using AI to select relevant OpenStreetMap data layers
- Fetching nearby points of interest (POIs) from OpenStreetMap
- Analyzing location suitability with GPT-4o
- Generating a comprehensive suitability score (1-10)
π Output
Each analyzed location returns:
- Score: Overall suitability (1-10)
- Footfall: Expected foot traffic (Low/Medium/High)
- Competition: Competitive density (Low/Medium/High)
- Accessibility: Location accessibility (Poor/Moderate/Good)
- Summary: AI-generated analysis explanation
- POI Counts: Breakdown of nearby points of interest
π Quick Start
1. Installation
$npm install
2. Local Testing
Create an input.json file:
{"locationUrls": ["https://maps.google.com/?q=12.9716,77.5946","https://www.google.com/maps/@40.7128,-74.0060,15z"],"businessDescription": "restaurant","radiusMeters": 1000,"openaiApiKey": "your_openai_api_key_here","model": "gpt-4o","testMode": false}
Run locally:
$npm start
3. Test Mode
To test without API calls:
{"businessDescription": "restaurant","testMode": true}
π Input Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
locationUrls | array | β | - | List of Google Maps URLs with coordinates |
businessDescription | string | β | - | Business type (e.g., "restaurant", "gym") |
radiusMeters | number | β | 1000 | Search radius in meters (100-10000) |
testMode | boolean | β | false | Run with mock data (no API calls) |
π Environment Variables
These must be set in Actor Settings (not in input):
| Variable | Required | Default | Description |
|---|---|---|---|
OPENAI_API_KEY | β | - | Your OpenAI API key (get at https://platform.openai.com/api-keys) |
OPENAI_MODEL | β | gpt-4o | OpenAI model (gpt-4o, gpt-4o-mini, gpt-3.5-turbo) |
π Supported URL Formats
https://maps.google.com/?q=12.9716,77.5946https://www.google.com/maps/@12.9716,77.5946,15zhttps://maps.google.com/?ll=12.9716,77.5946
π° Pricing
This Actor uses pay-per-event pricing:
- Event:
location-analysis - Charged: Only when analysis completes successfully
- Test mode: Free (no charges)
π‘οΈ Error Handling
- Failed coordinate parsing β Skips URL with warning
- Overpass API errors β Continues with next location
- OpenAI API errors β Falls back to rule-based analysis
- Never crashes the Actor
β‘ Performance
- Processes locations sequentially
- 2-second delay between requests (respects Overpass rate limits)
- 30-second timeout per Overpass call
- Typical runtime: 1-3 minutes for 5 locations
π§ Advanced Usage
API Integration
curl https://api.apify.com/v2/acts/YOUR_USERNAME~ai-location-intelligence-analyzer/runs \-d '{"locationUrls": ["https://maps.google.com/?q=12.9716,77.5946"],"businessDescription": "coffee shop","openaiApiKey": "sk-..."}' \-H 'Content-Type: application/json' \-H 'Authorization: Bearer YOUR_APIFY_TOKEN'
Dataset Output
Results are stored in Apify dataset with the following structure:
{"latitude": 12.9716,"longitude": 77.5946,"businessType": "restaurant","score": 8,"footfall": "High","competition": "Medium","accessibility": "Good","summary": "Excellent location with high foot traffic...","poiCounts": {"restaurants": 25,"schools": 8,"transport": 12}}
π¦ Tech Stack
- Runtime: Node.js 20
- Platform: Apify Actor
- AI: OpenAI GPT-4o
- Data: OpenStreetMap (Overpass API)
- Dependencies:
apify- Apify SDKopenai- OpenAI API client
π Use Cases
- πͺ Retail site selection
- π½οΈ Restaurant location analysis
- ποΈ Fitness center placement
- πΌ Coworking space scouting
- π₯ Healthcare facility planning
- πͺ Franchise expansion planning
π Examples
Example 1: Analyze Restaurant Locations
Input:
{"locationUrls": ["https://maps.google.com/?q=12.9716,77.5946","https://www.google.com/maps/@40.7128,-74.0060,15z"],"businessDescription": "restaurant","radiusMeters": 1000}
Environment Variables (set in Actor Settings):
OPENAI_API_KEY: your_openai_api_keyOPENAI_MODEL: gpt-4o (optional, default is gpt-4o)
Example 2: Test Mode (Free)
{"businessDescription": "coffee shop","testMode": true}
Example 3: Gym Location Analysis
Input:
{"locationUrls": ["https://maps.google.com/?q=34.0522,-118.2437"],"businessDescription": "gym","radiusMeters": 2000}
Environment Variables:
OPENAI_API_KEY: your_openai_api_keyOPENAI_MODEL: gpt-4o-mini (optional)
Example Output
{"latitude": 12.9716,"longitude": 77.5946,"businessType": "restaurant","score": 8,"footfall": "High","competition": "Medium","accessibility": "Good","summary": "Excellent location with high foot traffic and moderate competition. Good accessibility makes it ideal for restaurant business.","poiCounts": {"restaurants": 25,"schools": 8,"transport": 12}}
π License
ISC
π€ Support
For issues or feature requests, please open an issue in the repository.