Magic Post Thumbnail
  • Pricing
  • Features
  • Docs
  • FAQ
  • Contact
  • Account
  • Blog
  • Buy It
  • English
    • Français (French)
logo
  • Pricing
  • Features
  • Docs
  • FAQ
  • Contact
  • Account
  • Blog
  • Buy It
  • English
    • Français (French)

Documentation

Getting Started

  • What is Magic Post Thumbnail ?
  • Requirements

Setup the plugin

  • Settings : Source
  • Settings : Automatic
  • Settings : Gutenberg Block
  • How to use Magic Post Thumbnail

Image Databases

  • Google Image
  • Google Image (API)
  • Pixabay
  • DALL·E API
  • Stable Diffusion
  • Unsplash
  • Pexels
  • Envato Elements
  • Flickr
  • Openverse
  • Youtube

Pro Features

  • Upgrade from free to Pro version
  • Compatibility
  • Cron
  • Proxy

Miscellaneous

  • Affiliation
  • DALL·E & Stable Diffusion Custom Prompt
  • Logs

Support

  • Account
  • Problems with Pro Plugin
  • Getting help
  • FAQ & Commons Problems
  • Help the plugin
View Categories
  • Home
  • Docs
  • Image Databases
  • Google Image (API)

Google Image (API)

2 min read

Configuring Google Image (API) in the Image Bank

google API MPT

 

This method allows you to retrieve the images available on Google Images thanks to its API.

Here are the configurable options:

  • Custom Search Engine ID: The search engine identifier. See the explanation below.
  • Google API Key: Required to use the Google API. See the explanation below.
  • Language: Many languages are available. Choose the language that matches the language of your WordPress content.
  • Specified color predominantly: The primary color of the generated image.
  • Filetype: Extension of the generated image. Available choices: bmp, gif, jpg, png, webp.
  • Rights: Select which licenses apply to images. Selected licenses are cumulative.
  • Image size:  The size of the image.
  • Image Type:  Available choices: face, photo, clipart, line art, animated.
  • Safety level: Whether or not to display potentially offensive images. Possible choices: Moderate (default), Activate, Off.

 

To get the API key, go to the Google APIs Console and select Credentials > Create credentials > API key. Copy the key. Finally, you need to enable search via the API. Go to Library > Custom Search API and enable the API.

The gif image below shows the actions to perform:

 

The second step is to get the identifier of the search engine we are going to create.

Go to Custom Search, then add a URL and a name to your search engine. Then go to edit the search engine you created (Edit Search Engine > Setup). At the bottom of the page, in the “Sites to search” section, delete the site that is there by default (otherwise the search for images will be done only on your site and not on the entire web!) Finally, retrieve the ID using the Search Engine ID button.

Actions to be taken:

 

Once the two identifiers (API key & search engine ID) have been retrieved, enter them in the plugin settings.

What are your Feelings

Share This Article :

  • Facebook
  • X
  • LinkedIn
  • Pinterest
Updated on 22 February 2023
Google ImagePixabay
MPT-logo

You can donate for the free version with Paypal & Bitcoin

Bitcoin logo bc1qwchwnm6ch78futjlg3jeu6dznnapqpaarckaf6 Magic Post Thumbnail Youtube Channel
2025 © All rights reserved - Affiliation - Legal Notice - Privacy Policy