Sand AISand AI MAGI-2MAGI-2 hiện đã có trên SandBase: video 1080p với âm thanh gốcDùng thử ngay

Google Lens

Tài liệu API
https://api.sandbase.ai/v1/api/google/lens

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

Giá
Từ $0.00085USD / lượt gọi
Phương thức
POST
Phản hồi
JSON
Tham số
1 bắt buộc · 0 tùy chọn

Phòng thử nghiệm

Đầu vào

PNG, JPEG, WebP hoặc GIF · tối đa 20 MiB

Public URL of the image to search with. Định dạng: URL đầy đủ.
Đầu raSẵn sàng

Đầu ra của bạn sẽ xuất hiện ở đây

Hoàn tất đầu vào, rồi nhấp Run.

README API

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.

Khám phá thêm

APIs liên quan

Tất cả APIs
APIGiáPhản hồi
Google LensAPI này
Google
Từ $0.00085 mỗi lần gọiJSON
Google$0.01 mỗi lần gọiJSON
Google$0.015 mỗi lần gọiJSON
GoogleTừ $0.002 mỗi lần gọiJSON
GoogleTừ $0.0015 mỗi lần gọiJSON
Google$0.01 mỗi lần gọiJSON

Hướng dẫn:Best Google API in 2026: Pricing Compared

Câu hỏi

FAQ

Làm thế nào để dùng API Google Lens?

Gửi yêu cầu POST đến https://api.sandbase.ai/v1/api/google/lens với khóa API SandBase của bạn trong tiêu đề Authorization (Bearer) và các tham số trong phần thân JSON. Bạn cũng có thể thử trực tiếp trong Playground trên trang này mà không cần viết code.

API Google Lens có giá bao nhiêu?

Từ $0.00085 mỗi lần gọi, được tính từ số dư SandBase của bạn. Bạn chỉ bị tính phí cho các lần gọi bạn thực hiện; không có gói đăng ký.

API Google Lens chấp nhận những tham số nào?

Bắt buộc: url (string). Bảng Parameters và Playground trên trang này liệt kê mọi trường.

API Google Lens trả về gì?

Phản hồi JSON được trả về trong cùng một yêu cầu HTTP (đồng bộ). README trên trang này có ví dụ phản hồi.

Tôi có cần tài khoản nhà phát triển hoặc API key của Google không?

Không. Google Lens chạy thông qua SandBase, nên chỉ cần một API key SandBase là đủ cho endpoint này và mọi API cùng model khác trong danh mục. Bạn không cần đăng ký riêng để có quyền truy cập API của Google.