google-apigoogle-image-search

Google image search says api no longer available


I am using google image search API. Till yesterday it was working, but today morning it says "This API is no longer available"

Is it officially closed, Or any error at my side

Request

https://ajax.googleapis.com/ajax/services/search/images?v=1.0&rsz=8&q=cute+kittens

Response

{"responseData": null, "responseDetails": "This API is no longer available.", "responseStatus": 403}

Solution

  • This is the full URL template to be used

    We can eliminate unnecessary parameters.

    https://www.googleapis.com/customsearch/v1?q={searchTerms}&num={count?}&start={startIndex?}&lr={language?}&safe={safe?}&cx={cx?}&cref={cref?}&sort={sort?}&filter={filter?}&gl={gl?}&cr={cr?}&googlehost={googleHost?}&c2coff={disableCnTwTranslation?}&hq={hq?}&hl={hl?}&siteSearch={siteSearch?}&siteSearchFilter={siteSearchFilter?}&exactTerms={exactTerms?}&excludeTerms={excludeTerms?}&linkSite={linkSite?}&orTerms={orTerms?}&relatedSite={relatedSite?}&dateRestrict={dateRestrict?}&lowRange={lowRange?}&highRange={highRange?}&searchType={searchType}&fileType={fileType?}&rights={rights?}&imgSize={imgSize?}&imgType={imgType?}&imgColorType={imgColorType?}&imgDominantColor={imgDominantColor?}&alt=json

    I am using

    https://www.googleapis.com/customsearch/v1?key=ap_key&cx=cx&q=hello&searchType=image&imgSize=xlarge&alt=json&num=10&start=1