সেভ করা পৃষ্ঠা গুছিয়ে রাখতে 'সংগ্রহ' ব্যবহার করুন
আপনার পছন্দ অনুযায়ী কন্টেন্ট সেভ করুন ও সঠিক বিভাগে রাখুন।
আপনি GoogleAdsFieldService ব্যবহার করতে পারেন যা GoogleAdsServiceঅনুসন্ধান এবং অনুসন্ধান স্ট্রীম পদ্ধতিতে উপলব্ধ সম্পদ, সম্পদের ক্ষেত্র, সেগমেন্টেশন কী এবং মেট্রিক্সের জন্য ক্যাটালগকে গতিশীলভাবে অনুরোধ করতে পারেন। ক্যাটালগ মেটাডেটা প্রদান করে যা Google Ads API ক্লায়েন্টরা Google Ads Query Language স্টেটমেন্টের যাচাইকরণ এবং নির্মাণের জন্য ব্যবহার করতে পারে।
নমুনা HTTP অনুরোধ এবং প্রতিক্রিয়া
অনুরোধে নিম্নলিখিত URL-এ Google Ads API সার্ভারে একটি HTTP GET রয়েছে:
FROM ধারায় সম্পদের সাথে নিহিতভাবে যুক্ত হতে পারে এমন সম্পদ।
metrics
FROM ক্লজে রিসোর্স সহ নির্বাচন করার জন্য উপলব্ধ মেট্রিক। শুধুমাত্র সেই ক্ষেত্রগুলির জন্য জনবহুল যেখানে categoryRESOURCE ।
segments
সেগমেন্ট কী যা FROM ক্লজের রিসোর্স দিয়ে নির্বাচন করা যেতে পারে। এই ক্যোয়ারীতে নির্দিষ্ট করা মেট্রিকগুলিকে সেগমেন্ট করে। শুধুমাত্র সেই ক্ষেত্রগুলির জন্য জনবহুল যেখানে categoryRESOURCE ।
selectableWith
যে ক্ষেত্রগুলি একটি প্রদত্ত ক্ষেত্রের পাশাপাশি নির্বাচন করা যেতে পারে, যখন FROM ক্লজে না থাকে৷ এই বৈশিষ্ট্যটি শুধুমাত্র প্রাসঙ্গিক যখন সম্পদ বা সেগমেন্টগুলি সনাক্ত করা যায় যেগুলি একটি প্রশ্নে নির্বাচন করা যেতে পারে যেখানে সেগুলি FROM ক্লজে সংস্থান দ্বারা অন্তর্ভুক্ত নয়৷ উদাহরণ স্বরূপ, যদি আমরা ad_group থেকে ad_group.id এবং segments.date নির্বাচন করি, এবং আমরা campaign থেকে বৈশিষ্ট্যগুলি অন্তর্ভুক্ত করতে চাই, তাহলে আমাদের চেক করতে হবে যে segments.date প্রচারাভিযানের জন্য selectableWith অ্যাট্রিবিউটে রয়েছে, যেহেতু এটি বিদ্যমান segments.date ক্ষেত্রের পাশাপাশি নির্বাচন করা হচ্ছে।
মেটাডেটা বিবরণ
আপনি এই স্তরে GoogleAdsFieldService ব্যবহার করে ক্যাটালগ অনুরোধ করতে পারেন:
[null,null,["2025-09-03 UTC-তে শেষবার আপডেট করা হয়েছে।"],[[["\u003cp\u003eUse \u003ccode\u003eGoogleAdsFieldService\u003c/code\u003e to retrieve metadata for resources, fields, segments, and metrics available in Google Ads API Search methods.\u003c/p\u003e\n"],["\u003cp\u003eThe catalog provides data for validation and Google Ads Query Language statement construction, useful for Google Ads API clients.\u003c/p\u003e\n"],["\u003cp\u003eRequest metadata details using resource, resource's field, segmentation field, or metric levels through \u003ccode\u003eGoogleAdsFieldService\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eImportant arrays include: \u003ccode\u003eattributeResources\u003c/code\u003e for implicit joins, \u003ccode\u003emetrics\u003c/code\u003e and \u003ccode\u003esegments\u003c/code\u003e available for selection, and \u003ccode\u003eselectableWith\u003c/code\u003e for fields selectable alongside others.\u003c/p\u003e\n"],["\u003cp\u003eWhile the example uses HTTP/JSON, using client libraries based on gRPC is recommended for submitting requests.\u003c/p\u003e\n"]]],[],null,["# Resource Metadata\n\nYou can use [`GoogleAdsFieldService`](/google-ads/api/reference/rpc/v21/GoogleAdsFieldService)\nto dynamically request the catalog for resources, resource's fields,\nsegmentation keys and metrics available in the\n[`GoogleAdsService`](/google-ads/api/reference/rpc/v21/GoogleAdsService) *Search* and\n*SearchStream* methods. The catalog provides metadata that can be used by\nGoogle Ads API clients for validation and construction of Google Ads Query 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](/google-ads/api/docs/client-libs) based on [gRPC](//grpc.io) to submit your requests.\n\nThe request consists of an `HTTP GET` to the Google Ads API server at the following\nURL: \n\n https://googleads.googleapis.com/v21/googleAdsFields/{resource_or_field}\n\nThe following example shows a request followed by the response returned from\n`GoogleAdsFieldService` for the **ad_group** resource:\n\n### Request\n\n https://googleads.googleapis.com/v21/googleAdsFields/ad_group\n\n### Response\n\n {\n \"resourceName\": \"googleAdsFields/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\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 we are selecting `ad_group.id`\n and `segments.date` from `ad_group`, and we want to include attributes from\n `campaign`, we would need to check that `segments.date` is in the\n `selectableWith` attribute for campaign, since it's being selected alongside\n the existing `segments.date` field.\n\nMetadata details\n----------------\n\nYou can request the catalog using the `GoogleAdsFieldService` at these levels:\n\nResource\n: For example, `googleAdsFields/campaign`.\n\nResource's field\n: For example, `googleAdsFields/campaign.name`.\n\nSegmentation field\n: For example, `googleAdsFields/segments.ad_network_type`.\n\nMetric\n: For example, `googleAdsFields/metrics.clicks`."]]