Google Ads API의 REST 인터페이스를 사용할 때는 Google Ads API의 .proto 설명자 파일에 정의된 동일한 리소스와 유형의 JSON 표현을 사용합니다. JSON 인코딩 스키마는 프로토콜 버퍼 언어 가이드의 JSON 매핑 섹션에 설명된 표준 인코딩 스키마를 따릅니다.
일반적으로 서비스와 주고받는 모든 최상위 메시지는 단일 JSON 객체입니다.
대부분의 변이 요청에는 많은 create, update 또는 delete 작업을 포함하는 operations 배열이 포함됩니다. 마찬가지로 search 응답은 질문의 결과 집합이 포함된 results 배열이 포함된 JSON 객체입니다.
식별자는 프로토콜 버퍼의 snake_case에서 JSON의 lowerCamelCase로 변환됩니다. 이 규칙의 한 가지 주목할 만한 예외는 search 또는 searchStream를 사용하여 Google Ads Query Language 쿼리를 전송하는 경우입니다. 쿼리 언어 자체는 사용 중인 인터페이스와 관계없이 스네이크 표기법을 사용합니다. 하지만 REST의 쿼리 결과는 일반 JSON 객체로 반환되며 식별자는 lowerCamelCase로 되어 있습니다.
예를 들어 계정에서 활성 키워드 목록을 가져오는 쿼리는 쿼리 자체 내에서 스네이크 케이스를 사용합니다 (ad_group_criterion, adGroupCriterion 아님).
POST/v20/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-07-13(UTC)"],[[["The Google Ads API's REST interface uses JSON to represent resources and types, following the protocol buffers' JSON encoding scheme."],["Top-level messages in the REST interface are JSON objects, with mutate requests typically containing an `operations` array and search responses containing a `results` array."],["Identifiers are generally transformed from *snake_case* to *lowerCamelCase* in JSON, with the exception of Google Ads Query Language queries, which use snake case."],["While Google Ads Query Language queries use snake case, the results returned through the REST interface utilize *lowerCamelCase* for identifiers within the JSON response objects."]]],[]]