【问题标题】:The result of the search query differs in the API and Shutterstock websiteAPI 和 Shutterstock 网站中的搜索查询结果不同
【发布时间】:2020-02-03 21:54:57
【问题描述】:

请帮助我。 API 和 Shutterstock 网站中的搜索查询结果不同。 我做错了什么?

API 仅返回 4 个结果,但在 shutterstock - 数千 我的代码:

$queryFields = [
  "query" => "осень лес векторы"
];

$options = [
  CURLOPT_URL => "https://api.shutterstock.com/v2/images/search?" . http_build_query($queryFields),
  CURLOPT_USERAGENT => "php/curl",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer xxxxx"
  ],
  CURLOPT_RETURNTRANSFER => 1
];

$handle = curl_init();
curl_setopt_array($handle, $options);
$response = curl_exec($handle);
curl_close($handle);

$decodedResponse = json_decode($response);

echo "<pre>"; 
    print_r( $decodedResponse ); 
echo "</pre>";

谢谢。

【问题讨论】:

    标签: shutterstock


    【解决方案1】:

    默认 API 访问(自助服务或免费产品)仅限于 Shutterstock 库的一个子集 - 只有大约 100 万张图片。这就是为什么与网站相比,您只看到 4 个搜索结果。如果您需要访问更多内容,请与团队联系 - https://developers.shutterstock.com/contact-us

    【讨论】:

      猜你喜欢
      • 2014-07-09
      • 1970-01-01
      • 2016-02-06
      • 1970-01-01
      • 1970-01-01
      • 2019-04-06
      • 1970-01-01
      • 1970-01-01
      • 2020-04-18
      相关资源
      最近更新 更多