パフォーマンス データを取得しています
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
1 日分のデータに対してクエリを毎日実行することで、割り当てを超過することなく、パフォーマンス データを素早くクエリできます。
どの検索タイプ(ウェブ、画像、動画など)でデータに含めるかを選択する必要があります。ディメンション(ページ、クエリ、国、デバイス)や、ページまたはプロパティで結果をグループ化するかどうかを選択できます。ページやクエリ文字列をクエリすると、一部のデータが破棄されることがあります(理由)。
概要
- 後述するクエリスタイルのいずれかを使用して、1 日分のデータに対するクエリを毎日実行することをおすすめします。1 日分のデータに対して毎日クエリを実行すると、1 日の割り当てを超えないようにする必要があります。通常、データは 2 ~ 3 日後に利用可能になります。過去 10 日間の日付でグループ化されたシンプルなクエリを実行すると、最新の利用可能なデータを確認できます。クエリの作成中:
- 検索結果をページ別とプロパティ別のどちらでグループ化するかを選択します。
- クエリで完全なカウントとディメンションの増加のどちらを使用するかを選択します。注: 検索での見え方に関するデータ(AMP、青色のリンク、リッチリザルトなど)は、2 段階のプロセスでクエリする必要があります。
- 最後のページ(0 行のレスポンス)が表示されるまで、同じクエリを再実行し、リクエストの
startRow
値を 25,000 増やして、結果をページ分割します。
- 必要に応じて、別の
type
パラメータを指定して同じクエリを実行します。
以下に、単一クエリの擬似コードの例を示します。この操作は、データを取得する
type
値ごとに 1 日に 1 回実行できます。
int maxRows = 25000; // Current max response size
int i = 0;
do {
response = Request(startDate = 3_days_ago,
endDate = 3_days_ago,
... add dimensions, type ...
rowLimit = maxRows,
startRow = i * maxRows);
i++;
… // Do something with the response data.
} while (response.rows.count() != 0); // Page through all result rows
データ制限
API 使用量の割り当てに加えて、Search Analytics メソッドでは、検索タイプ(ウェブ、画像など、クリック数で並べ替えられたもの)ごとに 1 日あたり最大 5 万行のデータを公開できます。
クエリの詳細
ページまたはプロパティでグループ化されたデータに対してクエリを実行できます。
ページでグループ化
正確にカウントするには、次のようにページとクエリのディメンションを省略する必要があります。
"startDate": "2018-06-01",
"endDate": "2018-06-01",
"dimensions": ["country", "device"],
"type": "web",
"aggregationType": "byPage"
startDate
/ endDate
: 同じ日付を選択して、1 日の期間を選択します。
dimensions
: 必要に応じて country
や device
を含めます。
type
: 必要に応じて、個別のクエリで
各 type
値を列挙します。
aggregationType
: byPage
にする必要があります。
ページやクエリの情報などの詳細情報を取得する場合、データは一部失われますが、次のようなクエリを実行します。
"startDate": "2018-06-01",
"endDate": "2018-06-01",
"dimensions": ["page", "query", "country", "device"],
"type": "web"
startDate
/ endDate
: 同じ日付を選択して、1 日の期間を選択します。
dimensions
: page
を含めます。必要に応じて、query
、country
、device
の任意の組み合わせを含めます。
type
: 必要に応じて、個別のクエリで
各 type
値を列挙します。
プロパティでグループ化
正確にカウントするには、次のようにページとクエリのディメンションを省略する必要があります。
"startDate": "2018-06-01",
"endDate": "2018-06-01",
"dimensions": ["country", "device"],
"type": "web"
startDate
/ endDate
: 同じ日付を選択して、1 日の期間を選択します。
dimensions
: 必要に応じて country
や device
を含めます。
type
: 必要に応じて、個別のクエリで
各 type
値を列挙します。
クエリ、国、デバイス情報などの詳細を確認するには、一部のデータが失われますが、次のようなクエリを実行します。
"startDate": "2018-06-01",
"endDate": "2018-06-01",
"dimensions": ["query", "country", "device"],
"type": "web"
startDate
/ endDate
: 同じ日付を選択して、1 日の期間を選択します。
dimensions
: 必要に応じて、query
、country
、device
の任意の組み合わせを含めます。
type
: 必要に応じて、個別のクエリで
各 type
値を列挙します。
ページまたはプロパティごとに結果をグループ化する
結果をプロパティ別ではなくページ別にグループ化した場合、インプレッション数、クリック数、掲載順位、クリック率の算出方法が異なります。詳細
詳細情報を尋ねるとデータが失われてしまうのはなぜですか?
ページまたはクエリでグループ化した場合、妥当な量のコンピューティング リソースを使用して妥当な時間で結果を計算できるようにするために、一部のデータが削除されることがあります。
検索での見え方のデータを取得する
検索での見え方を、他のディメンションとともに列として指定することはできません。そのため、サイトの検索での見え方に関する情報を確認するには、次の手順を行う必要があります。
- 唯一のディメンションとして
searchAppearance
を指定します。これにより、検索での見え方のタイプ別にすべてのデータがグループ化され、他のディメンションはグループ化されません。
- 必要に応じて 2 つ目のクエリを実行し、ステップ 1 で示した検索での見え方のタイプでフィルタして、クエリに必要なディメンション(ページ、国、クエリなど)を追加します。
複数の検索での見え方のタイプに関するデータを取得するには、ステップ 1 に示した検索での見え方のタイプごとに 2 つ目の手順を 1 回実行する必要があります。
最初のクエリ:
サイトでの検索での見え方のタイプのリストを取得します。
{
"startDate": "2018-05-01",
"endDate": "2018-05-31",
"type": "web",
"dimensions": [
"searchAppearance"
]
}
結果:
サイトのタイプが INSTANT_APP、AMP_BLUE_LINK などである。
"rows": [
{
"keys": [
"INSTANT_APP"
],
"clicks": 443024.0,
"impressions": 4109826.0,
"ctr": 0.10779629113251997,
"position": 1.088168452873674
},
{
"keys": [
"AMP_BLUE_LINK"
],
"clicks": 429887.0,
"impressions": 1.7090884E7,
"ctr": 0.025152999692701676,
"position": 7.313451603790653
},...
2 番目のクエリ:
ステップ 1 で見つけた検索での見え方のタイプと任意のディメンション(ページ、デバイスなど)でフィルタします。ここでは AMP_BLUE_LINK でフィルタします。
{
"startDate": "2018-05-01",
"endDate": "2018-05-31",
"type": "web",
"dimensions": [
"device" // and/or page, country, ...
],
"dimensionFilterGroups": [
{
"filters": [
{
"dimension": "searchAppearance",
"operator": "equals",
"expression": "AMP_BLUE_LINK"
}
]
}
]
}
結果:
デバイスタイプ別の AMP_BLUE_LINK の内訳。
"rows": [
{
"keys": [
"MOBILE"
],
"clicks": 429887.0,
"impressions": 1.7090783E7,
"ctr": 0.025153148337323107,
"position": 7.31339517914422
},
{
"keys": [
"DESKTOP"
],
"clicks": 0.0,
"impressions": 66.0,
"ctr": 0.0,
"position": 12.257575757575758
},
...
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2024-07-23 UTC。
[[["わかりやすい","easyToUnderstand","thumb-up"],["問題の解決に役立った","solvedMyProblem","thumb-up"],["その他","otherUp","thumb-up"]],[["必要な情報がない","missingTheInformationINeed","thumb-down"],["複雑すぎる / 手順が多すぎる","tooComplicatedTooManySteps","thumb-down"],["最新ではない","outOfDate","thumb-down"],["翻訳に関する問題","translationIssue","thumb-down"],["サンプル / コードに問題がある","samplesCodeIssue","thumb-down"],["その他","otherDown","thumb-down"]],["最終更新日 2024-07-23 UTC。"],[[["\u003cp\u003eQuery performance data daily for one day's worth of data to avoid exceeding quota and retrieve data for web, image, or video searches.\u003c/p\u003e\n"],["\u003cp\u003eChoose to group results by page or property, understanding that grouping by page with page/query dimensions may result in some data loss.\u003c/p\u003e\n"],["\u003cp\u003eSearch appearance data requires a two-step query process, first identifying search appearance types and then filtering by a specific type for detailed analysis.\u003c/p\u003e\n"],["\u003cp\u003eWhen grouping by page or property, metrics like impressions, clicks, and position are calculated differently, impacting the interpretation of results.\u003c/p\u003e\n"],["\u003cp\u003eTo retrieve comprehensive data, paginate through results by increasing the \u003ccode\u003estartRow\u003c/code\u003e value in subsequent queries until all rows are retrieved.\u003c/p\u003e\n"]]],["To retrieve performance data, run daily queries for one day's data, specifying search types (web, image, etc.) and dimensions (page, query, country, device). Choose to group by page or property. For detailed data (page/query), some data loss may occur. Page through results by incrementing `startRow`. To obtain search appearance data, first query for search appearance types, then query again, filtering by a specific type and desired dimensions. Daily queries must stay under 50K rows per search type.\n"],null,["# Getting your performance data\n\nYou can query your performance data quickly, and without exceeding your quota, by\nrunning a daily query for one day's worth of data.\n\nYou must choose what information you want in your data: which search types (web, image, video, etc.)\nand which dimensions (page, query, country, or device), as well as whether to\n[group results by page\nor property](https://support.google.com/webmasters/answer/7576553#urlorsite). When querying for page and/or query string, some data may be dropped ([*here's why*](#lose_data)).\n\nOverview\n--------\n\n1. We recommend running a query each day for one day's worth of data using one of the [query\n styles described below](#queries). Running a daily query for one day of data should not exceed your daily quota. Data is typically available after 2-3 days; you can learn what is the most recently available data by running a [simple query grouped by date](/webmaster-tools/v1/how-tos/search_analytics#verify--the-presence-of-data) for the past 10 days. In writing your query:\n - Choose whether to group results by page or property.\n - Choose whether you want more complete counts or more dimensions in your query. **Note:** search appearance data (AMP, blue link, rich result, and so on) must be queried using a [two-step process](#search-appearance-data).\n2. Page through results by re-running the same query, increasing the `startRow` value by 25,000 in the request until you reach the last page (a response with 0 rows).\n3. Optionally run the same query with another `type` parameter.\n\nHere is a pseudocode example for a single query. You can run this once per day [for each `type` value](/webmaster-tools/v1/searchanalytics/query#type) that you want data for. \n\n```carbon\nint maxRows = 25000; // Current max response size\nint i = 0;\ndo {\n response = Request(startDate = 3_days_ago,\n endDate = 3_days_ago,\n ... add dimensions, type ...\n rowLimit = maxRows,\n startRow = i * maxRows);\n i++;\n ... // Do something with the response data.\n} while (response.rows.count() != 0); // Page through all result rows\n```\n\nData limits\n-----------\n\nIn addition to [API usage quota, the Search Analytics method](/webmaster-tools/limits)\nexposes a maximum of 50K rows of data per day per search type (web, image, and so on--sorted\nby clicks).\n\nQuery details\n-------------\n\nYou can query data grouped by [page](#by_page) or [property](#by-property).\n\n### Grouped by page\n\n**For accurate counts,** you must omit the page and query dimensions, like this: \n\n```carbon\n\"startDate\": \"2018-06-01\",\n\"endDate\": \"2018-06-01\",\n\"dimensions\": [\"country\", \"device\"],\n\"type\": \"web\",\n\"aggregationType\": \"byPage\"\n```\n\n- `startDate` / `endDate`: Choose a one-day window by selecting the same date.\n- `dimensions`: Optionally include `country` and/or `device`.\n- `type`: Enumerate over [each `type` value](/webmaster-tools/v1/searchanalytics/query#type) as desired in a separate query.\n- `aggregationType`: Must be `byPage`.\n\n**For greater detail, including page and/or query information**, at the expense of losing some data, run a query like this: \n\n```carbon\n\"startDate\": \"2018-06-01\",\n\"endDate\": \"2018-06-01\",\n\"dimensions\": [\"page\", \"query\", \"country\", \"device\"],\n\"type\": \"web\"\n```\n\n- `startDate` / `endDate`: Choose a one-day window by selecting the same date.\n- `dimensions`: Include `page`. Optionally include any combination of `query`, `country`, or `device`.\n- `type`: Enumerate over [each `type` value](/webmaster-tools/v1/searchanalytics/query#type) as desired in a separate query.\n\n### Grouped by property\n\n**For accurate counts,** you must omit the page and query dimensions, like this: \n\n```carbon\n\"startDate\": \"2018-06-01\",\n\"endDate\": \"2018-06-01\",\n\"dimensions\": [\"country\", \"device\"],\n\"type\": \"web\"\n```\n\n- `startDate` / `endDate`: Choose a one-day window by selecting the same date.\n- `dimensions`: Optionally include `country` and/or `device`.\n- `type`: Optionally enumerate over [each `type` value](/webmaster-tools/v1/searchanalytics/query#type) as desired in a separate query.\n\n**For greater detail, including query, country, and/or device information**, at the expense of losing some data, run a query like this: \n\n```carbon\n\"startDate\": \"2018-06-01\",\n\"endDate\": \"2018-06-01\",\n\"dimensions\": [\"query\", \"country\", \"device\"],\n\"type\": \"web\"\n```\n\n- `startDate` / `endDate`: Choose a one-day window by selecting the same date.\n- `dimensions`: Optionally include any combination of `query`, `country`, or `device`.\n- `type`: Enumerate over [each `type` value](/webmaster-tools/v1/searchanalytics/query#type) as desired in a separate query.\n\nGrouping results by page or property\n------------------------------------\n\nImpressions, clicks, position, and click-through-rate are are calculated differently when grouping results by page rather than by property. [Learn more.](https://support.google.com/webmasters/answer/7576553#urlorsite)\n\nWhy do I lose data when asking for more detail?\n-----------------------------------------------\n\nWhen you group by page and/or query, our system may drop some data in order to be able to calculate results in a reasonable time using a reasonable amount of computing resources.\n\nGetting search appearance data\n------------------------------\n\nSearch appearance is not available as a column along with any other dimensions. Therefore, if you want to see search appearance information for your site, you must follow this process:\n\n1. Specify `searchAppearance` as the only dimension, which will group all data by search appearance type with no other dimensions.\n2. Optionally run a second query, filtering by one of the search appearance types listed in step 1, adding any desired dimensions to the query (page, country, query, etc).\n\nTo retrieve data about multiple search appearance types, you must run the second step once per search appearance type listed step 1.\n\n**First query:**\n\nGet list of search appearance types on your site. \n\n```carbon\n{\n \"startDate\": \"2018-05-01\",\n \"endDate\": \"2018-05-31\",\n \"type\": \"web\",\n \"dimensions\": [\n \"searchAppearance\"\n ]\n}\n```\n\n**Results:**\n\nYour site has type INSTANT_APP, AMP_BLUE_LINK, and so on. \n\n```scdoc\n \"rows\": [\n {\n \"keys\": [\n \"INSTANT_APP\"\n ],\n \"clicks\": 443024.0,\n \"impressions\": 4109826.0,\n \"ctr\": 0.10779629113251997,\n \"position\": 1.088168452873674\n },\n {\n \"keys\": [\n \"AMP_BLUE_LINK\"\n ],\n \"clicks\": 429887.0,\n \"impressions\": 1.7090884E7,\n \"ctr\": 0.025152999692701676,\n \"position\": 7.313451603790653\n },...\n```\n\n**Second query:**\n\nFilter by one of the search appearance types found in step 1, along with any dimensions that you like (page, device, etc). Here we filter by AMP_BLUE_LINK. \n\n```carbon\n{\n \"startDate\": \"2018-05-01\",\n \"endDate\": \"2018-05-31\",\n \"type\": \"web\",\n \"dimensions\": [\n \"device\" // and/or page, country, ...\n ],\n \"dimensionFilterGroups\": [\n {\n \"filters\": [\n {\n \"dimension\": \"searchAppearance\",\n \"operator\": \"equals\",\n \"expression\": \"AMP_BLUE_LINK\"\n }\n ]\n }\n ]\n}\n```\n\n**Results:**\n\nBreakdown of AMP_BLUE_LINK by device types. \n\n```text\n\"rows\": [\n {\n \"keys\": [\n \"MOBILE\"\n ],\n \"clicks\": 429887.0,\n \"impressions\": 1.7090783E7,\n \"ctr\": 0.025153148337323107,\n \"position\": 7.31339517914422\n },\n {\n \"keys\": [\n \"DESKTOP\"\n ],\n \"clicks\": 0.0,\n \"impressions\": 66.0,\n \"ctr\": 0.0,\n \"position\": 12.257575757575758\n },\n...\n```"]]