Sand AISand AI MAGI-2MAGI-2 現已登上 SandBase:支援原生音訊的 1080p 影片立即試用

Google Lens

API 文件
https://api.sandbase.ai/v1/api/google/lens

Reverse image search: find web pages and visual matches for an image URL.

價格
自 $0.00085 起美元/次呼叫
方法
POST
回應
JSON
參數
1 個必填 · 0 個選填

Playground

輸入

PNG、JPEG、WebP 或 GIF · 最多 20 MiB

Public URL of the image to search with. 格式:完整網址。
輸出就緒

您的輸出會顯示在這裡

完成輸入後,點擊執行。

API README

Google Lens API

The Google Lens API runs a reverse image search on a public image URL. It returns a list of web pages and visual matches, each with a title, source site, link and image. The only input is the url of the image.

Use cases

  • Find the original page or other sites that host a given image.
  • Check where a profile photo or product photo appears online.
  • Collect pages that mention or show the same subject as an image, such as a person, object or meme.
  • Build a list of source sites (for example Reddit or Facebook) that share a picture.

Request

curl -X POST "https://api.sandbase.ai/v1/api/google/lens" \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://i.imgur.com/HBrB8p0.png"}'

The result is returned in outputs[0].data.

Parameters

NameTypeRequiredDescription
urlstringYesPublic URL of the image to search with.

Example response

Real response for the request above, trimmed: lists keep their first item and long strings are cut.

{
  "data": {
    "results": [
      {
        "image": "https://preview.redd.it/arnold-schwarzenegger-and-danny-devito-v0-mnja7ruli9dh1.…",
        "link": "https://www.reddit.com/r/CelebrityLookalikes/comments/1uwlrps/arnold_schwarzeneg…",
        "source": "Reddit",
        "thumbnailUrl": "https://encrypted-tbn3.gstatic.com/images?q=tbn:ANd9GcQd3AyHbyvFtdWZ50GZr6_g7e9I…",
        "title": "Arnold Schwarzenegger und Danny DeVito : r/CelebrityLookalikes"
      }
    ],
    "url": "https://i.imgur.com/HBrB8p0.png"
  },
  "found": true
}

Response fields

FieldMeaning
foundtrue when the search returned matches. The request still succeeds when nothing is found, and found is false in that case.
data.urlThe image URL that was searched, echoed back from the request.
data.results[].titleTitle of the matching web page or post.
data.results[].linkURL of the web page that contains the matching image.
data.results[].sourceName of the site that hosts the match, such as Reddit or Facebook.
data.results[].imageURL of the matching image on the source site. Some values are cut or point to a resized preview.
data.results[].thumbnailUrlURL of a small thumbnail of the match.

Notes

  • The url must point to a public image. Pages that need a login will not work.
  • The request takes only url. It has no pagination parameters.
  • To search by keyword instead of by image, use Google Images.

Pricing

Billed at the actual cost of each call, about $0.00085 for the request above. Failed calls are not charged.

探索更多

相關 APIs

所有 APIs
API價格回應
Google每次呼叫 $0.00085 起JSON
Google每次呼叫 $0.01JSON
Google每次呼叫 $0.015JSON
Google每次呼叫 $0.002 起JSON
Google每次呼叫 $0.0015 起JSON
Google每次呼叫 $0.01JSON

指南:Best Google API in 2026: Pricing Compared

問題

常見問題

我要如何使用 Google Lens API?

使用 POST 請求將您的 SandBase API 金鑰放在 Authorization 標頭(Bearer)中,並以 JSON 主體傳入參數,即可呼叫 https://api.sandbase.ai/v1/api/google/lens。您也可以直接在本頁的 Playground 試用,不必撰寫程式碼。

Google Lens API 的費用是多少?

每次起 $0.00085,並從您的 SandBase 餘額中扣款。您只會為實際發出的呼叫付費;沒有訂閱方案。

Google Lens API 接受哪些參數?

必要:url (string)。 本頁的 Parameters 表格與 Playground 會列出每個欄位。

Google Lens API 會回傳什麼?

在同一個 HTTP 請求中回傳的 JSON 回應(同步)。 本頁的 README 包含範例回應。

我需要 Google 開發者帳號或 API 金鑰嗎?

不需要。Google Lens 是透過 SandBase 運作,因此一組 SandBase API 金鑰即可使用此端點以及目錄中的其他所有 API 和模型。您不需要另外申請 Google API 存取權。