---
title: Geo search
description: Filter search results based on geographical distance from the user's location.
slug: search/guides/geo-search
docKind: guide
hub: search
---

Filter search results based on geographical distance from the user's current location.

## Filter by distance

To restrict results to a specific radius, use the `geo_range` filter in the `f[]` parameter.

**Key requirements:**

1. **Context**: You must provide the user's location using the `context[geo_location]` parameter (e.g., `49.0448,18.5530`).
2. **Indexing**: Your product data must contain a field with coordinates (default: `geo_location`).

See [context[geo_location]](/search/api/v2/search/) in the API reference.

**Example request:** `f[]=geo_range:|50km&context[geo_location]=49.0448,18.5530`

## Filter syntax

The `geo_range` filter value follows the pattern `lower_range|upper_range`. Use numbers followed by `km`. You can leave one side empty for an open interval.

| Pattern | Meaning | Example |
| :--- | :--- | :--- |
| `\|Xkm` | Less than X km | `\|50km` |
| `Xkm\|` | More than X km | `10km\|` |
| `Xkm\|Ykm` | Between X and Y km | `10km\|50km` |
