DEV Community

Cover image for Building a Geo-Grid Rank Check: How Local Rank Tracking Works Under the Hood
GBP Local Ranker
GBP Local Ranker

Posted on

Building a Geo-Grid Rank Check: How Local Rank Tracking Works Under the Hood

If you have ever built a tool for a local business client, you have probably been asked a deceptively simple question: "Where do we rank on Google Maps?" The honest answer is "it depends where you are standing". Local results are personalised by location, so a single rank number hides most of the picture.

Geo-grid rank tracking is the technique most local SEO tools use to answer the question properly. This post walks through how it works conceptually, the maths behind building the grid, and the design decisions that matter if you build one yourself.

The core idea

Instead of checking a keyword once, you check it from many coordinates arranged in a grid around the business. Each point records the position of the target business in the local results for that keyword from that location. Plot the results on a map, colour the points by rank, and you get a heat map of visibility.

The output answers questions a single rank cannot:

  • How far does visibility extend from the business?
  • Which neighbourhoods does a competitor dominate?
  • Did a profile change improve coverage, or just the rank at the front door?

Generating the grid

A grid is defined by a centre point (usually the business's coordinates), a size (for example 7×7 points) and a spacing (for example 1 km between points). Because the Earth is not flat, converting kilometres into latitude and longitude offsets needs a little care. For the small distances involved, a simple approximation is fine:

import math

def build_grid(lat, lng, size=7, spacing_km=1.0):
    """Return a size x size list of (lat, lng) points centred on lat/lng."""
    half = size // 2
    km_per_deg_lat = 111.32
    km_per_deg_lng = 111.32 * math.cos(math.radians(lat))
    points = []
    for row in range(-half, half + 1):
        for col in range(-half, half + 1):
            d_lat = (row * spacing_km) / km_per_deg_lat
            d_lng = (col * spacing_km) / km_per_deg_lng
            points.append((round(lat + d_lat, 6), round(lng + d_lng, 6)))
    return points

grid = build_grid(40.7128, -74.0060, size=5, spacing_km=0.8)
print(len(grid))  # 25 points
Enter fullscreen mode Exit fullscreen mode

Note the cosine term: a degree of longitude shrinks as you move away from the equator, so the longitude step must grow to keep the spacing even.

Collecting results per point

For each point you need the local results as a searcher at that location would see them. How you obtain them matters. Scraping Google directly breaks its terms of service and is fragile, so production tools generally rely on licensed data providers or official APIs where they fit the use case. Whatever the source, store the raw result list for each point, not just the target's position. Competitor data is often the most valuable part.

A minimal record might look like this:

{
  "keyword": "emergency plumber",
  "point": [40.7128, -74.0060],
  "scanned_at": "2026-10-08T09:00:00Z",
  "target_rank": 4,
  "top_results": ["place_id_a", "place_id_b", "place_id_c"]
}
Enter fullscreen mode Exit fullscreen mode

Design decisions that matter

Grid size versus cost. A 9×9 grid is 81 lookups per keyword per scan. Multiply by keywords, locations and scan frequency and costs climb quickly. Most teams settle on a few priority keywords per location.

Spacing should match the business. A city-centre café might use 300 to 500 metre spacing; a rural roofing company might need several kilometres. If every point shows the same rank, your spacing is probably too small to be useful.

Consistency over time. Keep the centre, size, spacing and keywords identical between scans. Otherwise you are comparing different experiments.

Handle "not found". Most providers return a limited number of results. Record positions beyond that as "not in top N" rather than guessing.

Summarise carefully. A common summary is the average rank across all points, but averages hide shape. Pair it with the share of points where the business appears in the top three.

Presenting the results

Clients understand colour faster than tables. Green for top three, amber for four to ten, red for beyond. Show scans side by side over time, and annotate changes such as "primary category updated" so the history tells a story.

Build or buy?

Building a basic grid tracker is a fun weekend project. Running one reliably for many clients, with data costs, scheduling, history and reports, is a bigger commitment. Hosted platforms such as GBP Local Ranker package grid scans with profile audits and white-label reports, which may make more sense if local SEO is not your core product.

If you are a developer who simply needs a client's Business Profile sorted before handing over a new website, you can also hire a GBP expert on Fiverr to handle the profile side.

Wrapping up

Geo-grid tracking turns "where do we rank?" into a question you can answer honestly: here is where you are visible, here is where you are not, and here is how that changes over time. The maths is simple; the value comes from consistent measurement and careful interpretation.

Disclosure: I work with the GBP Local Ranker team.

Top comments (0)