> ## Documentation Index
> Fetch the complete documentation index at: https://algolia.com/llms.txt
> Use this file to discover all available pages before exploring further.

# minimumAroundRadius

> Minimum search radius in meter for a search around a central coordinate.

export const Setting = ({type, default: defaultValue, defaultNote, scope, min, max, formerly}) => {
  const renderedDefault = defaultValue === '' ? '""' : defaultValue;
  const renderedNote = defaultNote ? `(${defaultNote})` : '';
  return <ul>
      <li><strong>Type:</strong> <code>{type}</code></li>
      <li><strong>Default:</strong> <code>{renderedDefault}</code>{renderedNote}</li>
      {min && <li><strong>Min:</strong> <code>{min}</code></li>}
      {max && <li><strong>Max:</strong> <code>{max}</code></li>}
      <li><strong>Scope:</strong> <a href="/doc/api-reference/api-parameters"><code>{scope}</code></a></li>
      {formerly && <li>
          <strong>Deprecated name:</strong> <code>{formerly}</code>
        </li>}
    </ul>;
};

<Setting type="integer" default="null" scope="search" />

The `minimumAroundRadius` parameter sets the smallest allowable radius (in meters)
when Algolia automatically computes the search area in a radial search.

When a radius is automatically generated, the area of the circle might be too small.
This setting lets you increase the size of the circle, thus ensuring sufficient coverage.

## Usage

* Only used when searching around a central location with
  [`aroundLatLng`](/doc/api-reference/api-parameters/aroundLatLng) or
  [`aroundLatLngViaIP`](/doc/api-reference/api-parameters/aroundLatLngViaIP)

* Ignored if [`aroundRadius`](/doc/api-reference/api-parameters/aroundRadius) is explicitly set.

## Example

<AccordionGroup>
  <Accordion title="Current API clients" defaultOpen="true">
    <CodeGroup>
      ```cs C# theme={"system"}
      var response = await client.SearchSingleIndexAsync<Hit>(
        "INDEX_NAME",
        new SearchParams(new SearchParamsObject { Query = "query", MinimumAroundRadius = 1000 })
      );
      ```

      ```dart Dart theme={"system"}
      final response = await client.searchSingleIndex(
        indexName: "INDEX_NAME",
        searchParams: SearchParamsObject(
          query: "query",
          minimumAroundRadius: 1000,
        ),
      );
      ```

      ```go Go theme={"system"}
      response, err := client.SearchSingleIndex(client.NewApiSearchSingleIndexRequest(
        "INDEX_NAME").WithSearchParams(search.SearchParamsObjectAsSearchParams(
        search.NewEmptySearchParamsObject().SetQuery("query").SetMinimumAroundRadius(1000))))
      if err != nil {
        // handle the eventual error
        panic(err)
      }
      ```

      ```java Java theme={"system"}
      SearchResponse response = client.searchSingleIndex(
        "INDEX_NAME",
        new SearchParamsObject().setQuery("query").setMinimumAroundRadius(1000),
        Hit.class
      );
      ```

      ```js JavaScript theme={"system"}
      const response = await client.searchSingleIndex({
        indexName: 'indexName',
        searchParams: { query: 'query', minimumAroundRadius: 1000 },
      });
      ```

      ```kotlin Kotlin theme={"system"}
      var response =
        client.searchSingleIndex(
          indexName = "INDEX_NAME",
          searchParams = SearchParamsObject(query = "query", minimumAroundRadius = 1000),
        )
      ```

      ```php PHP theme={"system"}
      $response = $client->searchSingleIndex(
          'INDEX_NAME',
          ['query' => 'query',
              'minimumAroundRadius' => 1000,
          ],
      );
      ```

      ```python Python theme={"system"}
      response = client.search_single_index(
          index_name="INDEX_NAME",
          search_params={
              "query": "query",
              "minimumAroundRadius": 1000,
          },
      )
      ```

      ```ruby Ruby theme={"system"}
      response = client.search_single_index(
        "INDEX_NAME",
        Algolia::Search::SearchParamsObject.new(query: "query", minimum_around_radius: 1000)
      )
      ```

      ```scala Scala theme={"system"}
      val response = Await.result(
        client.searchSingleIndex(
          indexName = "INDEX_NAME",
          searchParams = Some(
            SearchParamsObject(
              query = Some("query"),
              minimumAroundRadius = Some(1000)
            )
          )
        ),
        Duration(100, "sec")
      )
      ```

      ```swift Swift theme={"system"}
      let response: SearchResponse<Hit> = try await client.searchSingleIndex(
          indexName: "INDEX_NAME",
          searchParams: SearchSearchParams.searchSearchParamsObject(SearchSearchParamsObject(
              query: "query",
              minimumAroundRadius: 1000
          ))
      )
      ```
    </CodeGroup>
  </Accordion>

  <Accordion title="Legacy API clients">
    <CodeGroup>
      ```cs C# theme={"system"}
      index.Search(new Query("query")
      {
          MinimumAroundRadius = 1000
      });
      ```

      ```go Go theme={"system"}
      res, err := index.Search(
      	"query",
      	opt.MinimumAroundRadius(1000), // 1km
      )
      ```

      ```java Java theme={"system"}
      index.search(
        new Query("query")
          .setMinimumAroundRadius(1000) // 1 km
      );
      ```

      ```js JavaScript theme={"system"}
      index
        .search("query", {
          minimumAroundRadius: 1000, // 1km
        })
        .then(({ hits }) => {
          console.log(hits);
        });
      ```

      ```kotlin Kotlin theme={"system"}
      val query = query("query") {
          minimumAroundRadius = 1000 // 1km
      }

      index.search(query)
      ```

      ```php PHP theme={"system"}
      $results = $index->search('query', [
        'minimumAroundRadius' => 1000 // 1km
      ]);
      ```

      ```python Python theme={"system"}
      results = index.search('query', {
          'minimumAroundRadius' => 1000 # 1km
      })
      ```

      ```ruby Ruby theme={"system"}
      results = index.search(
        "query",
        {
          # 1km
          minimumAroundRadius: 1000
        }
      )
      ```

      ```scala Scala theme={"system"}
      client.execute {
        search into "myIndex" query Query(
          query = Some("query"),
          minimumAroundRadius = Some(1000) //1 km
        )
      }
      ```

      ```swift Swift theme={"system"}
      let query = Query("query")
        .set(\.minimumAroundRadius, to: 1000) // 1km

      index.search(query: query) { result in
        if case .success(let response) = result {
          print("Response: \(response)")
        }
      }
      ```
    </CodeGroup>
  </Accordion>
</AccordionGroup>
