The getItems function is called whenever the input changes for autocomplete. You can use the hook "beforeAutocompleteSources" to edit the sources as noted here. However this will unbundle the queries that are sent, resulting in multiple requests being sent. A workaround for this is to use this hook before the items are sent overall, as in this snippet.
algolia.registerHook('afterAutocompleteStart', (autocompleteInstance) => {
const dropdown = autocompleteInstance.data('aaAutocomplete').dropdown;
const originalUpdate = dropdown.update;
let timeout;
dropdown.update = (query) => {
clearTimeout(timeout);
timeout = setTimeout(() => originalUpdate.call(dropdown, query), 1000);
};
return autocompleteInstance;
});