Navigation
🚨

Critical Security Migration

The luigisbox.com domain is compromised. Immediate action is required.

1. Update API Base URLs

Replace the base URL for all API requests (Search, Recommendations, Analytics):

https://live.luigisbox.com
➡️ https://live.luigisbox.tech

2. Replace Frontend Script

The .com script is no longer safe. Replace it with the secure version immediately:

[OLD - Delete from site]
<script async src="https://scripts.luigisbox.com/LBX-123.js"></script>
[NEW - Secure Version]
<script async src="https://scripts.luigisbox.tech/LBX-123.js"></script>

3. Update CSP & Firewalls

If you use a Content Security Policy, whitelist the new domain to prevent the browser from blocking the connection.

script-src https://scripts.luigisbox.tech;
connect-src https://live.luigisbox.tech;
⚠️
Emergency Action: If you cannot update the code right now, remove the existing Luigi's Box script until the migration is complete to prevent unauthorized code execution.

Support: support@luigisbox.net MODIFIED: 12/17/2025

Autocomplete API V1

Legacy autocomplete endpoint for search-as-you-type functionality.

Overview

The V1 Autocomplete endpoint is the legacy API for search-as-you-type functionality. While still supported, we recommend using V2 for new integrations to access the latest features and performance improvements.

GET https://live.luigisbox.com/autocomplete

Request Parameters

Required parameters

Parameter Type Required Description
tracker_id string Your unique site identifier.
q string The search query.
type string Requested object types and counts.

Optional parameters

Parameter Type Description
user_id string User identifier for personalization.
f_type[] string Filters.
sort_type string Sorts results. Example: sort_item=price:asc.
prefer[] string Boosts specific items.
hit_fields string Fields to return.
context string Arbitrary context string for analytics.
ctx[] string Context parameters for model selection.

Request Headers

Consider sending request header of Accept-Encoding as well with values for supported encoding methods of your HTTP client, e.g. gzip or br, gzip, deflate for multiple supported methods. Encodings make the response from the JSON API considerably smaller and thus faster to transfer.

Example Request

curl "https://live.luigisbox.com/autocomplete?tracker_id=YOUR_TRACKER_ID&q=text&type=item:6" </span>
     -H "Accept-Encoding: gzip, deflate"

How to make a request

The following examples demonstrate how to send a request to the Autocomplete API using various languages.

To make a valid request:

  1. Endpoint: Use https://live.luigisbox.com/autocomplete.
  2. Parameters: Include your tracker_id, the user's search query q, and the desired type of results (e.g., item:6).
  3. Encoding: URL-encode your query parameters.
  4. Headers: Use Accept-Encoding: gzip for better performance.

For a detailed step-by-step integration guide, see Quickstart: Getting query suggestions via the Autocomplete API.

Example Code

# --- Ruby Example for GET /autocomplete ---
# Assumes 'faraday' gem is installed (gem install faraday)

require 'faraday' require 'json'

LUIGISBOX_HOST = 'https://live.luigisbox.com' ENDPOINT_PATH = '/autocomplete' TRACKER_ID = 'your_tracker_id'

connection = Faraday.new(url: LUIGISBOX_HOST) do |conn| conn.use FaradayMiddleware::Gzip end

response = connection.get(ENDPOINT_PATH) do |req| req.params['tracker_id'] = TRACKER_ID req.params['q'] = 'text' req.params['type'] = 'item:6' req.headers['Accept-Encoding'] = 'gzip, deflate' end

if response.success? puts "Autocomplete results: " + "#{JSON.pretty_generate(JSON.parse(response.body))}" else puts "Error: HTTP Status " + "#{response.status}, Response: #{response.body}" end

<?php
// PHP Example for GET /autocomplete
// Assumes Guzzle is installed: 
// composer require guzzlehttp/guzzle

require 'vendor/autoload.php';

use GuzzleHttp\Client;

$LUIGISBOX_HOST = 'https://live.luigisbox.com'; $ENDPOINT_PATH = '/autocomplete'; $TRACKER_ID = 'your_tracker_id';

$client = new GuzzleHttp\Client(); $response = $client->request( 'GET', "{$LUIGISBOX_HOST}{$ENDPOINT_PATH}", [ 'query' => [ 'tracker_id' => $TRACKER_ID, 'q' => 'text', 'type' => 'item:6' ], 'headers' => [ 'Accept-Encoding' => 'gzip, deflate' ] ] );

if($response->getStatusCode() == 200) { echo "Autocomplete results:" . PHP_EOL; echo json_encode(json_decode($response->getBody()), JSON_PRETTY_PRINT); } else { echo "Error: HTTP Status " . $response->getStatusCode() . "\nResponse: " . $response->getBody(); }

const axios = require('axios');

// V1 Autocomplete Request const LUIGISBOX_HOST = 'https://live.luigisbox.com'; const ENDPOINT_PATH = '/autocomplete'; const TRACKER_ID = 'your_tracker_id';

axios.get(LUIGISBOX_HOST + ENDPOINT_PATH, { params: { tracker_id: TRACKER_ID, q: 'text', type: 'item:6' }, headers: { 'Accept-Encoding': 'gzip, deflate' } }) .then(response => { console.log("Autocomplete results:", JSON.stringify(response.data, null, 2)); }) .catch(error => { if (error.response) { console.error("Error: HTTP Status " + error.response.status + ", Response: " + JSON.stringify(error.response.data)); } else { console.error("Exception:", error.message); } });

Response Structure

The response contains the list of suggestions.

Response Attributes

Field Type Description
exact_match_hits_count integer Count of exact matches.
partial_match_hits_count integer Count of partial matches.
hits array The list of suggestion objects.
suggested_url string Redirect URL if a rule triggers one.

Example Response

{
    "exact_match_hits_count": 6,
    "partial_match_hits_count": 0,
    "partial_match_terms": [],
    "hits": [
        {
            "url": "http://www.e-shop.com/products/123456",
            "attributes": {
                "image_link": "http://www.e-shop.com/assets/imgs/products/123456.jpg",
                "title": "Product X",
                "price": "5.52 EUR"
            },
            "type": "item",
            "identity": "123456"
        }
    ],
    "suggested_url": "http://www.e-shop.com/redirect"
}

Error Handling

Standard HTTP status codes.

HTTP Status Description
400 Bad Request missing arguments or malformed request.

Example Error

{
  "type": "error",
  "message": "Invalid request"
}