Home > widget-integration > InstantSearchAPI > getRedirects
InstantSearchAPI.getRedirects() method
Fetch redirect mappings for search terms.
**Legacy**: getRedirects(context, terms) **New**: getRedirects(terms?) with typed response
Features migrated from legacy: - Multiple terms support - B2B support - Locale params - Proper response transformation
Signature:
getRedirects(terms?: string[]): Promise<Record<string, string>>;
Parameters
|
Parameter |
Type |
Description |
|---|---|---|
|
terms |
string[] |
(Optional) Optional array of search terms to check |
Returns:
Promise<Record<string, string>>
Map of search terms to redirect URLs