Street View Publish API 總覽
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
簡介
本文件適用於想要編寫應用程式,讓使用者將 360 度相片上傳至 Google 街景服務,以便在 Google 地圖上公開顯示的開發人員。
事前準備
-
您需要 Google 帳戶才能存取 Google API 控制台、要求 API 金鑰,以及註冊應用程式。
-
在 Google 開發人員控制台中建立專案,並取得授權憑證,讓應用程式能夠提交 API 要求。
-
建立專案後,請確認 Street View Publish API 是應用程式註冊要使用的服務之一:
- 前往 API 控制台,然後選取剛註冊的專案。
- 請前往已啟用的 API 頁面。確認 Google Street View API 是否在已啟用 API 的清單中。如果不是,請開啟 API 程式庫並啟用 API。
-
如果您的應用程式會使用需要使用者授權的 API 方法,請參閱驗證指南,瞭解如何實作 OAuth 2.0 授權。
-
熟悉 JavaScript Object Notation (JSON) 資料格式的核心概念。JSON 是不受語言限制的常見開放標準,可提供簡單且人類可讀的資料文字呈現方式 (屬性與值組合)。詳情請參閱 json.org 網站。
-
請注意,相片必須包含 Photo Sphere XMP 中繼資料,才能發布。
1 分鐘快速體驗:APIs Explorer
如想試試看 API 可發揮哪些實用功能,但不想編寫任何程式碼,請造訪 APIs Explorer。現在就開始體驗吧!
快來親自體驗吧!
如需逐步教學課程,說明如何設定及執行方式,請按照這份指南中的指示操作。
參考資料
如要查詢特殊資源類型或方法,請參閱參考資料。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-08-29 (世界標準時間)。
[null,null,["上次更新時間:2025-08-29 (世界標準時間)。"],[[["\u003cp\u003eThis documentation guides developers on how to build applications enabling users to upload 360° photos to Google Street View for public viewing on Google Maps.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers need a Google Account, a project in the Google Developers Console with the Street View Publish API enabled, and potentially OAuth 2.0 authorization for user-specific actions.\u003c/p\u003e\n"],["\u003cp\u003ePhotos must contain specific metadata outlined in the Photo Sphere XMP Metadata documentation to be successfully published.\u003c/p\u003e\n"],["\u003cp\u003eThe API can be explored without coding through the provided APIs Explorer for immediate experimentation.\u003c/p\u003e\n"],["\u003cp\u003eA step-by-step tutorial and comprehensive reference materials are available for developers to quickly get started and delve deeper into specific functionalities.\u003c/p\u003e\n"]]],["Developers creating apps for uploading 360 photos to Google Street View must first create a Google Account and a project in the Google Developers Console to get authorization credentials. They need to enable the Street View Publish API in their project and, if needed, implement OAuth 2.0 for user authorization. Understanding JSON data format and adding Photo Sphere XMP Metadata to photos is crucial. Developers can experiment using the APIs Explorer or follow a tutorial guide.\n"],null,["# Street View Publish API Overview\n\nIntroduction\n------------\n\nThis document is intended for developers who want to write applications that allow users to upload 360 photos to Google Street View, so that they can be viewed publicly on Google Maps.\n\n### Before you start\n\n1. You need a [Google Account](https://www.google.com/accounts/NewAccount) to access the Google API Console, request an API key, and register your application.\n\n2. Create a project in the [Google Developers Console](https://console.developers.google.com) and obtain [authorization credentials](https://console.developers.google.com/apis/credentials) so your application can submit API requests.\n\n3. After creating your project, make sure the Street View Publish API is one of the services that your application is registered to use:\n\n \u003cbr /\u003e\n\n 1. Go to the [API Console](https://console.cloud.google.com/) and select the project that you just registered.\n 2. Visit the [Enabled APIs page](https://console.cloud.google.com/apis/enabled). Make sure that the Google Street View API is on the list of enabled APIs. If it isn't, then [open the API Library](https://console.cloud.google.com/apis/library) and enable the API.\n\n \u003cbr /\u003e\n\n4. If your application will use any API methods that require user authorization, read the [authentication](/streetview/publish/authorizing) guide to learn how to implement OAuth 2.0 authorization.\n\n5. Familiarize yourself with the core concepts of the JavaScript Object Notation (JSON) data format. JSON is a common, language-independent open standard that provides a simple, human-readable text representation of data (as attribute--value pairs). For more information, see [json.org](http://json.org).\n\n6. Remember your photos need the metadata described in [Photo Sphere XMP Metadata](/streetview/spherical-metadata) in order to be published.\n\nThe one-minute experience: APIs Explorer\n----------------------------------------\n\nTo play around and see what the API can do, without writing any code, visit\nthe [APIs Explorer](https://developers.google.com/apis-explorer/#p/streetviewpublish/v1/).\nInstant gratification!\n\nTry it yourself!\n----------------\n\nFor a step-by-step tutorial explaining how to get up and running, follow the instructions in [this guide](/streetview/publish/first-app).\n\nReference\n---------\n\nTo look up a particular resource type or method, see the [Reference](/streetview/publish/reference/rest).\n\nClient libraries\n----------------\n\nCheck out the available client [libraries](/streetview/publish/libraries)."]]