/search?engine=bing
API 端點允許您透過 SerpApi 服務獲取 Bing 搜尋引擎的結果。
端點GET https://serpapi.abcproxy.com/search
描述
使用者可透過 GET 請求查詢:
https://serpapi.abcproxy.com/search?engine=bing
。前往查看互動式即時演示。
curl -X GET "https://serpapi.abcproxy.com/search" \
-d "engine=bing" \
-d "q=Coffee" \
-d "no_cache=false" \
-d "api_key=YOUR_API_KEY"
import requests
params = {
"engine": "bing",
"q": "Coffee",
"no_cache": "false",
"api_key": "YOUR_API_KEY"
}
response = requests.get("https://serpapi.abcproxy.com/search", params=params)
print(response.json())
const axios = require('axios');
const params = {
engine: "bing",
q: "Coffee",
no_cache: "false",
api_key: "YOUR_API_KEY"
};
axios.get("https://serpapi.abcproxy.com/search", { params })
.then(response => console.log(response.data));
GET /search?engine=bing&q=Coffee&no_cache=false&api_key=YOUR_API_KEY HTTP/1.1
Host: serpapi.abcproxy.com
<?php
$client = new \GuzzleHttp\Client();
$response = $client->get('https://serpapi.abcproxy.com/search', [
'query' => [
'engine' => 'bing',
'q' => 'Coffee',
'no_cache' => 'false',
'api_key' => 'YOUR_API_KEY'
]
]);
echo $response->getBody();
package main
import (
"net/http"
"io/ioutil"
"log"
)
func main() {
client := &http.Client{}
req, _ := http.NewRequest("GET", "https://serpapi.abcproxy.com/search", nil)
q := req.URL.Query()
q.Add("engine", "bing")
q.Add("q", "Coffee")
q.Add("no_cache", "false")
q.Add("api_key", "YOUR_API_KEY")
req.URL.RawQuery = q.Encode()
resp, _ := client.Do(req)
body, _ := ioutil.ReadAll(resp.Body)
log.Println(string(body))
}
using System;
using System.Net.Http;
class Program
{
static async Task Main()
{
var client = new HttpClient();
var query = System.Web.HttpUtility.ParseQueryString(string.Empty);
query["engine"] = "bing";
query["q"] = "Coffee";
query["no_cache"] = "false";
query["api_key"] = "YOUR_API_KEY";
var response = await client.GetAsync(
$"https://serpapi.abcproxy.com/search?{query}"
);
Console.WriteLine(await response.Content.ReadAsStringAsync());
}
}
import java.net.*;
import java.io.*;
public class Main {
public static void main(String[] args) throws Exception {
String url = "https://serpapi.abcproxy.com/search" +
"?engine=bing" +
"&q=Coffee" +
"&no_cache=false" +
"&api_key=YOUR_API_KEY";
HttpURLConnection conn = (HttpURLConnection) new URL(url).openConnection();
conn.setRequestMethod("GET");
BufferedReader in = new BufferedReader(
new InputStreamReader(conn.getInputStream())
);
String response = in.lines().collect(Collectors.joining());
System.out.println(response);
}
}
搜尋查詢
q
字符串
是
定義搜尋查詢
coffee
地理位置
location
字符串
否
定義搜尋來源地
Japan-Tokyo
lat
字符串
否
搜尋來源地的GPS緯度
37.26741027832031
lon
字符串
否
搜尋來源地的GPS經度
-121.83389282226562
mkt
字符串
否
定義搜尋市場區域(語言代碼-國家代碼)
en-US
本地化
cc
字符串
否
搜尋來源國家(ISO_3166-1格式)
us
, de
分頁
first
整數型
否
有機結果偏移量
10
count
整數型
否
每頁結果數量(1-50)
-
進階篩選
safeSearch
字符串
否
成人內容過濾等級:
Off
Moderate
Strict
-
filters
字符串
否
複雜篩選器(日期範圍、顯示篩選等)
-
Serpapi 參數
engine
字符串
是
需設為 bing
使用Bing API
bing
no_cache
布爾值
否
強制重新抓取結果(即使有緩存)
true
或 false
api_key
字符串
是
SerpApi 私鑰
YOUR_API_KEY
響應主體
{
"code": 200,
"search_parameters": {
"q": "Coffee",
"engine": "bing",
"no_cache": true,
"api_key": "YOUR_API_KEY"
},
"search_metadata": {
"xray_html_file": "https://webserp.abcproxy.com/files/7160ebe4b211ef29/b60dc95c-0e7a-4445-8f97-dc6fea09c92c.xray",
"total_time_taken": "6.2197",
"id": "b60dc95c-0e7a-4445-8f97-dc6fea09c92c",
"json_endpoint": "https://webserp.abcproxy.com/files/7160ebe4b211ef29/b60dc95c-0e7a-4445-8f97-dc6fea09c92c.json",
"created_at": "2025-04-09 10:46:13",
"bing_url": "https://www.bing.com/search?q=Coffee",
"raw_html_file": "https://webserp.abcproxy.com/files/7160ebe4b211ef29/b60dc95c-0e7a-4445-8f97-dc6fea09c92c.html"
},
"search_information": {
"total_results": 24
},
"knowledge_graph": {
"timeline": [
{
"time ": "harvest",
"description": "Coffee berries are picked by hand or machine when ripe.",
"link": "https://www.bing.com/search?FORM=SNAPST&q=%e5%92%96%e5%95%a1%e6%94%b6%e8%8e%b7%e6%96%b9%e6%b3%95&filters=fcid:\"0-f301e3d7-c91b-3439-eaab-c615b2859c5d\"+itemid:\"0\"",
"thumbnail": "https://th.bing.com/th/id/OSK.TMLNVBRWzFmoZAQSp2N0WZzCNqvBKsl8VOaADH9cw3cfd4k?w=150&h=220&c=7&o=6&pid=SANGAM"
},
...
],
"explore_more": [
{
"link": "https://www.bing.com/search?FORM=KCEXPL&q=%e8%8c%b6&filters=sid:\"4ff9d84c-26df-69fe-797a-057cffe10c95\"+lite:\".S2NkUmVsYXRpb25eZTdmNjk2MDEtZmQzNy02NTYwLTMxOWEtNmJkNzAzN2EzY2YxXl5eXiRFbnRpdHkyX3poLWhhbnM=\"",
"thumbnail": "https://https://th.bing.com/th/id/OSK.600095589f7e27544376c604fb9eae9d?w=80&h=80&c=7&o=6&pid=SANGAM",
"title": "tea"
},
...
],
"type": "A drink made from roasted coffee beans",
"title": "coffee",
"thumbnails": [
{
"image": "https:https://th.bing.com/th/id/OSK.HEROHAUWLfIvLC6O9CBsjbvqn6eFQz3dc9C761mXjEcCDZY?w=472&h=280&c=13&rs=2&o=6&oif=webp&pid=SANGAM",
"source": "https://www.bing.com/images/search?q=%e5%92%96%e5%95%a1&cbn=KnowledgeCard&stid=e7f69601-fd37-6560-319a-6bd7037a3cf1&FORM=KCHIMM"
}
],
"other_facts": [
{
"name": "Place of origin",
"original_value": "Yemen (first country to drink it) · Ethiopia (first country to grow it)",
"value": [
{
"name": "Yemen",
"link": "https://www.bing.comhttps://zh.wikipedia.org/wiki/也門"
},
{
"name": "(Country where it was first consumed)"
}
]
},
...
]
},
"organic_results": [
{
"snippet": "Victrola Coffee has been sourcing, roasting and serving premium coffee since 2000. Shop our coffee online or visit one of our Seattle coffee shops.",
"position": 1,
"title": "Victrola Coffee Roasters",
"link": "https://www.victrolacoffee.com/",
"displayed_link": "https://www.victrolacoffee.com",
"thumbnail": "https://th.bing.com/th/id/ODLS.A2450BEC-5595-40BA-9F13-D9EC6AB74B9F?w=32&h=32&qlt=91&pcl=fffffa&o=6&pid=1.2"
},
...
],
"pagination": {
"other_pages": {
"2": "https://www.bing.com/search?q=Coffee&FPIG=B4B8D1CD5BC64F8F87D3BD446677F69E&first=7&FORM=PERE",
"3": "https://www.bing.com/search?q=Coffee&FPIG=B4B8D1CD5BC64F8F87D3BD446677F69E&first=17&FORM=PERE1",
"4": "https://www.bing.com/search?q=Coffee&FPIG=B4B8D1CD5BC64F8F87D3BD446677F69E&first=27&FORM=PERE2"
},
"current": 1,
"next": "https://www.bing.com/search?q=Coffee&FPIG=B4B8D1CD5BC64F8F87D3BD446677F69E&first=7&FORM=PORE"
},
"related_searches": [
{
"link": "https://www.bing.com/search?q=coffee%e7%bf%bb%e8%af%91&FORM=QSRE1",
"query": "coffee translation"
},
...
],
"answer_box": {
"thumbnail": "https://th.bing.com/th/id/OIP.1XbgSkUv2othaYoUfyK1SAHaE5?w=200&h=200&c=10&o=6&pid=Stakeholders+launch+%24950M+initiative+to+boost+African+coffee+industry+productivity+-+Global+Coffee+Report&rm=2",
"type": "qna",
"highlighted_snippets": [
"Coffee",
"beverage brewed from roasted and ground coffee beans",
"+3",
"Coffee",
"is",
"a",
"beverage",
"brewed",
"beans",
"Coffee",
"is",
"a",
"beverage",
"brewed",
"beans"
]
},
"inline_images": {
"see_more_link": "https://www.bing.com/images/search?q=coffee&qpvt=Coffee&FORM=IQFRML",
"items": [
{
"title": "Best coffee cities in America",
"thumbnail": "https://www.bing.com/th/id/OIP.2n-aqxJNos5p8RW2sH5rzgHaEK?w=194&h=185&c=8&rs=1&qlt=90&o=6&pid=3.1&rm=2",
"link": "https://www.bing.com/images/search?q=coffee&id=DC502FE4C5A5EBFB2BFA2834422D6535764DE74C&FORM=IQFRBA"
},
...
]
},
"inline_videos": {
"items": [
{
"thumbnail": "https://th.bing.comhttps://th.bing.com/th/id/OM.MpRt8pU-k33kUg_1743537495?pid=1.7",
"views": "1954000",
"title": "Coffee Menu Explained - What the most common coffees are and how to make them",
"channel": "Artisti Coffee Roasters.",
"position": 1,
"link": "https://www.bing.com/videos/riverview/relatedvideo?q=Coffee&mid=52E47D933E95F26D943252E47D933E95F26D9432&FORM=VIRE",
"date": "July 15, 2021",
"platform": "YouTube",
"source_link": "https://www.youtube.com/watch?v=rLaVDQy0q8Y",
"duration": "16:49"
},
...
],
"shorts_results": [
{
"title": "Satisfying Coffee Preparation Tutorial | Espresso Love",
"link": "https://www.bing.com/videos/riverview/relatedvideo?q=Coffee&&mid=E27AE2A2D2B9AED20573E27AE2A2D2B9AED20573&mmscn=stvo&FORM=VIRE",
"thumbnail": null,
"channel": "@baristahamburg",
"source": "TikTok",
"position": 1
},
...
],
"title": "Coffee video",
"displayed_link": "bing.com › videos"
},
"ads": [
{
"title": {
"visible": "Green Mountain Coffee",
"hidden": "Roasters Keurig Single-Serve K-Cup Pods, Breakfast Blend, Light Roast, Pack Of 70 Pods ODFN5630763"
},
"price": "$44.98",
"store": "OfficeSupply.com",
"position": 1,
"block_position": "inline-top",
"link": "https://www.bing.com/aclk?ld=e87cWJYFNMiKFU-XdRX_DyAzVUCUxb_8yj2b7N2KPpMDMVpo4xsI_IsNYLX7JIh4HDQ8Pg60hWGF5_y7PB7oMVIZ9ueCaCvvWlXhnffcsYsnws1xpOfklmkTPlo6UZOUU1u1my1GvAwMwYiKdNsHkuD44Psx3YhFvDrg4MFoW5-mVgx0zd2MT6Qo6fSevl-AjyjM09CQ&u=aHR0cHMlM2ElMmYlMmZ3d3cub2ZmaWNlc3VwcGx5LmNvbSUyZmNsZWFuaW5nLWJyZWFrcm9vbSUyZmZvb2QtYmV2ZXJhZ2Utc3VwcGxpZXMlMmZmb29kcy1iZXZlcmFnZXMlMmZjb2ZmZWUlMmZncmVlbi1tb3VudGFpbi1jb2ZmZWUtcm9hc3RlcnMta2V1cmlnLXNpbmdsZS1zZXJ2ZS1wb2RzLWJyZWFrZmFzdC1ibGVuZC1saWdodC1yb2FzdC1wYWNrLXBvZHMlMmZwMTM3MTYwOC5odG1sJTNmcmVmJTNkcGxhJTI2c2NpZCUzZHNjYnBscDEzNzE2MDglMjZzY19pbnRpZCUzZDEzNzE2MDglMjZtc2Nsa2lkJTNkOGZiMDU3MDI4YjJkMWYyODBkNjgzMGYxZjA3OTM3NmElMjZ1dG1fc291cmNlJTNkYmluZyUyNnV0bV9tZWRpdW0lM2RjcGMlMjZ1dG1fY2FtcGFpZ24lM2RTQyUyNTIwU2hvcHBpbmclMjUyMC0lMjUyMEhpZ2glMjUyME1hcmdpbiUyNTIwRGVwb3QlMjUyMEJyYW5kcyUyNTIwLSUyNTIwQnJvYWQlMjZ1dG1fdGVybSUzZDQ1ODUzMDcwOTM1ODQ5MDYlMjZ1dG1fY29udGVudCUzZEhpZ2glMjUyME1hcmdpbiUyNTIwRGVwb3QlMjUyMEJyYW5kcyUyNTIwLSUyNTIwQnJvYWQ&rlid=8fb057028b2d1f280d6830f1f079376a",
"thumbnail": "https://www.bing.comhttps://th.bing.com/th/id/OPHS.YRtdGWNeILP8MA474C474?w=128&h=148&pcl=f5f5f5&o=5&pid=21.1"
},
...
],
"local_results": {
"places": [
{
"gps_coordinates": {
"latitude": "37.26741027832031",
"longitude": "-121.83389282226562"
},
"position": 1,
"place_id": "YN124x2369636",
"title": "Starbucks",
"address": "2.5/5",
"links": {
"website": "https://www.bing.com/alink/link?url=https%3a%2f%2fwww.starbucks.com%2fstore-locator%2fstore%2f15056&source=serp-local&h=Y%2fG43wuMG30Q7nlIeXfuSf6CmimsQdmgDRZl0lLWk3M%3d&p=lw_lec&ig=119767612EFD44A8936149AC663EE3D5&ypid=YN124x2369636",
"directions": "https://www.bing.com/maps?&mepi=34~Directions~TopOfPage~Direction_Button&ty=0&rtp=pos.37.26741027832031_-121.83389282226562__Starbucks__e_~&mode=d&v=2&sV=1"
}
},
...
]
},
...
}
響應欄位
search_parameters
對象
包含查詢參數及搜尋上下文
search_metadata
對象
包含時間和狀態資訊
search_information
對象
包含搜尋元數據(如總結果數)
ads
對象數組
搜尋結果中的廣告
events_results
對象
活動列表及相關資訊
local_map
對象
本地搜尋的嵌入式地圖數據
local_results
對象
本地商家列表及詳情
organic_results
對象數組
主要非廣告搜尋結果
explore_results
對象數組
"其他人也探索"的建議
inline_images
對象
搜尋結果中的圖片輪播
inline_videos
對象
搜尋結果中的影片輪播
recipes_results
對象
食譜卡片和烹飪資訊
news_results
對象
新聞文章列表及摘要
knowledge_graph
對象
知識面板實體資訊
answer_box
對象
精選答案摘要和問題框
related_searches
對象數組
"相關搜尋"建議
related_questions
對象數組
"其他人也提問"問題
pagination
對象
搜尋結果分頁控制
常見錯誤
200
400
API 金鑰不可為空
200
401
參數錯誤
200
402
API 金鑰錯誤
200
403
餘額不足
200
404
扣費失敗
200
405
用量記錄失敗
200
406
不支援的引擎
200
407
網路錯誤
200
408
檔案不存在
200
429
請求過於頻繁
200
409
限制參數錯誤
200
410
URL 建構錯誤
200
411
查詢記錄失敗
200
412
找不到 JSON
200
413
獲取 HTML 錯誤
200
414
HTML 內容為空
錯誤範例
{
"code": 400,
"message": "API Key can not be empty"
}