Google Events API
Google Eventsから構造化されたイベントデータを取得します。engine=google_eventsを設定し、「Events in Paris」のような検索フレーズを渡すことで、指定した地域の今後開催予定のイベントの一覧を取得できます。
Endpoint
Section titled “Endpoint” GET https://serp.shifter.io/v1?engine=google_events&api_key=YOUR_API_KEY
Parameters
Section titled “Parameters”| Parameter | Type | Required | Description |
|---|---|---|---|
api_key | string | yes | あなたのSERP APIキー |
engine | string | yes | google_eventsを指定する必要があります |
q | string | yes | イベント検索クエリ |
device | string | no | desktop、mobile、またはtablet |
google_domain | string | no | 使用するGoogleドメイン |
location | string | no | ジオターゲティングの地域名 |
uule | string | no | Googleエンコードされた位置情報文字列 |
hl | string | no | インターフェース言語コード |
gl | string | no | 国コード |
Example request
Section titled “Example request”curl "https://serp.shifter.io/v1?engine=google_events&api_key=YOUR_API_KEY&q=Events%20in%20Paris%2C%20France"import requests
params = { "engine": "google_events", "api_key": "YOUR_API_KEY", "q": "Events in Paris, France",}r = requests.get("https://serp.shifter.io/v1", params=params)data = r.json()import fetch from 'node-fetch';
const url = 'https://serp.shifter.io/v1?' + new URLSearchParams({ engine: 'google_events', api_key: 'YOUR_API_KEY', q: 'Events in Paris, France',});const data = await (await fetch(url)).json();Example response
Section titled “Example response”{ "search_metadata": { "status": "Success" }, "search_parameters": { "engine": "google_events", "q": "Events in Paris, France", "google_domain": "google.com" }, "events_results": [ { "title": "Paris Fashion Week", "date": { "start_date": "Feb 27", "when": "Tue, Feb 27, 10:00 AM - Tue, Mar 5, 6:00 PM" }, "address": ["Paris, France"], "link": "https://www.example.com/event/...", "venue": { "name": "Le Grand Palais", "rating": 4.6 }, "thumbnail": "https://..." } ]}