Bing Search API v7结果对象不包括Bing Local Business结果

问题描述 投票:0回答:1

[例如,当我在Bing.com上执行搜索时,搜索查询='THE MILLIONS GLOBAL LTD',我立即在结果页面右侧的Bing Local Business框中找到了答案。但是此信息未在主要结果列表中列出。

enter image description here

因此,当我使用Bing Search API v7对同一查询执行搜索时,结果对象中未返回正确的网站-至少在前100个结果中未返回。

searchUrl = "https://api.cognitive.microsoft.com/bing/v7.0/search"
headers = {"Ocp-Apim-Subscription-Key": subscriptionKey,
    "BingAPIs-Market": 'en-GB'}
params = {"q": query_string,
    "mkt": "en-GB",
    "textDecorations": True,
    "textFormat": "HTML",
    "count": 50}

response = requests.get(searchUrl, headers=headers, params=params, timeout=3)
searchResult = response.json()
urls = [x['url'] for x in searchResults["webPages"]["value"]]

Bing API search results

Bing Search API结果是否包括用户在页面上看到的所有内容,或者仅显示页面左侧列表中显示的所有内容?是否可以通过API将所有响应都包含到结果对象中?

python-3.x microsoft-cognitive bing-api bing-search
1个回答
0
投票

我也在同一个问题上苦苦挣扎。很高兴了解有关如何通过api获得这些“位置”结果的更多信息。

© www.soinside.com 2019 - 2024. All rights reserved.