Skip to main content

Maps API

Extract comprehensive local business data, reviews, and geographic information from Google Maps.

Basic Maps Request

Endpoint

POST https://api.nimbleway.com/v1/maps

Search Local Businesses

curl -X POST "https://api.nimbleway.com/v1/maps" \
  -H "Authorization: Bearer your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "query": "restaurants near me",
    "location": "New York, NY"
  }'

Response

{
  "status": "success",
  "query": "restaurants near me",
  "location": "New York, NY",
  "results": [
    {
      "name": "Joe's Pizza",
      "address": "123 Main St, New York, NY 10001",
      "phone": "+1 (555) 123-4567",
      "website": "https://joespizza.com",
      "rating": 4.5,
      "reviews_count": 1247,
      "price_level": "$$",
      "category": "Pizza Restaurant",
      "hours": {
        "monday": "11:00 AM - 10:00 PM",
        "tuesday": "11:00 AM - 10:00 PM",
        "wednesday": "11:00 AM - 10:00 PM"
      },
      "coordinates": {
        "lat": 40.7589,
        "lng": -73.9851
      },
      "place_id": "ChIJd8BlQ2BZwokRAFQXSW2xTsQ"
    }
  ]
}

Request Types

Find businesses by category and location:
{
  "query": "coffee shops",
  "location": "San Francisco, CA",
  "radius": "5km",
  "limit": 20
}

Place Details

Get detailed information about a specific place:
{
  "place_id": "ChIJd8BlQ2BZwokRAFQXSW2xTsQ",
  "include_reviews": true,
  "include_photos": true
}
Search by geographic coordinates:
{
  "query": "gas stations",
  "coordinates": {
    "lat": 37.7749,
    "lng": -122.4194
  },
  "radius": "2km"
}

Parameters

Required Parameters

ParameterTypeDescription
querystringSearch query (e.g., “restaurants”, “hotels”)
locationstringLocation name or address

Optional Parameters

ParameterTypeDefaultDescription
limitinteger20Maximum number of results
radiusstring5kmSearch radius (e.g., “1km”, “5mi”)
min_ratingfloat0Minimum rating filter (0-5)
price_levelstringanyPrice filter: $, $$, $$$, $$$$
open_nowbooleanfalseOnly show currently open businesses
include_reviewsbooleanfalseInclude customer reviews
include_photosbooleanfalseInclude business photos
languagestringenResponse language

Response Data

Business Information

{
  "name": "Business Name",
  "address": "Full address",
  "phone": "+1 (555) 123-4567",
  "website": "https://business.com",
  "email": "[email protected]",
  "category": "Restaurant",
  "subcategory": "Italian Restaurant",
  "rating": 4.3,
  "reviews_count": 856,
  "price_level": "$$"
}

Operating Hours

{
  "hours": {
    "monday": "9:00 AM - 9:00 PM",
    "tuesday": "9:00 AM - 9:00 PM", 
    "wednesday": "9:00 AM - 9:00 PM",
    "thursday": "9:00 AM - 9:00 PM",
    "friday": "9:00 AM - 10:00 PM",
    "saturday": "10:00 AM - 10:00 PM",
    "sunday": "10:00 AM - 8:00 PM"
  },
  "current_status": "open",
  "next_status_change": "closes at 9:00 PM"
}

Reviews and Ratings

{
  "reviews": [
    {
      "author": "John D.",
      "rating": 5,
      "date": "2024-01-15",
      "text": "Great food and excellent service!",
      "helpful_votes": 12
    }
  ],
  "rating_breakdown": {
    "5_star": 45,
    "4_star": 30,
    "3_star": 15,
    "2_star": 7,
    "1_star": 3
  }
}

Photos and Media

{
  "photos": [
    {
      "url": "https://maps.gstatic.com/photo123.jpg",
      "width": 1200,
      "height": 800,
      "type": "exterior"
    },
    {
      "url": "https://maps.gstatic.com/photo456.jpg", 
      "width": 800,
      "height": 600,
      "type": "interior"
    }
  ]
}

Use Cases

Local Business Directory

Build comprehensive business directories:
{
  "query": "restaurants",
  "location": "Downtown Seattle",
  "limit": 100,
  "include_reviews": true,
  "min_rating": 4.0
}

Competitor Analysis

Research competitors in your area:
{
  "query": "your business category",
  "location": "your city",
  "radius": "10km",
  "include_reviews": true
}

Market Research

Analyze market density and opportunities:
{
  "query": "coffee shops",
  "location": "potential expansion city",
  "limit": 50,
  "price_level": "$$"
}

Review Monitoring

Track reviews for your business:
{
  "place_id": "your_business_place_id",
  "include_reviews": true,
  "review_limit": 100
}

Advanced Features

Search multiple locations in one request:
{
  "query": "hotels",
  "locations": [
    "New York, NY",
    "Los Angeles, CA", 
    "Chicago, IL"
  ],
  "limit": 10
}

Category Filtering

Filter by specific business categories:
{
  "query": "food",
  "location": "Miami, FL",
  "categories": ["restaurant", "cafe", "bakery"],
  "exclude_categories": ["fast_food"]
}
Find trending or popular places:
{
  "query": "trending restaurants",
  "location": "Austin, TX",
  "sort_by": "popularity",
  "time_filter": "week"
}

SDK Examples

Node.js

const results = await client.maps({
  query: 'coffee shops',
  location: 'Portland, OR',
  limit: 25,
  include_reviews: true,
  min_rating: 4.0
});

results.forEach(place => {
  console.log(`${place.name} - ${place.rating}⭐`);
});

Python

results = client.maps({
    'query': 'coffee shops',
    'location': 'Portland, OR',
    'limit': 25,
    'include_reviews': True,
    'min_rating': 4.0
})

for place in results:
    print(f"{place['name']} - {place['rating']}⭐")

Rate Limits

PlanRequests/HourData Points/Request
Free5010
Starter50025
Professional5,000100
EnterpriseCustomCustom

Pricing

  • Basic search: $0.002 per result
  • With reviews: $0.005 per result
  • With photos: $0.008 per result
  • Place details: $0.001 per request

Error Handling

Location Not Found

{
  "status": "error",
  "error": "LOCATION_NOT_FOUND",
  "message": "Could not find location: 'Invalid City Name'"
}

No Results

{
  "status": "success",
  "results": [],
  "message": "No businesses found matching criteria"
}

Rate Limit Exceeded

{
  "status": "error",
  "error": "RATE_LIMIT_EXCEEDED",
  "message": "Maps API rate limit exceeded",
  "retry_after": 3600
}

Best Practices

Query Optimization

  • Use specific business categories for better results
  • Include location context for accurate targeting
  • Combine filters to narrow down results

Data Management

  • Cache frequently accessed business data
  • Update business information regularly
  • Handle closed/moved businesses gracefully

Cost Optimization

  • Request only needed data fields
  • Use appropriate result limits
  • Implement smart caching strategies

Compliance

  • Google Maps Terms: Respect Google’s terms of service
  • Rate Limiting: Stay within API limits
  • Data Usage: Follow data usage guidelines
  • Attribution: Provide proper attribution when required

Next Steps