Skip to main content

Search Suggestions

Retrieves related search suggestions for a given term from Giphy. This node provides alternative or related search terms that can help users refine their searches or discover related content.

Common Properties

  • Name - The custom name of the node.
  • Color - The custom color of the node.
  • Delay Before (sec) - Waits in seconds before executing the node.
  • Delay After (sec) - Waits in seconds after executing node.
  • Continue On Error - Automation will continue regardless of any error. The default value is false.
info

If the ContinueOnError property is true, no error is caught when the project is executed, even if a Catch node is used.

Inputs

  • Term - Search term to get related suggestions for. This is a required field and cannot be empty. Example: "cat", "happy", "dance".

Options

  • API Key - Your Giphy API key credential for authentication. Required for all requests.

Output

  • resp - API response object containing:
    • data - Array of related tag suggestions
    • meta - API status information

How It Works

  1. Validates that the term parameter is not empty
  2. Retrieves authentication credentials
  3. Queries Giphy's related tags endpoint
  4. Returns semantically related search terms
  5. Suggestions are based on Giphy's understanding of tag relationships

Example Usage

msg.Term = "cat";
// After execution:
// msg.resp.data might include: ["cats", "kitten", "kitty", "feline", "meow"]
msg.Term = userSearchTerm;
// After execution:
let relatedSearches = msg.resp.data.map(tag => ({
label: `Search for: ${tag.name}`,
value: tag.name
}));
displayRelatedSearches(relatedSearches);

Expand Search Options

msg.Term = "happy";
// Get variations like: "happiness", "joy", "cheerful", "excited", "smile"
// Offer as "People also searched for..."

Common Use Cases

  1. Search Refinement - Help users discover better search terms
  2. Related Content - Show "Related Searches" or "You Might Also Like"
  3. Search Expansion - Broaden search scope with semantically related terms
  4. Tag Suggestions - Suggest related tags for content tagging
  5. Discovery - Help users explore themes they might not have thought of

Response Structure

{
"data": [
{
"name": "cats"
},
{
"name": "kitten"
},
{
"name": "kitty"
}
],
"meta": {
"status": 200,
"msg": "OK"
}
}

Tips

  • Display suggestions as clickable chips or tags below search results
  • Use as "Related Searches" section in your UI
  • Combine with search results for a comprehensive search experience
  • Cache suggestions for popular terms to reduce API calls