---
title: "Trovaprezzi API: Autocomplete | Perceptlayer"
description: "Autocomplete from Trovaprezzi as JSON. 1 credit per successful call."
url: https://perceptlayer.com/apis/trovaprezzi/autocomplete
---

[APIs](https://perceptlayer.com/apis) / [Trovaprezzi](https://perceptlayer.com/apis/trovaprezzi) / Autocomplete

# Trovaprezzi: Autocomplete

Autocomplete from Trovaprezzi as JSON. 1 credit per successful call.

GET `/v1/trovaprezzi/autocomplete`

## Parameters

Send parameters in the query string.

| Parameter | Type | Required | Allowed values |
| --- | --- | --- | --- |
| `query` | string | Required | Up to 200 characters |
| `category_id` | integer | Optional | Any |

## Example request

Trovaprezzi

GET /v1/trovaprezzi/autocomplete?query=airtag 

```
{
  "success": true,
  "query": "airtag",
  "category_id": 71,
  "terms": [
    {
      "id": "1",
      "type": "autocomplete-product-items",
      "name": "Apple AirTag",
      "puid": "apple airtag",
      "path": "/accessori-cellulari/prezzi-scheda-prodotto/apple_airtag",
      "is_variant": false,
      "image": "https://immagini.trovaprezzi.it/prodotti/apple_airtag.jpg",
      "price_label": "da 21,90 €",
      "price": 21.9
    },
    {
      "id": "2",
      "type": "autocomplete-product-items",
      "name": "Belkin Secure Holder con anello portachiavi per AirTag",
      "puid": "belkin secure holder con anello portachiavi per airtag",
      "path": "/accessori-cellulari/prezzi-scheda-prodotto/belkin_secure_holder_con_anello_portachiavi_per_airtag",
      "is_variant": false,
      "image": "https://immagini.trovaprezzi.it/prodotti/belkin_secure_holder_con_anello_portachiavi_per_airtag.jpg",
      "price_label": "da 7,99 €",
      "price": 7.99
    },
    {
      "id": "3",
      "type": "autocomplete-product-items",
      "name": "Belkin Secure Holder con laccetto per AirTag",
      "puid": "belkin secure holder con laccetto per airtag",
      "path": "/accessori-cellulari/prezzi-scheda-prodotto/belkin_secure_holder_con_laccetto_per_airtag",
      "is_variant": false,
      "image": "https://immagini.trovaprezzi.it/prodotti/belkin_secure_holder_con_laccetto_per_airtag.jpg",
      "price_label": "da 11,10 €",
      "price": 11.1
    }
  ],
  "meta": {
    "duration_ms": 887,
    "attempts": 2,
    "bytes": 6481,
    "request_id": "req_6a9c925ee4ff480694ead70c12d81418",
    "credits_charged": 1,
    "credits_remaining": 4851
  }
}
```

200 OK JSON X-Credits-Used: 1

Recorded from our API and shortened.

[Run this endpoint in the playground](https://perceptlayer.com/apis/trovaprezzi?try=autocomplete#playground) with your own parameters. 1 credit per successful call; failed calls are free.

## Response fields

Each item in `terms` has these 9 fields, read from a recorded call. The recording leaves out fields that were empty, so a live call can return more.

| Field | Type |
| --- | --- |
| `id` | string |
| `type` | string |
| `name` | string |
| `puid` | string |
| `path` | string |
| `is_variant` | boolean |
| `image` | url |
| `price_label` | string |
| `price` | number |
