【问题标题】:Android Google Custom Search : Requested Entity Not Found ErrorAndroid Google 自定义搜索:未找到请求的实体错误
【发布时间】:2022-06-14 00:57:23
【问题描述】:

我想使用 Google 的自定义搜索 API 通过用户在应用程序中输入的文本来搜索图像。

我做了以下事情:

  • here 创建了一个 API 密钥
  • 创建了可编程搜索引擎here
  • 为我的项目启用了计费here

这是我正在发出的 GET 请求的示例:

https://www.googleapis.com/customsearch/v1?key=MY_API_KEY&cx=MY_SEARCH_ENGINE_ID&q=SEARCH_TERM&searchType=image

我不断得到:

{
  "error": {
    "code": 404,
    "message": "Requested entity was not found.",
    "errors": [
      {
        "message": "Requested entity was not found.",
        "domain": "global",
        "reason": "notFound"
      }
    ],
    "status": "NOT_FOUND"
  }
}

我在项目的 Google Cloud Platform API 和服务窗口中看到我提出的请求:

寻找发生这种情况的原因,主要是导致未启用计费(但我的情况并非如此)。

我有没有遗漏的步骤?

【问题讨论】:

    标签: android kotlin google-custom-search


    【解决方案1】:

    我也遇到了同样的问题 - 你能解决吗?

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-12-14
      • 2021-01-15
      • 1970-01-01
      • 1970-01-01
      • 2016-11-06
      • 2020-02-19
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多