Places API (ใหม่) มีประสิทธิภาพที่ดียิ่งขึ้นและโมเดลการกำหนดราคาใหม่
จึงคุ้มค่าที่จะอัปเดตแอปที่ใช้ Places API (เดิม) ดูรายละเอียดเพิ่มเติมเกี่ยวกับการเปรียบเทียบฟีเจอร์ได้ที่เลือก API
ใช้คู่มือนี้เพื่อทำความเข้าใจความแตกต่างที่สำคัญระหว่าง Places API (ใหม่)
กับ Places API (เดิม) รวมถึงวิธีจัดการการเปลี่ยนแปลงที่จำเป็น
คำแนะนำนี้จะมีผลหากการใช้งาน API ของคุณสูงพอที่จะ
เปลี่ยนไปใช้การกำหนดราคาระดับที่ 2 เมื่อย้ายข้อมูลไปยัง API เวอร์ชันใหม่กว่า
ระบบจะเรียกเก็บเงินจากคุณสำหรับ SKU อื่นด้วย เราขอแนะนำให้เปลี่ยนไปใช้ API ใหม่ในเวอร์ชันที่ใช้งานจริงให้เร็วที่สุดเท่าที่จะเป็นไปได้ในช่วงต้นเดือน เพื่อหลีกเลี่ยงค่าใช้จ่ายที่เพิ่มขึ้นในเดือนที่คุณเปลี่ยน ซึ่งจะช่วยให้คุณเข้าถึงระดับราคาต่อเดือนที่คุ้มค่าที่สุด
ในเดือนที่ทำการย้ายข้อมูล ดูข้อมูลเกี่ยวกับระดับราคาได้ที่หน้าการกำหนดราคา
และคำถามที่พบบ่อยเกี่ยวกับการกำหนดราคา
เปิดใช้ Places API (ใหม่)
หากต้องการใช้ฟีเจอร์ของ Places API (ใหม่) คุณต้องเปิดใช้ Places API (ใหม่) ในโปรเจ็กต์ Google Cloud ก่อน โปรดดูข้อมูลเพิ่มเติมที่ตั้งค่าโปรเจ็กต์ Google Cloud
จากนั้นคุณต้องตรวจสอบว่าได้เพิ่ม Places API (ใหม่) ลงในคีย์ API ที่แอปใช้แล้ว ดูข้อมูลเพิ่มเติมได้ที่ใช้คีย์ API
การเปลี่ยนแปลงทั่วไป
การเปลี่ยนแปลงทั่วไปบางอย่างที่มีผลกับ API หลายรายการมีดังนี้
API ใหม่ทั้งหมดรองรับทั้ง
คีย์ API
และโทเค็น OAuth
เป็นกลไกการตรวจสอบสิทธิ์
รองรับเฉพาะ JSON เป็นรูปแบบการตอบกลับ
Place Details (ใหม่),
Nearby Search (ใหม่) และ Text Search (ใหม่)
กำหนดให้ต้องใช้การมาสก์ฟิลด์เพื่อระบุฟิลด์ที่ต้องการให้แสดงผลในการตอบกลับ ดูข้อมูลเพิ่มเติมได้ที่
FieldMask
[null,null,["อัปเดตล่าสุด 2025-08-29 UTC"],[],[],null,["# Migration overview\n\n**European Economic Area (EEA) developers** If your billing address is in the European Economic Area, effective on 8 July 2025, the [Google Maps Platform EEA Terms of Service](https://cloud.google.com/terms/maps-platform/eea) will apply to your use of the Services. Functionality varies by region. [Learn more](/maps/comms/eea/faq).\n\nIntroduction\n------------\n\nPlaces API (New) provides improved performance and a new pricing model,\nmaking it worthwhile to update apps that use the Places API (Legacy). For more\ndetails on comparing features, see [Choose your\nAPI](/maps/documentation/places/web-service/choose-api).\n\nUse this guide to understand key differences between Places API (New)\ncompared to Places API (Legacy), along with how to handle necessary changes.\n\n\nBilling best practices for migration\n------------------------------------\n\nwarning_amber\n\nThis guidance applies if your API usage is high enough to\nmove into second-tier pricing. When migrating to a newer version of an API,\nyou're also being billed for a different SKU. To avoid increased costs during the month of\nyour transition, we recommend switching to the new APIs in production as close to the\nbeginning of the month as possible. This will ensure that you reach the most cost-effective\nmonthly pricing tiers during the migration month. For information about pricing tiers,\nsee the [pricing page](/maps/billing-and-pricing/pricing)\nand the [pricing FAQ](/maps/billing-and-pricing/faq).\n\n\u003cbr /\u003e\n\nEnable Places API (New)\n-----------------------\n\nTo use the features of Places API (New), you must first enable\n**Places API (New)** in your Google Cloud project. For more\ninformation, see [Set up your Google Cloud\nproject](/maps/documentation/places/web-service/cloud-setup).\n\nYou then must ensure that you have added **Places API (New)** to the API\nkey used by your app. For more information, see [Use API\nKeys](/maps/documentation/places/web-service/get-api-key).\n| **Note:** If you are using both Places API (Legacy) and Places API (New), we recommend that you create a separate API key for each API version.\n\nGeneral changes\n---------------\n\nSome general changes that apply to multiple APIs include:\n\n- All new APIs support both [API keys](/maps/documentation/places/web-service/get-api-key) and [OAuth](/maps/documentation/places/web-service/oauth-token) tokens as the authentication mechanism.\n- Only JSON is supported as a response format.\n- Field masking is required by Place Details (New), Nearby Search (New), and Text Search (New) to specify which fields you want returned in the response. For more information, see [FieldMask](/maps/documentation/places/web-service/choose-fields).\n- The [Nearby Search (New)](/maps/documentation/places/web-service/nearby-search) and [Text Search (New)](/maps/documentation/places/web-service/text-search) APIs now return the full place details to match the place details returned by [Place Details (New)](/maps/documentation/places/web-service/place-details).\n- The JSON response format for the [Place Details (New)](/maps/documentation/places/web-service/place-details), [Nearby Search (New)](/maps/documentation/places/web-service/nearby-search), and [Text Search (New)](/maps/documentation/places/web-service/text-search) APIs has changed from the format of the existing APIs. For more details, see [Migrate the Places API response](/maps/documentation/places/web-service/migrate-response).\n\nAPI-specific changes\n--------------------\n\nThis section includes the following migration guides for each API:\n\n- [Migrate to Nearby Search (New)](/maps/documentation/places/web-service/migrate-nearby)\n- [Migrate to Text Search (New)](/maps/documentation/places/web-service/migrate-text)\n- [Migrate to Place Details (New)](/maps/documentation/places/web-service/migrate-details)\n- [Migrate to Place Photos (New)](/maps/documentation/places/web-service/migrate-photo)\n- [Migrate to Autocomplete (New)](/maps/documentation/places/web-service/migrate-autocomplete)"]]