Skip to content

Google Lens 搜尋 API

prod-global
GET
/api/v1/google/lens
API 健康狀態
健康 可用 受限 多數不可用 無資料
正在載入健康狀態...

取得 Google Lens 搜尋資料,包括視覺比對、產品比對和相關連結,用於視覺搜尋分析和產品比對工作流程。

標籤: Google Lens

請求參數

名稱必填類型預設值說明
urlstring您想使用 Google Lens 分析的圖片網址。必須是公開可存取的圖片網址。
countrystringus設定目標國家代碼(例如 'us'、'uk')以本地化結果。請參閱 Google 國家
languagestringen使用兩個字母的代碼設定結果語言(例如 'en' 表示英文,'fr' 表示法文)。請參閱 Google 語言
productbooleanfalse如果設為 true,API 將專門尋找產品匹配和購物結果。
visual_matchesbooleanfalse如果設為 true,API 將回傳視覺上相似的圖片和匹配結果。
exact_matchesbooleanfalse如果設為 true,API 將搜尋所提供圖片的完全重複項。

複製請求

bash
curl -X GET "https://api.justserpapi.com/api/v1/google/lens?url=YOUR_VALUE" \
  -H "X-API-Key: YOUR_API_KEY"
js
const res = await fetch("https://api.justserpapi.com/api/v1/google/lens?url=YOUR_VALUE", {
  headers: { "X-API-Key": "YOUR_API_KEY" }
});
const data = await res.json();
console.log(data);
python
import requests

url = "https://api.justserpapi.com/api/v1/google/lens"
headers = { "X-API-Key": "YOUR_API_KEY" }
params = {
  "url": "YOUR_VALUE"
}
response = requests.get(url, headers=headers, params=params)
print(response.json())
php
<?php
$url = "https://api.justserpapi.com/api/v1/google/lens?url=YOUR_VALUE";
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    "X-API-Key: YOUR_API_KEY"
]);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
go
package main

import (
	"fmt"
	"io"
	"net/http"
)

func main() {
	client := &http.Client{}
	req, _ := http.NewRequest("GET", "https://api.justserpapi.com/api/v1/google/lens?url=YOUR_VALUE", nil)
	req.Header.Set("X-API-Key", "YOUR_API_KEY")
	resp, _ := client.Do(req)
	defer resp.Body.Close()
	body, _ := io.ReadAll(resp.Body)
	fmt.Println(string(body))
}

回應

正在載入最新回應範例...