Google AnalyticsGoogle AnalyticsSEO/AEO

Run a custom GA4 report by property id

google-analytics.report

Run a traffic or behaviour report on your own Google Analytics property

価格
freeカタログ価格で提供
成功率
100%直近 30 日 · 15,619 回
レイテンシ p50
545 msp95 2.3 s
最終確認
2026/07/28動作確認済み
POSThttps://toolswitch.dev/v1/tools/google-analytics.reportBeta
  • プラットフォームのクォータを使用
  • 同期レスポンス
  • 公開データを読み取る

パラメータ

request shape previously live-verified via the registry entry's examples. An incompatible dimension/metric pair fails the whole call — check google.analytics.metadata for what combines. Sampling and thresholding are reported back in the response metadata, not as an error

パラメータ型必須説明例
パスパラメータ
property_id文字列必須numeric GA4 property id (the digits only — the admin API returns it as 'properties/123456789')123456789
リクエストボディ(JSON)
limit整数任意default 10000, max 250000100
offset整数任意0
metrics配列任意[{name: …}] — e.g. screenPageViews, sessions, activeUsers, conversions, engagementRate[{"name":"screenPageViews"}]
orderBys配列任意e.g. [{"metric":{"metricName":"sessions"},"desc":true}]
dateRanges配列必須up to 4 ranges. Use 'yesterday' or 'NdaysAgo', not 'today' — today is a partial day and always reads low[{"endDate":"yesterday","startDate":"28daysAgo"}]
dimensions配列任意[{name: …}] — e.g. pagePath, sessionSource, sessionDefaultChannelGroup, country, deviceCategory, date[{"name":"pagePath"}]
keepEmptyRows真偽値任意
dimensionFilterオブジェクト任意e.g. {"filter":{"fieldName":"pagePath","stringFilter":{"matchType":"CONTAINS","value":"/blog/"}}}
  • パスパラメータ
  • property_id文字列必須

    numeric GA4 property id (the digits only — the admin API returns it as 'properties/123456789')

    例:123456789

  • リクエストボディ(JSON)
  • limit整数任意

    default 10000, max 250000

    例:100

  • offset整数任意

    例:0

  • metrics配列任意

    [{name: …}] — e.g. screenPageViews, sessions, activeUsers, conversions, engagementRate

    例:[{"name":"screenPageViews"}]

  • orderBys配列任意

    e.g. [{"metric":{"metricName":"sessions"},"desc":true}]

  • dateRanges配列必須

    up to 4 ranges. Use 'yesterday' or 'NdaysAgo', not 'today' — today is a partial day and always reads low

    例:[{"endDate":"yesterday","startDate":"28daysAgo"}]

  • dimensions配列任意

    [{name: …}] — e.g. pagePath, sessionSource, sessionDefaultChannelGroup, country, deviceCategory, date

    例:[{"name":"pagePath"}]

  • keepEmptyRows真偽値任意
  • dimensionFilterオブジェクト任意

    e.g. {"filter":{"fieldName":"pagePath","stringFilter":{"matchType":"CONTAINS","value":"/blog/"}}}

コード例

$TOOLSWITCH_KEY をコンソールで作成したキーに置き換えてください。

Beta
curl -X POST 'https://toolswitch.dev/v1/tools/google-analytics.report' \
  -H "X-Toolswitch-Key: $TOOLSWITCH_KEY" \
  -H "Content-Type: application/json" \
  --data-raw '{"limit":3,"metrics":[{"name":"sessions"}],"dateRanges":[{"endDate":"yesterday","startDate":"28daysAgo"}],"dimensions":[{"name":"sessionDefaultChannelGroup"}]}'

このゲートウェイ API は Beta です。URL や認証方式は変更される場合があります。 パラメータはサンプルデータです。 呼び出し料金は free です。サービス料を含みます。