Skip to content

About

Google Image API, also called Google Images Search API, is a google api to fetch real-time google images with JSON results.

Topics

Resources

Stars

6 stars

Watchers

0 watching

Forks

Latest commit

 

History

24 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

Google Images Search API by CognifyApi - Implementation Guide 🚀

This repository provides a quick-start guide and documentation for implementing the Google Images Search API via Cognify API. This API allows developers to programmatically fetch high-quality image results from Google's index. A high-performance Google Images API.

Free trial No credit card required.

Start Now


Scraping Google Images to JSON

🔗 Official Resources


🛠 Features

  • Massive Database: Access Google's vast image repository.
  • Advanced Metadata: Get image dimensions (width/height) and MIME types.
  • Auto-Complete: Access Google search suggestions alongside image results.
  • Scalable: Built on high-performance infrastructure for production apps.

🚀 Getting Started

Base URL

https://api.cognifyapi.com

Parameters:

Parameter Required Description
query Yes Search keyword (e.g., "SpaceX")
count No Number of results (Default: 100)
imageInfo No Set to true to return width, height, and mime type.

1. Fetch Images with all parameters (/google-images)

Retrieve images based on a search keyword with all parameters included.

Example Request (Node.js/Axios):

const axios = require("axios");

async function searchImages() {
  try {
    const response = await axios.get(
      "https://api.cognifyapi.com/google-images",
      {
        params: {
          query: "electric cars",
          count: 10,
          imageInfo: true,
        },
        headers: {
          "x-cognifyapi-key": "YOUR_COGNIFY_API_KEY",
        },
      }
    );
    console.log(response.data);
  } catch (error) {
    console.error(error);
  }
}

searchImages();

Example Response (Node.js/Axios):

{
    "status": "success",
    "query": "SpaceX",
    "results": 2,
    "images": [
        {
            "url": "https://example.com/image.jpg",
            "width": 1920,
            "height": 1080,
            "type": "jpg",
            "mime": "image/jpg"
        },
        {
            "url": "https://example.com/image.jpg",
            "width": 1920,
            "height": 1080,
            "type": "jpg",
            "mime": "image/jpg"
        }
    ]
}

2. Fetch Images without imageInfo parameter (/google-images)

Retrieve images based on a search keyword.

Example Request (Node.js/Axios):

const axios = require("axios");

async function searchImages() {
  try {
    const response = await axios.get(
      "https://api.cognifyapi.com/google-images",
      {
        params: {
          query: "SpaceX",
          count: 5,
        },
        headers: {
          "x-cognifyapi-key": "YOUR_COGNIFY_API_KEY",
        },
      }
    );
    console.log(response.data);
  } catch (error) {
    console.error(error);
  }
}

searchImages();

Example Response (Node.js/Axios):

{
    "status": "success",
    "query": "SpaceX",
    "results": 2,
    "images": [
        {
            "url": "https://example.com/image.jpg",
        },
        {
            "url": "https://example.com/image.jpg",
        }
    ]
}

About

Google Image API, also called Google Images Search API, is a google api to fetch real-time google images with JSON results.

Topics

Resources

Stars

6 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages