The Mobi Developer Hub

Welcome to the Mobi developer hub. You'll find comprehensive guides and documentation to help you start working with Mobi as quickly as possible, as well as support if you get stuck. Let's jump right in!

Get Started    

Google Custom Search

Don't have an Instabot account yet?

1. Overview

Let your users search a site using the Google Custom Search webhook and display the results directly in the bot.

The official Google Custom Search API documentation can be found here: https://developers.google.com/custom-search/json-api/v1/using_rest


2. Use-cases and example bot

Use-cases:

The Google Custom Search webhook can be useful for:

  • users who are looking for specific content on your site
  • displaying your site-search results directly in Instabot as a choice for your users to select

Example bot:


3. Requirements

To use this webhook, you will need the following:


4. How to set up

The following section provides specific instructions on how to use the Google Custom Search webhook.

For more details on webhooks syntax and how to use them seamlessly in your conversation, see the detailed webhooks reference guide

  1. Open the Google Custom Search webhook, replace the key parameter with your API key, and the cx parameter with your search engine ID and click Save
  1. Open your bot, add a multiple-choice node.
    Then, by typing the [= syntax in the first option, a list of webhooks will appear - select the webhook output parameter that you want to display to the user.

The Google Custom Search webhook included in your account includes 4 preconfigured output parameters:

  • items.link - The full URL to which the search result is pointing, e.g. http://www.example.com/foo/bar.
  • items.title - The title of the search result, in plain text.
  • items.items.pagemap.metatags.og:description - A description of the page

In addition to the preconfigured output parameters, you can also add as many Google Custom Search output parameters to the webhook to use/display in your conversation as you like - see the Google Custom Search API documentation for details

  1. Replace Value with the name of the node where your user is telling Instabot what they want to search for - use the @ syntax.

That's it!

Google Custom Search


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.