---
title: "Approximate search for nearest neighbors of a random query logo"
method: GET
path: "/ann/search"
tags: ["ANN Search"]
---

# Approximate search for nearest neighbors of a random query logo

`GET /ann/search`

Return ID and distance of each logo found, the number of neighbors returned and the ID of the query logo.

## Query parameters

- `count` integer
- `server_type` 'off' | 'obf' | 'opff' | 'opf' | 'off_pro'

## Response `200`

Response from ANN search

- LogoANNSearchResponse
  - `results` object[], required — Each item corresponds to a neighbor logo
    - `logo_id` integer, required — ID of the result logo
    - `distance` number, required — distance between the query logo and the result logo (closer to 0 means a more similar logo)
  - `count` integer, required — Number of returned results
  - `query_logo_id` integer, required — ID of the query logo

---

[API](https://skmtc.net/openfoodfacts/apis/api-reference.md) · [All operations](https://skmtc.net/openfoodfacts/apis/api-reference/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/openfoodfacts/api-reference/revisions/23d26c6d55e6/schema)
