Google財經市場 API
API 詳情
端點GET https://serpapi.abcproxy.com/search
說明
我們的Google財經市場 API 可讓您抓取Google財經市場頁面的資料。該 API 可透過以下端點存取:
/search?engine=google_finance_markets
。使用者可使用
GET
請求查詢以下地址:https://serpapi.abcproxy.com/search?engine=google_finance_markets
。您可以前往 工作臺 進行即時互動測試。
請求方式
HTTP 請求
curl -X GET "https://serpapi.abcproxy.com/search" \
-d "engine=google_finance_markets" \
-d "trend=Market indexes" \
-d "no_cache=false" \
-d "api_key=YOUR_API_KEY"
API 參數
搜尋查詢
trend
字符串
是
此參數用於獲取不同的市場趨勢。可用選項:
indexes
- 市場指數
most-active
- 最活躍
gainers
- 漲幅
losers
- 跌幅
climate-leaders
- 氣候領導者
cryptocurrencies
- 加密貨幣
currencies
- 貨幣
-
本地化
進階谷歌財經參數
index_market
字符串
否
此參數用於依地區展開市場指數並獲取更多結果。可用選項:
americas
- 美洲
europe-middle-east-africa
- 歐洲、中東與非洲
asia-pacific
- 亞太地區
-
SerpApi 參數
engine
字符串
是
設定參數為 google_finance_markets
以使用谷歌財經市場 API 引擎。
google_finance_markets
no_cache
布林值
否
此參數會強制 SerpApi 重新抓取資料,即使已存在快取版本。僅當查詢與所有參數完全相同時才會使用快取。快取會在 1 小時後過期,且不計入月搜尋次數。可設為 false
(預設)允許使用快取,或 true
不使用快取。
true
或false
api_key
字符串
是
定義要使用的 SerpApi 私密金鑰。
123
回應
成功 200
回應內容
{
"discover_more": {
"items": [
{
"title": "Có thể bạn quan tâm",
"results": [
{
"stock": ".DJI:INDEXDJX",
"link": "https://www.google.com/finance/quote/.DJI:INDEXDJX",
"name": "Chỉ số trung bình công nghiệp Dow Jones",
"price": "41.989,96",
"percentage": "Giảm 0,028%"
},
]
}
]
},
"search_metadata": {
"raw_html_file": "https://webserp.abcproxy.com/files/7da6c0856c397172/791eb4a7-7e3f-4099-9ab3-a80a0cdaf6eb.html",
"xray_html_file": "https://webserp.abcproxy.com/files/7da6c0856c397172/791eb4a7-7e3f-4099-9ab3-a80a0cdaf6eb.xray",
"total_time_taken": "5.0181",
"id": "791eb4a7-7e3f-4099-9ab3-a80a0cdaf6eb",
"json_endpoint": "https://webserp.abcproxy.com/files/7da6c0856c397172/791eb4a7-7e3f-4099-9ab3-a80a0cdaf6eb.json",
"created_at": "2025-04-02 17:57:40",
"google_finance_markets_url": "https://www.google.com/finance/markets/indexes"
},
"search_parameters": {
"engine": "google_finance_markets",
"no_cache": true,
"api_key": "YOUR_API_KEY",
"trend": "indexes"
},
"url": "https://www.google.com/finance/markets/indexes",
"markets": {
"market": {
"Hoa Kỳ": [
{
"link": "https://www.google.com/finance./quote/.DJI:INDEXDJX",
"name": "Dow Jones",
"price": "41.989,96",
"price_movement": {
"percentage": "Giảm 0,028%",
"value": "-11,80"
}
},
]
}
},
"market_trends": [
{
"results": [
{
"link": "https://www.google.com/finance/markets/indexes",
"name": "Các chỉ số thị trường"
},
]
},
{
"title": "Châu Mỹ",
"link": "https://www.google.com/finance/markets/indexes/americas",
"results": [
{
"value": "+21,22",
"percentage": "Tăng 0,38%",
"stock": "INX:INDEXSP",
"link": "https://www.google.com/finance/quote/.INX:INDEXSP",
"name": "S&P 500",
"price": "5.633,07"
},
]
},
{
"title": "Châu Âu, Trung Đông và Châu Phi",
"link": "https://www.google.com/finance/markets/indexes/europe-middle-east-africa",
"results": [
{
"percentage": "Giảm 0,90%",
"stock": "/quote/DAX:INDEXDB",
"link": "https://www.google.com/finance/quote/DAX:INDEXDB",
"name": "DAX",
"price": "22.337,30",
"value": "-202,68"
},
]
},
{
"title": "Châu Á Thái Bình Dương",
"link": "https://www.google.com/finance/markets/indexes/asia-pacific",
"results": [
{
"value": "+101,39",
"percentage": "Tăng 0,28%",
"stock": "/quote/NI225:INDEXNIKKEI",
"link": "https://www.google.com/finance/quote/NI225:INDEXNIKKEI",
"name": "Nikkei 225",
"price": "35.725,87"
},
]
}
],
"news_results": [
{
"link": "https://www.nasdaq.com/articles/sensex-nifty-modestly-higher-cautious-trade-4",
"snippet": "Sensex, Nifty Modestly Higher In Cautious Trade",
"source": "Nasdaq",
"date": "5 giờ trước",
"thumbnail": "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcR8lcaRUHBs1yG3Z3A4xxEVndyt2LzdlwK8fqG4dHYbxwl_U_1s2fa81EuRCK0",
"stocks": [
{
"link": "https://www.google.com/finance/quote/NIFTY_50:INDEXNSE",
"stock": "/quote/NIFTY_50:INDEXNSE",
"price_movement": "Tăng 0,75%"
},
{
"link": "https://www.google.com/finance/quote/SENSEX:INDEXBOM",
"stock": "/quote/SENSEX:INDEXBOM",
"price_movement": "Tăng 0,81%"
}
]
},
]
}
回應欄位
search_parameters
對象
包含查詢參數與搜尋上下文
search_metadata
對象
包含時間與狀態資訊
url
字符串
網址
markets
對象
市場資訊
summary
字符串
摘要資訊參數
compare_to[]
對象數組
比較資訊參數
market_trends[]
對象數組
市場趨勢資訊參數
news_results[]
對象數組
新聞結果資訊參數
discover_more
對象
探索更多資訊參數
financials
對象
財務資訊參數
graph
對象
圖表資訊參數
knowledge_graph
對象
知識圖譜資訊參數
錯誤回應
常見錯誤
200
400
API 金鑰不能為空
200
401
參數錯誤
200
402
API 金鑰錯誤
200
403
餘額不足
200
404
扣款失敗
200
405
紀錄用量次數失敗
200
406
不支援的引擎
200
407
網路錯誤
200
408
找不到檔案
200
409
限制參數錯誤
200
410
建立 URL 錯誤
200
411
查詢最近紀錄失敗
200
412
找不到 JSON 資料
200
413
取得 HTML 錯誤
200
414
HTML 為空
200
429
請求次數過多
錯誤範例
{
"code": 400,
"message": "API Key can not be empty"
}
最后更新于