You are viewing documentation for the API's REST interface. Most of our official client libraries use gRPC.
อินเทอร์เฟซ REST
คุณจะเรียกใช้ Google Ads API ได้โดยใช้ gRPC หรือ REST อินเทอร์เฟซทั้ง 2 แบบแสดงการออกแบบที่มุ่งเน้นทรัพยากรซึ่งแชร์กับ Google Cloud API อื่นๆ
เราขอแนะนำให้ใช้ไลบรารีของไคลเอ็นต์อย่างเป็นทางการของ Google เมื่อเป็นไปได้ โดยจัดเตรียมโค้ดที่ใช้สำนวนโวหารและปลอดภัยในแต่ละภาษาที่รองรับ รวมถึงจัดการรายละเอียดระดับต่ำจำนวนมากสำหรับการสื่อสารด้วย API (เช่น การตั้งค่าระยะหมดเวลา การใส่เลขหน้าของชุดผลลัพธ์ และการตรวจสอบสิทธิ์) ไลบรารีไคลเอ็นต์ของเรายังมีชุดตัวอย่างโค้ดและยูทิลิตีจำนวนมากที่ช่วยสำหรับงานทั่วไป เช่น การสร้างชื่อทรัพยากรและการจัดการมาสก์ของช่อง
คู่มือนี้แสดงรายละเอียดเฉพาะสำหรับ REST และอธิบายสิ่งที่คุณจำเป็นต้องทราบในการเรียกใช้อินเทอร์เฟซ REST โดยตรง โดยไม่ต้องใช้ไลบรารีของไคลเอ็นต์ที่ Google รองรับ คู่มือนี้อาจมีประโยชน์หากคุณเขียนโค้ดที่กําหนดเองของคุณเองเพื่อใช้ REST โดยตรงหรือใช้ไลบรารีของไคลเอ็นต์ HTTP ของบุคคลที่สาม
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-03-12 UTC
[null,null,["อัปเดตล่าสุด 2025-03-12 UTC"],[[["Google Ads API can be accessed using either gRPC or REST, with gRPC being the recommended method for interacting with the API."],["Official Google client libraries, built on gRPC (except for Perl which uses REST), are strongly encouraged for ease of use and handling low-level communication details."],["This guide focuses on using the REST interface directly, primarily for users building custom solutions or using third-party HTTP client libraries."],["Client libraries provide benefits like idiomatic code, type safety, pagination handling, authentication, and access to code examples and utilities for common tasks."]]],["The Google Ads API utilizes gRPC or REST interfaces, sharing a resource-oriented design. Using Google's client libraries is highly recommended for type-safe code, handling communication details like timeouts, pagination, and authentication. The official client libraries use gRPC, except for the Perl library, which uses REST. This guide details using REST directly without client libraries, useful for custom code or third-party HTTP clients. It focuses on information outside of what the official client libraries cover.\n"]]