Google Image Search Integration

Uploads from the Google Image Search API support the following types of files:

Section Quick Jump:

Using the Google Image Search API

User selects Web Images from services list

user enters a search term

user is presented with images matching their search in the Filestack dialog

Upload from Google Image Search

Uploading or "picking" a file from Google Image Search in the context of Filestack means choosing a file and creating a distributable link to that file after that file is copied to a new storage location.

Filestack's image search service returns a mix of results from Wikipedia, Flickr, and Google image search. By default, you do not need to configure anything to start searching and uploading photos via image search, Filestack is ready to go out of the box. Normally for Google Image Search the Filestack company API key is used to perform searches. However, you can configure it so that your Google API key is used to fetch Google image search results instead. If your customer base relies heavily on the image search functionality you may want to provide your own API key. So let's get that set up.

Once the project is created, click on the link on the page to Enable and Manage APIs, and on the folowing page click on the link for Custom Search API

On the next page click the button labeled enable API.

Now you can go back to the Credentials section. Click on Add Credentials and select API Key. You will be asked what type, choose Server Key. On the next screen, give your application a name and click create.

You will now be given your API key, copy it and enter it in the Filestack developer portal in the Auth Keys section under Google Search. Scroll down to the bottom and click Save Auth Credentials.

Congratulations! Filestack is now configured to use your Google Search API key!

Google Image Search Webhooks for Your Application

Google Image Search Webhooks serve the purpose of notifying users about events that occur in relation to their Filestack account. In your developer portal, you can set one or many urls whose purpose is to receive the messages triggered by specific Filestack events.

These are the three event types that will send messages to your webhook url(s) concerning Google Image Search:

Google Image Search File Uploads

Google Image Search File Exports

Google Image Search File Conversions

Configuring Google Image Search Webhooks

Filestack Webhooks are configured in the developer portal under Credentials > Webhooks. If you enter your url and select "All", then one entry will be made for each type of Filestack Webhook Event, including the ones for Google Image Search. To learn more about configuring and receiving webhooks please visit our main webhooks documentation page.

Receiving a Google Image Search Webhook Notification

Configuring your server to receive a new webhook is the same as creating any page on your website. If you are using Sinatra, add a new route with the desired URL. In PHP you could create a new .php file on your server. It doesn't need to be complicated. With webhooks, your server is the server receiving the request. You can even use an external service such as RequestBin as shown in the screenshot above.

Webhook data is sent as JSON in the request's body. The full event details are included and can be used directly. The "action" in the JSON is the type of Filestack event that happened, be it a file being uploaded, or simply the Filestack dialog opening.

Filestack will retry sending a webhook 3 times if the first attempt fails. The second attempt to deliver a webhook happens 5 minutes after the first attempt, the third attempt happens after 1 hour, and the final attempt to deliver a webhook happens 12 hours after the first attempt.

Note that for file uploads, both symlinks and files copied with pickAndStore, the "client" field shows the service used.

For conversions, the "provider" shows where the file resides. If the file was stored to Filestack's storage, the provider will be "internal", otherwise it could be "amazon" if the original was stored to S3, or one of the cloud drives Filestack connects to, such as "Google Image Search" if the link to the file was a symlink.

The following are examples of what the Google Image Search specific webhook messages include and look like: