Google 財經 搜尋 API
API 健康狀態
健康 可用 受限 多數不可用 無資料
正在載入健康狀態...
獲取 Google 財經搜尋資料,包括市場摘要、公司詳細資訊及相關財經結果,適用於財經監控與市場研究。
標籤: Google 財經
請求參數
| 名稱 | 必填 | 類型 | 預設值 | 說明 |
|---|---|---|---|---|
query | 是 | string | 您要在 Google 財經上搜尋的股票代號、公司名稱或指數(例如 'AAPL'、'Tesla'、'S&P 500')。 | |
html | 否 | boolean | false | 設為 true 以回傳 Google 搜尋結果頁面的原始 HTML 以及結構化資料。 |
language | 否 | string | en | 使用兩個字母的代碼設定結果語言(例如 'en' 表示英文,'fr' 表示法文)。請參閱 Google 語言。 |
複製請求
bash
curl -X GET "https://api.justserpapi.com/api/v1/google/finance/search?query=coffee" \
-H "X-API-Key: YOUR_API_KEY"js
const res = await fetch("https://api.justserpapi.com/api/v1/google/finance/search?query=coffee", {
headers: { "X-API-Key": "YOUR_API_KEY" }
});
const data = await res.json();
console.log(data);python
import requests
url = "https://api.justserpapi.com/api/v1/google/finance/search"
headers = { "X-API-Key": "YOUR_API_KEY" }
params = {
"query": "coffee"
}
response = requests.get(url, headers=headers, params=params)
print(response.json())php
<?php
$url = "https://api.justserpapi.com/api/v1/google/finance/search?query=coffee";
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"X-API-Key: YOUR_API_KEY"
]);
$response = curl_exec($ch);
curl_close($ch);
echo $response;go
package main
import (
"fmt"
"io"
"net/http"
)
func main() {
client := &http.Client{}
req, _ := http.NewRequest("GET", "https://api.justserpapi.com/api/v1/google/finance/search?query=coffee", nil)
req.Header.Set("X-API-Key", "YOUR_API_KEY")
resp, _ := client.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}回應
正在載入最新回應範例...
