קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
אפשר להשתמש ב-SearchAds360FieldService כדי לבקש באופן דינמי את הקטלוג של משאבים, שדות של משאבים, מפתחות פילוח ומדדים שזמינים בשיטות SearchAds360ServiceSearch ו-SearchStream. הקטלוג מספק מטא-נתונים שאפשר להשתמש בהם בלקוחות Search Ads 360 Reporting API כדי לאמת ולבנות הצהרות של שפת השאילתות של Search Ads 360.
דוגמה של בקשת HTTP ותשובה
הבקשה מורכבת מ-HTTP GET לשרת של Search Ads 360 Reporting API בכתובת ה-URL הבאה:
מדדים שזמינים לבחירה עם המשאב בפסקה FROM. השדה מאוכלס רק בשדות שבהם הערך של category הוא RESOURCE.
segments
מפתחות פלחים שאפשר לבחור עם המשאב בפסקה FROM.
הם מפלחים את המדדים שצוינו בשאילתה. השדה מאוכלס רק בשדות שבהם הערך של category הוא RESOURCE.
selectableWith
שדות שאפשר לבחור לצד שדה נתון, כשהם לא נמצאים בפסקה FROM. המאפיין הזה רלוונטי רק כשמזהים משאבים או פלחים שאפשר לבחור בשאילתה שבה הם לא נכללים במשאב שבסעיף FROM. לדוגמה, אם בוחרים את ad_group.id ו-segments.date מתוך ad_group, ורוצים לכלול מאפיינים מ-campaign, צריך לבדוק ש-segments.date נמצא במאפיין selectableWith בקמפיין, כי הוא נבחר לצד
השדה segments.date הקיים.
פרטי המטא-נתונים
אפשר לבקש את הקטלוג באמצעות SearchAds360FieldService ברמות הבאות:
משאב
לדוגמה, searchAds360Fields/campaign.
השדה של המשאב
לדוגמה, searchAds360Fields/campaign.name.
שדה פילוח
לדוגמה, searchAds360Fields/segments.ad_network_type.
[null,null,["עדכון אחרון: 2025-08-29 (שעון UTC)."],[[["\u003cp\u003eUse \u003ccode\u003eSearchAds360FieldService\u003c/code\u003e to dynamically retrieve metadata about resources, fields, segmentation keys, and metrics available in Search Ads 360 Reporting API.\u003c/p\u003e\n"],["\u003cp\u003eThis metadata helps in validating and constructing Search Ads 360 Query Language statements for use with the \u003ccode\u003eSearch\u003c/code\u003e and \u003ccode\u003eSearchStream\u003c/code\u003e methods.\u003c/p\u003e\n"],["\u003cp\u003eRequest the catalog for resources, resource fields, segmentation fields, and metrics using the specified URL structure.\u003c/p\u003e\n"],["\u003cp\u003eExplore the catalog metadata including \u003ccode\u003eattributeResources\u003c/code\u003e, \u003ccode\u003emetrics\u003c/code\u003e, \u003ccode\u003esegments\u003c/code\u003e, and \u003ccode\u003eselectableWith\u003c/code\u003e for query construction.\u003c/p\u003e\n"],["\u003cp\u003eUtilize the \u003ccode\u003esearch\u003c/code\u003e method of \u003ccode\u003eSearchAds360FieldService\u003c/code\u003e to query for specific field details using regular expressions or specific field names.\u003c/p\u003e\n"]]],["`SearchAds360FieldService` provides a dynamic catalog of resources, fields, segmentation keys, and metrics for `SearchAds360Service`. This service allows clients to validate and construct Search Ads 360 Query Language statements. The catalog can be requested via HTTP GET, for instance, `searchAds360Fields/ad_group`. Responses include `attributeResources`, `metrics`, `segments`, and `selectableWith`. You can also retrieve field details using a query to `searchAds360Fields:search`, allowing for filtering with regular expressions or specific field names.\n"],null,["# Resource Metadata\n\nYou can use [`SearchAds360FieldService`](/search-ads/reporting/api/reference/rpc/google.ads.searchads360.v0.services#google.ads.searchads360.v0.services.SearchAds360FieldService)\nto dynamically request the catalog for resources, resource's fields,\nsegmentation keys and metrics available in the [`SearchAds360Service`](/search-ads/reporting/api/reference/rpc/google.ads.searchads360.v0.services#searchads360service)\n`Search` and `SearchStream` methods. The catalog provides metadata that can be\nused by Search Ads 360 Reporting API clients for validation and construction of Search Ads 360\nQuery Language statements.\n\nSample HTTP request and response\n--------------------------------\n\n| **Note:** The example shows the underlying HTTP/JSON request as a guide, but you are strongly encouraged to use one of the [client libraries](/search-ads/reporting/client-libraries/client-libraries) based on [gRPC](//grpc.io) to submit your requests.\n\nThe request consists of an `HTTP GET` to the Search Ads 360 Reporting API server at the\nfollowing URL: \n\n https://searchads360.googleapis.com/v0/searchAds360Fields/{resource_or_field}\n\nThe following is an example of a request followed by the response returned from\n`SearchAds360FieldService` for **ad_group** resource:\n\n### Request\n\n https://searchads360.googleapis.com/v0/searchAds360Fields/ad_group\n\n### Response\n\n {\n \"resourceName\": \"searchAds360Fields/ad_group\",\n \"name\": \"ad_group\",\n \"category\": \"RESOURCE\",\n \"selectable\": false,\n \"filterable\": false,\n \"sortable\": false,\n \"selectableWith\": [\n \"campaign\",\n \"customer\",\n \"metrics.average_cpc\",\n \"segments.device\",\n ...\n ],\n \"attributeResources\": [\n \"customer\",\n \"campaign\"\n ],\n\n \"metrics\": [\n \"metrics.conversions\",\n \"metrics.search_budget_lost_impression_share\",\n \"metrics.average_cost\",\n \"metrics.clicks\",\n ...\n ],\n \"segments\": [\n \"segments.date\",\n \"segments.ad_network_type\",\n \"segments.device\",\n ...\n ]\n }\n\nFor this example, the important arrays are:\n\n`attributeResources`\n: Resources that can be implicitly joined to the resource in the `FROM`\n clause.\n\n`metrics`\n: Metrics that are available to be selected with the resource in the `FROM`\n clause. Only populated for fields where the `category` is `RESOURCE`.\n\n`segments`\n: Segment keys that can be selected with the resource in the `FROM` clause.\n These segment the metrics specified in the query. Only populated for fields\n where the `category` is `RESOURCE`.\n\n`selectableWith`\n: Fields that can be selected alongside a given field, when not in the `FROM`\n clause. This attribute is only relevant when identifying resources or segments\n that are able to be selected in a query where they are not included by the\n resource in the `FROM` clause. As an example, if you are selecting `ad_group.id`\n and `segments.date` from `ad_group`, and you want to include attributes from\n `campaign`, you would need to check that `segments.date` is in the\n `selectableWith` attribute for campaign, since it's being selected alongside the\n existing `segments.date` field.\n\nMetadata details\n----------------\n\nYou can request the catalog using the `SearchAds360FieldService` at these\nlevels:\n\nResource\n: For example, `searchAds360Fields/campaign`.\n\nResource's field\n: For example, `searchAds360Fields/campaign.name`.\n\nSegmentation field\n: For example, `searchAds360Fields/segments.ad_network_type`.\n\nMetric\n: For example, `searchAds360Fields/metrics.clicks`.\n\nUse a query to get field details\n--------------------------------\n\nIt is possible to get field details by sending a query to \n\n https://searchads360.googleapis.com/v0/searchAds360Fields:search\n\nExample 1: Using a regular expression. \n\n SELECT\n name,\n category,\n selectable,\n filterable,\n sortable,\n selectable_with,\n data_type,\n is_repeated\n WHERE name LIKE 'ad_group.%'\"\n\nExample 2: Querying specific fields, metrics or segments. \n\n SELECT\n name,\n category,\n selectable,\n filterable,\n sortable,\n selectable_with,\n data_type,\n is_repeated\n WHERE\n name IN (\n \"ad_group.id\",\n \"ad_group.name\",\n \"segments.date\",\n \"customer.id\",\n \"customer.manager\",\n \"metrics.clicks\"\n )"]]