Google Maps Traffic Scraper avatar

Google Maps Traffic Scraper

Pricing

from $10.00 / 1,000 tile fetcheds

Go to Apify Store
Google Maps Traffic Scraper

Google Maps Traffic Scraper

Fetch real-time and historical traffic data from Google Maps as GeoJSON. Returns road-level speed levels, congestion status, and road segments for any coordinate and zoom level.

Pricing

from $10.00 / 1,000 tile fetcheds

Rating

0.0

(0)

Developer

Romy

Romy

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

5 days ago

Last modified

Share

Google Traffic Scraper

Fetch real-time traffic data from Google Maps as GeoJSON — road-level speed levels, congestion status, and road segments for any coordinate and zoom level.

Powered by Google Maps internal tile API. Data is returned as a GeoJSON FeatureCollection with LineString geometries, ready to plug into Mapbox, Leaflet, QGIS, or any GIS tool.


Input

{
"lat": "-6.219320790773214",
"lon": "106.81002294222947",
"zoom": 17,
"radius": 2,
"seconds": 391039
}
FieldTypeRequiredDescription
latstringLatitude of the center point
lonstringLongitude of the center point
zoomintMap zoom level (10–20). Higher = more detail
radiusintTile radius around center. Total tiles = (2r+1)²
secondsintSeconds into week (see below). -1 = current time

zoom — choosing the right level

ZoomCoverage per tileBest for
10–12City-wideHeatmap, macro overview
13–15District / kawasanArea analysis
16–17Street levelPer-road congestion ✅ recommended
18–20Lane levelHigh-detail, niche use cases

Recommended: zoom: 17 for street-level detail with reasonable tile count.


radius — area coverage

Radius controls how many tiles are fetched around the center point.

RadiusTiles fetchedApprox. area (zoom 17)
01~300m × 300m
19~900m × 900m
225~1.5km × 1.5km ✅ recommended
349~2.2km × 2.2km
5121~3.7km × 3.7km

Higher radius = more HTTP requests = higher cost and longer run time.


seconds — historical traffic

Pass -1 to get current live traffic.

To fetch traffic for a specific time in the week, convert a datetime to seconds-into-week (Sunday 00:00 UTC = 0):

from datetime import datetime, timezone
def datetime_to_seconds_into_week(dt: datetime) -> int:
"""Convert datetime (aware) → seconds_into_week (Sunday 00:00 UTC = 0)."""
dt_utc = dt.astimezone(timezone.utc)
day_utc = (dt_utc.weekday() + 1) % 7 # Sun=0, Mon=1, ..., Sat=6
return (day_utc * 86400
+ dt_utc.hour * 3600
+ dt_utc.minute * 60
+ dt_utc.second)
# Example: Monday 08:00 WIB (UTC+7) → UTC = Monday 01:00
dt = datetime(2024, 1, 8, 8, 0, 0, tzinfo=timezone.utc) # already UTC here
seconds = datetime_to_seconds_into_week(dt)
# → 86400 + 3600 = 90000 (Monday 01:00 UTC)

Note: Google Maps traffic data is based on historical weekly patterns. The seconds value represents a point in the weekly cycle, not an absolute timestamp — so the same value will return the same traffic pattern every week.


Output

Returns a GeoJSON FeatureCollection:

Screenshot-2026-02-23-005343 Screenshot-2026-02-23-005418

{
"type": "FeatureCollection",
"metadata": {
"center_lat": -6.219320790773214,
"center_lon": 106.81002294222947,
"zoom": 17,
"tile_radius": 2,
"tiles_fetched": 25,
"total_features": 487,
"seconds_in_week": 391039,
"speed_summary": {
"Free Flow": 210,
"Slow Traffic": 180,
"Heavy Congestion": 97
}
},
"features": [
{
"type": "Feature",
"geometry": {
"type": "LineString",
"coordinates": [
[106.8100123, -6.2193456],
[106.8101234, -6.2194567]
]
},
"properties": {
"speed_level": 2,
"speed_label": "Slow Traffic",
"color": "#FF8C00",
"road_class": 32,
"stroke_weight": 5,
"seconds_in_week": 391039
}
}
]
}

Speed levels

speed_levelLabelColor
1Free Flow#2DB82D 🟢
2Slow Traffic#FF8C00 🟠
3Moderate Congestion#FF4500 🔴
4Heavy Congestion#CC0000 🔴
6Road Closed#000000

Pricing

This Actor uses Pay Per Event billing — you only pay for what you use.

EventPriceDescription
apify-actor-start$0.00005Per run start
tile-fetched$0.010Per tile fetched from Google

Cost is fully predictable before you run — it depends only on the radius you choose:

RadiusTilesCost per request
01~$0.01
19~$0.09
225~$0.25 ✅
349~$0.49
5121~$1.21

No surprise charges — tile count is always (2 × radius + 1)², known upfront.


Use cases

  • Logistics & delivery — route optimization based on real congestion data
  • Urban planning — traffic pattern analysis by time of day / day of week
  • Real estate — congestion scoring for property valuation
  • Retail analytics — foot traffic and accessibility scoring near stores
  • Insurance — road risk scoring by location and time

Notes

  • Data reflects Google Maps traffic patterns and is updated periodically by Google.
  • Historical data (seconds parameter) is based on weekly recurring patterns, not archived snapshots.
  • Higher zoom levels and larger radius values increase both cost and run time proportionally.