Google Image Search API

The Google Image Search API allows you to search for images on Google and retrieve image URLs.

Base URL

"https://openapi-idk8.onrender.com"

Endpoints

GET `/google/image?search=your_search_term&count=number_of_images`

Description: Searches for images on Google based on the search term and returns a specified number of image URLs.

Query Parameters

  • search (required): The term to search for images.
  • count (optional): The number of images to return (default is 10, maximum is 40).

Sample Request

GET `https://openapi-idk8.onrender.com/google/image?search=cats&count=5`

Sample Response

{
  "api_name": "Google Image Search",
  "author": "OpenAPI",
  "api_type": "Image",
  "searchQuery": "cats",
  "count": 5,
  "images": [
    {
      "url": "https://example.com/image1.jpg",
      "width": 800,
      "height": 600
    },
    {
      "url": "https://example.com/image2.jpg",
      "width": 1024,
      "height": 768
    },
    // More image objects...
  ]
}

Error Handling

400 Bad Request: Returned when the "search" query parameter is missing.

{
  "error": "Search parameter is required."
}

500 Internal Server Error: Returned when there is an issue performing the image search.

{
  "error": "Internal server error."
}