সতর্কতা: আপনি API এর REST ইন্টারফেসের জন্য ডকুমেন্টেশন দেখছেন। আমাদের বেশিরভাগ অফিসিয়াল ক্লায়েন্ট লাইব্রেরি জিআরপিসি ব্যবহার করে। বিস্তারিত জানার জন্য REST ভূমিকা দেখুন।
সেভ করা পৃষ্ঠা গুছিয়ে রাখতে 'সংগ্রহ' ব্যবহার করুন
আপনার পছন্দ অনুযায়ী কন্টেন্ট সেভ করুন ও সঠিক বিভাগে রাখুন।
Google Ads API-এর REST ইন্টারফেস ব্যবহার করার সময়, আপনি Google Ads API-এর .proto বর্ণনাকারী ফাইলগুলিতে সংজ্ঞায়িত একই সংস্থান এবং প্রকারের JSON উপস্থাপনা নিয়ে কাজ করছেন। JSON এনকোডিং স্কিমটি প্রোটোকল বাফার ল্যাঙ্গুয়েজ গাইডেরJSON ম্যাপিং বিভাগে বর্ণিত ক্যানোনিকাল এনকোডিং স্কিম অনুসরণ করে।
সাধারণভাবে, পরিষেবাগুলিতে এবং থেকে আসা সমস্ত শীর্ষ-স্তরের বার্তাগুলি একক JSON অবজেক্ট। বেশিরভাগ মিউটেট অনুরোধে একটি operations অ্যারে থাকে যেটিতে অনেকগুলি create , update বা delete অপারেশন থাকে। একইভাবে, search প্রতিক্রিয়াগুলি হল JSON অবজেক্ট যাতে আপনার প্রশ্নের ফলাফল সেটের সাথে একটি results অ্যারে থাকে।
শনাক্তকারীগুলিকে snake_case (প্রটোকল বাফারে) থেকে JSON-এ LowerCamelCase- এ রূপান্তরিত করা হয়। Google Ads Query Language কোয়েরি পাঠানোর জন্য search বা searchStream ব্যবহার করার সময় এই নিয়মের একটি উল্লেখযোগ্য সতর্কতা। আপনি যে ইন্টারফেস ব্যবহার করছেন তা নির্বিশেষে ক্যোয়ারী ভাষা নিজেই স্নেক কেস ব্যবহার করে। যাইহোক, REST-এ একটি প্রশ্নের ফলাফল সাধারণ JSON অবজেক্ট হিসাবে ফেরত দেওয়া হয় এবং তাদের শনাক্তকারী LowerCamelCase-এ থাকে।
উদাহরণস্বরূপ, একটি অ্যাকাউন্টে সক্রিয় কীওয়ার্ডগুলির একটি তালিকা আনার জন্য একটি ক্যোয়ারী ক্যোয়ারীটির ভিতরেই স্নেক কেস ব্যবহার করে ( ad_group_criterion , adGroupCriterion নয় ):
POST/v21/customers/CUSTOMER_ID/googleAds:searchStreamHTTP/1.1Host:googleads.googleapis.comContent-Type:application/jsonAuthorization:Bearer ACCESS_TOKENdeveloper-token:DEVELOPER_TOKEN{"query":"SELECT ad_group_criterion.keyword.text FROM ad_group_criterion WHERE ad_group_criterion.type = 'KEYWORD' AND ad_group_criterion.status = 'ENABLED'"}
যাইহোক, প্রতিক্রিয়া হল বস্তুগুলির একটি JSON উপস্থাপনা (যেহেতু এই অনুরোধটি searchStream ব্যবহার করে একটি JSON অ্যারেতে মোড়ানো) এবং পরিবর্তে CamelCase শনাক্তকারী adGroupCriterion ব্যবহার করে:
[{"results":[{"adGroupCriterion":{"resourceName":"customers/1842689525/adGroupCriteria/55771861891~10003060","keyword":{"text":"pay per click"}}},...]}]
[[["সহজে বোঝা যায়","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"]],["2025-09-03 UTC-তে শেষবার আপডেট করা হয়েছে।"],[[["\u003cp\u003eThe Google Ads API's REST interface uses JSON to represent resources and types, following the protocol buffers' JSON encoding scheme.\u003c/p\u003e\n"],["\u003cp\u003eTop-level messages in the REST interface are JSON objects, with mutate requests typically containing an \u003ccode\u003eoperations\u003c/code\u003e array and search responses containing a \u003ccode\u003eresults\u003c/code\u003e array.\u003c/p\u003e\n"],["\u003cp\u003eIdentifiers are generally transformed from \u003cem\u003esnake_case\u003c/em\u003e to \u003cem\u003elowerCamelCase\u003c/em\u003e in JSON, with the exception of Google Ads Query Language queries, which use snake case.\u003c/p\u003e\n"],["\u003cp\u003eWhile Google Ads Query Language queries use snake case, the results returned through the REST interface utilize \u003cem\u003elowerCamelCase\u003c/em\u003e for identifiers within the JSON response objects.\u003c/p\u003e\n"]]],[],null,["# JSON Mappings\n\nWhen using the Google Ads API's REST interface, you're working with JSON\nrepresentations of the same resources and types defined in the Google Ads API's\n[.proto descriptor](https://github.com/googleapis/googleapis/tree/master/google/ads/googleads) files. The JSON encoding scheme follows the\ncanonical encoding scheme described in the\n[JSON Mapping](/protocol-buffers/docs/proto3#json) section of the protocol\nbuffers *Language Guide*.\n\nIn general, all top-level messages to and from\n[services](https://github.com/googleapis/googleapis/tree/master/google/ads/googleads/v21/services) are single JSON objects.\nMost mutate requests contain an `operations` array that itself contains many\n`create`, `update`, or `delete` operations. Similarly, `search` responses are\nJSON objects containing a `results` array with your query's result set.\n\nIdentifiers are transformed from *snake_case* (in protocol buffers) to\n*lowerCamelCase* in JSON. One notable caveat to this rule is when using\n`search` or `searchStream` to send [Google Ads Query Language](/google-ads/api/docs/query/overview)\nqueries. The query language itself uses snake case, regardless of which\ninterface you're using. However, the results of a query in REST are returned as\nnormal JSON objects and have their identifiers in lowerCamelCase.\n\nFor example, a query to fetch a list of active keywords in an account uses\nsnake case inside the query itself (`ad_group_criterion`, not `adGroupCriterion`): \n\n```http\nPOST /v21/customers/\u003cvar translate=\"no\"\u003eCUSTOMER_ID\u003c/var\u003e/googleAds:searchStream HTTP/1.1\nHost: googleads.googleapis.com\nContent-Type: application/json\nAuthorization: Bearer \u003cvar translate=\"no\"\u003eACCESS_TOKEN\u003c/var\u003e\ndeveloper-token: DEVELOPER_TOKEN\n\n{\n \"query\": \"SELECT ad_group_criterion.keyword.text\n FROM ad_group_criterion\n WHERE ad_group_criterion.type = 'KEYWORD'\n AND ad_group_criterion.status = 'ENABLED'\"\n}\n```\n\nHowever, the response is a JSON representation of the objects (wrapped in a JSON\narray since this request uses `searchStream`) and uses the camelCase identifier\n`adGroupCriterion` instead: \n\n```javascript\n[\n {\n \"results\": [\n {\n \"adGroupCriterion\": {\n \"resourceName\": \"customers/1842689525/adGroupCriteria/55771861891~10003060\",\n \"keyword\": {\n \"text\": \"pay per click\"\n }\n }\n },\n ...\n ]\n }\n]\n```"]]