Membuat dan mengupload feed POI
Saat membuat dan mengupload feed POI, ikuti petunjuk berikut:
- Ikuti spesifikasi yang dijelaskan dalam feed POI
untuk file data POI. Sebaiknya gunakan nama file data POI unik untuk setiap upload. Sertakan stempel waktu dalam nama file, misalnya,
POI_1633621547.json. - Upload feed ke server SFTP POI lokal setiap hari sebagai refresh penuh.
- Anda dapat menemukan detail server SFTP di bagian Konfigurasi > Feed di Partner Portal.
- Melihat status penyerapan feed di bagian Penyerapan > Histori di Partner Portal.
Spesifikasi Feed
Persyaratan Bidang
VssPoi
Mewakili satu entitas Lokasi Menarik (POI), misalnya hotel atau restoran.
| Nama Kolom | Jenis | Persyaratan | Deskripsi |
|---|---|---|---|
poi_id | string | Wajib | Wajib. String yang dibuat oleh partner yang mengidentifikasi POI. |
name | object(Text) | Wajib | Wajib. Nama POI. |
telephone | string | Nomor telepon kontak POI termasuk kode negara dan area, misalnya +14567891234. | |
url | string | URL situs publik POI. Catatan: Ini hanya akan digunakan untuk tujuan pencocokan, bukan untuk ditampilkan. | |
location | object(GeoCoordinates) | Wajib | Wajib. Lokasi POI. |
display_address | object(Text) | Alamat yang ditampilkan di UI. | |
images | array object(Image) | Gambar POI. Jumlah maksimum gambar: 5. | |
rating | angka | Rating rata-rata untuk POI. | |
num_ratings | angka | Jumlah rating yang berkontribusi untuk kolom rating. | |
rating_scale | angka | Skala peringkat yang digunakan untuk kolom rating. Jika rating maks adalah 5, maka
rating_scale adalah 5. | |
category | enum(Category) | Wajib | Wajib. Mewakili kategori POI. |
description | object(Text) | Deskripsi tempat menarik. | |
| oneOf(additional_data) | Wajib | Hanya satu kolom dalam oneOf ini yang dapat ditetapkan. |
Teks
Merepresentasikan teks dengan pelokalan.
| Nama Kolom | Jenis | Persyaratan | Deskripsi |
|---|---|---|---|
localizations | array object(LocalizedString) | String yang dilokalkan. | |
default_locale | string | Lokalitas yang akan digunakan sebagai bahasa default harus ada dalam pelokalan. |
LocalizedString
Merepresentasikan string yang dilokalkan.
| Nama Kolom | Jenis | Persyaratan | Deskripsi |
|---|---|---|---|
locale | string | Tag bahasa teks, seperti "en", "en-US", atau "sr-Latn". | |
text | string | Teks dalam lokalitas yang ditentukan. |
GeoCoordinates
Data Geografis lokasi, termasuk lintang, bujur, dan alamat.
| Nama Kolom | Jenis | Persyaratan | Deskripsi |
|---|---|---|---|
latitude | angka | [-90, +90] derajat (inklusif). Wajib jika bujur ditetapkan, jika tidak, tidak wajib. | |
longitude | angka | [-180, +180] derajat (inklusif). Wajib jika lintang ditetapkan, jika tidak, bagus untuk dimiliki. | |
| oneOf(addresses) | Wajib | Hanya satu kolom dalam oneOf ini yang dapat ditetapkan. |
PostalAddress
Alamat pos untuk lokasi.
| Nama Kolom | Jenis | Persyaratan | Deskripsi |
|---|---|---|---|
country | string | Wajib | Wajib. Negara, menggunakan kode negara ISO 3166-1 alpha-2, misalnya "US". |
locality | string | Wajib | Wajib. Lokalitas/kota, misalnya "Mountain View". |
region | string | Wilayah/negara bagian/provinsi, misalnya "CA". Kolom ini hanya wajib diisi di negara-negara tempat wilayah biasanya merupakan bagian dari alamat. (opsional) | |
postal_code | string | Wajib | Wajib. Kode pos, mis., "94043". |
street_address | string | Wajib | Wajib. Alamat, mis., "1600 Amphitheater Pkwy". |
Gambar
Mewakili gambar Lokasi Menarik (POI).
| Nama Kolom | Jenis | Persyaratan | Deskripsi |
|---|---|---|---|
url | string | URL gambar. Google akan meng-crawl media yang dihosting di URL ini. Panjang maksimum: 2000. | |
alt_text | object(Text) | Teks alternatif yang akan digunakan untuk aksesibilitas. |
HotelData
Data feed khusus hotel.
| Nama Kolom | Jenis | Persyaratan | Deskripsi |
|---|---|---|---|
hotel_star_class | angka | Nilai bintang kelas hotel resmi. Dapat digunakan dalam label seperti "hotel bintang 5". Nilai ini diharapkan berupa bilangan bulat antara 1 dan 5. | |
brand_ids | array string | Merek yang dapat menampilkan hotel ini. Jika kolom ini kosong, hotel dapat ditampilkan di bawah merek mana pun yang terkait dengan feed. |
LocalData
Data feed khusus perusahaan.
| Nama Kolom | Jenis | Persyaratan | Deskripsi |
|---|---|---|---|
business_hours | object(BusinessHours) | Jam buka reguler tempat usaha. | |
price_range | object(PriceRange) | Rentang harga layanan yang ditawarkan oleh tempat usaha. | |
establishment_category | object(Text) | Jenis tempat usaha. | |
brand_landing_pages | array object(BrandLandingPages) | Halaman landing merek. |
BusinessHours
Merepresentasikan jangka waktu operasional lokasi ini. Menyimpan kumpulan instance [TimeRange][madden.vss_poi_feed.TimeRange] . Contoh: Buka pada hari Sabtu dari pukul 09.00-12.00 dan 13.00-17.00: time_ranges { open_day: SATURDAY open_time: { hours: 9, minutes: 0 } close_day: SATURDAY close_time: { hours: 12, minutes: 0 } } time_ranges { open_day: SATURDAY open_time: { hours: 13, minutes: 0 } close_day: SATURDAY close_time: { hours: 17, minutes: 0 } } Contoh: Buka pada hari Sabtu dari pukul 21.00 hingga Minggu pukul 02.00: time_ranges { open_day: SATURDAY open_time: { hours: 21, minutes: 0 } close_day: SUNDAY close_time: { hours: 2, minutes: 0 } }
| Nama Kolom | Jenis | Persyaratan | Deskripsi |
|---|---|---|---|
time_ranges | array object(TimeRange) | Kumpulan waktu operasional LPI ini. Setiap jangka waktu merepresentasikan rentang jam buka LPI selama seminggu. |
TimeRange
Merepresentasikan rentang waktu buka PAI, yang dimulai pada hari/waktu buka yang ditentukan dan ditutup pada hari/waktu tutup yang ditentukan. Waktu tutup harus terjadi setelah jam buka, misalnya di kemudian waktu di hari yang sama atau di hari berikutnya.
| Nama Kolom | Jenis | Persyaratan | Deskripsi |
|---|---|---|---|
open_day | enum(DayOfWeek) | Hari buka rentang waktu. | |
open_time | object(TimeOfDay) | Waktu buka rentang waktu. | |
close_day | enum(DayOfWeek) | Hari penutupan rentang waktu. | |
close_time | object(TimeOfDay) | Waktu tutup rentang waktu. |
TimeOfDay
| Nama Kolom | Jenis | Persyaratan | Deskripsi |
|---|---|---|---|
hours | angka | Jam dalam format 24 jam. Harus lebih besar dari atau sama dengan 0 dan biasanya harus kurang dari atau sama dengan 23. API dapat memilih untuk mengizinkan nilai "24:00:00" untuk skenario seperti waktu tutup bisnis. | |
minutes | angka | Menit dalam satu jam. Harus lebih besar dari atau sama dengan 0 dan kurang dari atau sama dengan 59. | |
seconds | angka | Detik dalam satu menit. Harus lebih besar dari atau sama dengan 0 dan biasanya harus kurang dari atau sama dengan 59. API dapat mengizinkan nilai 60 jika memungkinkan detik kabisat. | |
nanos | angka | Pecahan detik, dalam nanodetik. Harus lebih besar dari atau sama dengan 0 dan kurang dari atau sama dengan 999.999.999. |
PriceRange
Rentang harga layanan yang ditawarkan oleh POI.
| Nama Kolom | Jenis | Persyaratan | Deskripsi |
|---|---|---|---|
min_price | object(Money) | Harga minimum layanan yang ditawarkan oleh POI. | |
max_price | object(Money) | Harga maksimum layanan yang ditawarkan oleh POI. |
Uang
Mewakili jumlah uang dengan jenis mata uangnya.
| Nama Kolom | Jenis | Persyaratan | Deskripsi |
|---|---|---|---|
currency_code | string | Kode mata uang tiga huruf yang ditentukan dalam ISO 4217. | |
units | angka | Seluruh unit jumlahnya.
Misalnya, jika currencyCode adalah "USD", maka 1 unit adalah satu dolar AS. | |
nanos | angka | Jumlah unit nano (10^-9) dari jumlah.
Nilainya harus antara -999.999.999 dan +999.999.999 inklusif.
Jika units positif, nanos harus positif atau nol.
Jika units nol, nanos dapat positif, nol, atau negatif.
Jika units negatif, nanos harus negatif atau nol.
Misalnya $-1,75 direpresentasikan sebagai units=-1 dan nanos=-750.000.000. |
BrandLandingPages
Halaman landing merek yang dilokalkan untuk satu Lokasi Menarik (POI).
| Nama Kolom | Jenis | Persyaratan | Deskripsi |
|---|---|---|---|
brand_id | string | Brand tempat konfigurasi ini diterapkan. | |
localized_landing_pages | array object(LocalizedLandingPage) | Halaman landing yang dilokalkan. Nilai kolom URL dan lokalitas harus unik di semua halaman landing yang dilokalkan. | |
default_url | string | URL halaman landing default yang akan digunakan jika tidak ada halaman landing yang dilokalkan yang cocok dengan bahasa pengguna. |
LocalizedLandingPage
Halaman landing yang dilokalkan untuk Lokasi Menarik (POI).
| Nama Kolom | Jenis | Persyaratan | Deskripsi |
|---|---|---|---|
url | string | URL halaman landing. Panjang maksimum: 2000. | |
locales | array string | Membatasi halaman ini untuk pengguna dengan preferensi bahasa yang ditentukan. Harus berisi tag bahasa, seperti "en", "en-US", atau "sr-Latn". |
Kategori
Mewakili kategori POI.
Kolom ini harus cocok dengan kolom oneof additional_data di bawah.
| Nama | Deskripsi |
|---|---|
UNKNOWN_CATEGORY | |
HOTEL | |
LOCAL |
DayOfWeek
Mewakili hari dalam seminggu.
| Nama | Deskripsi |
|---|---|
DAY_OF_WEEK_UNSPECIFIED | Hari dalam seminggu tidak ditentukan. |
MONDAY | Senin |
TUESDAY | Selasa |
WEDNESDAY | Rabu |
THURSDAY | Kamis |
FRIDAY | Jumat |
SATURDAY | Sabtu |
SUNDAY | Minggu |
additional_data
Wajib. Kolom khusus kategori.
Kolom ini harus sama dengan kolom category di atas.
| Nama Kolom | Jenis | Persyaratan | Deskripsi |
|---|---|---|---|
hotel_data | object(HotelData) | Tidak dapat muncul bersamaan dengan | Kolom spesifik hotel. |
local_data | object(LocalData) | Tidak dapat muncul bersamaan dengan | Kolom spesifik lokal. |
alamat
Wajib. Alamat untuk lokasi.
| Nama Kolom | Jenis | Persyaratan | Deskripsi |
|---|---|---|---|
address | object(PostalAddress) | Alamat pos lokasi. |
- Format: Harus berupa JPEG, PNG, atau WebP.
- Ukuran File Maksimum: Di bawah 30 MB per gambar.
- Dimensi Maksimum: Total kurang dari 75 Megapiksel (lebar x tinggi < 75.000.000).
- Jenis URL: Jalur langsung ke aset gambar (misalnya, diakhiri dengan .jpg).
- Izin: Pastikan server hosting mengizinkan akses ke Googlebot atau Crawler dan tidak memiliki robots.txt yang memblokir direktori gambar.
Definisi
Definisi VssPoiFeed
// Represents a Point of Interest (POI) data feed provided by a partner. export message VssPoiFeed { // The POIs in the feed. repeated VssPoi data = 1; }
Definisi VssPoi
// Represents a single Point of Interest (POI) entity e.g. a hotel or // restaurant. export message VssPoi { // Required. A string generated by the partner that identifies a POI. string poi_id = 1; // The entity name, telephone, url and location are used to support // matching partner inventory with entities already present on Google. // Required. The name of the POI. Text name = 2; // The contact telephone number of the POI including its country and // area codes, e.g. +14567891234. string telephone = 3 [(datapol.semantic_type) = ST_PHONE_NUMBER]; // The url of the POI's public website. // Note: This will be used just for matching purposes, not for display. string url = 4; // Required. The location of the POI. GeoCoordinates location = 5; // The address displayed on the UI. Text display_address = 17; // Images of the POI. // Max number of images: 5. repeated Image images = 6; // Average rating for the POI. float rating = 12; // The number of contributing ratings for the `rating` field. int64 num_ratings = 13; // The rating scale used for the `rating` field. If max rating is 5, then // rating_scale is 5. int32 rating_scale = 14; // Represents the category of the POI. // It should match the `additional_data` oneof field below. export enum Category { LOCAL = 4; } // Required. Represents the category of the POI. Category category = 9; // A description of the POI. Text description = 16; // Required. Category specific fields. // It should match the `category` field above. oneof additional_data { // Local specific fields. LocalData local_data = 15; } }
Definisi Text
// Represents a text with localizations. message Text { // Represents a localized string. message LocalizedString { // The text's language tag, such as "en", "en-US" or "sr-Latn". string locale = 1; // The text in the specified locale. string text = 2; } // The localized strings. repeated LocalizedString localizations = 1; // The locale to use as the default language it must be present in the // localizations. string default_locale = 2; }
Definisi GeoCoordinates
// The Geo data of a location, including latitude, longitude, and address. message GeoCoordinates { option (datapol.msg_semantic_type) = ST_LOCATION; // [-90, +90] degrees (inclusive). // Required if longitude is set, otherwise nice to have. double latitude = 1; // [-180, +180] degrees (inclusive). // Required if latitude is set, otherwise nice to have. double longitude = 2; // Required. Address for a location. oneof addresses { // Postal address of the location. PostalAddress address = 3; } }
Definisi PostalAddress
// The postal address for the location. message PostalAddress { option (datapol.msg_semantic_type) = ST_LOCATION; // Required. The country, using ISO 3166-1 alpha-2 country code, e.g. "US". string country = 1; // Required. The locality/city, e.g. "Mountain View". string locality = 2; // The region/state/province, e.g. "CA". This field is only required in // countries where region is commonly a part of the address. (optional) string region = 3; // Required. The postal code, e.g. "94043". string postal_code = 4; // Required. The street address, e.g. "1600 Amphitheatre Pkwy". string street_address = 5; }
Definisi Gambar
// Represents an image of the Point of Interest (POI). export message Image { // The url of the image. Google will crawl the media hosted at this URL. // Max length: 2000. string url = 1; // The alternative text to be used for accessibility. Text alt_text = 2; }
Definisi LocalData
// Establishment specific feed data. message LocalData { // The regular business hours of the establishment. BusinessHours business_hours = 1; // Price range of the services offered by the establishment. PriceRange price_range = 2; // The type of establishment. Text establishment_category = 3; // The brand landing pages. repeated BrandLandingPages brand_landing_pages = 4; }
Definisi BrandLandingPages
// The Localized brand landing pages for a single Point of Interest (POI). message BrandLandingPages { // The brand this configuration applies to. string brand_id = 1 [(datapol.semantic_type) = ST_PARTNER_ID]; // Localized landing page for the Point of Interest (POI). message LocalizedLandingPage { // The url of the landing page. // Max length: 2000. string url = 1; // Restricts this page to users with the specified language preference. // Must contain language tags, such as "en", "en-US" or "sr-Latn". repeated string locales = 3; } // The localized landing pages. // The url and locales fields values must be unique across all the localized // landing pages. repeated LocalizedLandingPage localized_landing_pages = 2; // The default landing page url to be used when none of the localized // landing pages matches the user's language. string default_url = 3; }
Contoh
Feed Lokasi Menarik
Nama file: poi_1707240000.json
{ "data": [ { "poi_id": "test_restaurant_1", "name": { "localizations": [ { "locale": "en", "text": "Tasty Bites Test Restaurant" } ], "default_locale": "en" }, "telephone": "+1234567890", "url": "https://www.tastybitestest.com", "location": { "latitude": 37.422, "longitude": -122.084, "address": { "country": "US", "locality": "Mountain View", "postal_code": "94043", "street_address": "1600 Amphitheatre Pkwy" } }, "display_address": { "localizations": [ { "locale": "en", "text": "1600 Amphitheatre Pkwy, Mountain View, CA 94043" } ], "default_locale": "en" }, "images": [ { "url": "https://www.tastybitestest.com/images/interior.jpg", "alt_text": { "localizations": [ { "locale": "en", "text": "Cozy dining area of Tasty Bites" } ], "default_locale": "en" } } ], "rating": 4.7, "num_ratings": 150, "rating_scale": 5, "category": "LOCAL", "description": { "localizations": [ { "locale": "en", "text": "A mock restaurant for testing the POI feed ingestion." } ], "default_locale": "en" }, "local_data": { "establishment_category": { "localizations": [ { "locale": "en", "text": "Restaurant" } ], "default_locale": "en" }, "price_range": { "min_price": { "currency_code": "USD", "units": 15, "nanos": 0 }, "max_price": { "currency_code": "USD", "units": 45, "nanos": 0 } }, "business_hours": { "time_ranges": [ { "open_day": "MONDAY", "open_time": { "hours": 11, "minutes": 0 }, "close_day": "MONDAY", "close_time": { "hours": 21, "minutes": 0 } }, { "open_day": "TUESDAY", "open_time": { "hours": 11, "minutes": 0 }, "close_day": "TUESDAY", "close_time": { "hours": 21, "minutes": 0 } }, { "open_day": "WEDNESDAY", "open_time": { "hours": 11, "minutes": 0 }, "close_day": "WEDNESDAY", "close_time": { "hours": 21, "minutes": 0 } }, { "open_day": "THURSDAY", "open_time": { "hours": 11, "minutes": 0 }, "close_day": "THURSDAY", "close_time": { "hours": 22, "minutes": 0 } }, { "open_day": "FRIDAY", "open_time": { "hours": 11, "minutes": 0 }, "close_day": "FRIDAY", "close_time": { "hours": 23, "minutes": 0 } }, { "open_day": "SATURDAY", "open_time": { "hours": 10, "minutes": 0 }, "close_day": "SATURDAY", "close_time": { "hours": 23, "minutes": 0 } }, { "open_day": "SUNDAY", "open_time": { "hours": 10, "minutes": 0 }, "close_day": "SUNDAY", "close_time": { "hours": 20, "minutes": 0 } } ] }, "brand_landing_pages": [ { "brand_id": "tasty_bites_brand", "localized_landing_pages": [ { "url": "https://www.tastybitestest.com/en", "locales": ["en-US", "en-GB"] } ], "default_url": "https://www.tastybitestest.com" }, { "brand_id": "delicious_eats_brand", "localized_landing_pages": [ { "url": "https://www.deliciouseats.com/en", "locales": ["en-US", "en-GB"] } ], "default_url": "https://www.deliciouseats.com" } ] } } ] }
Feed POI Multibahasa
Nama file: poi_multilingual.json
{ "data": [ { "poi_id": "test_restaurant_1", "name": { "localizations": [ { "locale": "en", "text": "Tasty Bites Test Restaurant" }, { "locale": "fr", "text": "Restaurant de test Tasty Bites" } ], "default_locale": "en" }, "telephone": "+1234567890", "url": "https://www.tastybitestest.com", "location": { "latitude": 37.422, "longitude": -122.084, "address": { "country": "US", "locality": "Mountain View", "postal_code": "94043", "street_address": "1600 Amphitheatre Pkwy" } }, "display_address": { "localizations": [ { "locale": "en", "text": "1600 Amphitheatre Pkwy, Mountain View, CA 94043" }, { "locale": "fr", "text": "1600 Amphitheatre Pkwy, Mountain View, CA 94043" } ], "default_locale": "en" }, "images": [ { "url": "https://www.tastybitestest.com/images/interior.jpg", "alt_text": { "localizations": [ { "locale": "en", "text": "Cozy dining area of Tasty Bites" }, { "locale": "fr", "text": "Espace salle à manger accueillant de Tasty Bites" } ], "default_locale": "en" } } ], "rating": 4.7, "num_ratings": 150, "rating_scale": 5, "category": "LOCAL", "description": { "localizations": [ { "locale": "en", "text": "A mock restaurant for testing the POI feed ingestion." }, { "locale": "fr", "text": "Un faux restaurant pour tester l'ingestion de flux de points d'intérêt." } ], "default_locale": "en" }, "local_data": { "establishment_category": { "localizations": [ { "locale": "en", "text": "Restaurant" }, { "locale": "fr", "text": "Restaurant" } ], "default_locale": "en" }, "price_range": { "min_price": { "currency_code": "USD", "units": 15, "nanos": 0 }, "max_price": { "currency_code": "USD", "units": 45, "nanos": 0 } }, "business_hours": { "time_ranges": [ { "open_day": "MONDAY", "open_time": { "hours": 11, "minutes": 0 }, "close_day": "MONDAY", "close_time": { "hours": 21, "minutes": 0 } }, { "open_day": "TUESDAY", "open_time": { "hours": 11, "minutes": 0 }, "close_day": "TUESDAY", "close_time": { "hours": 21, "minutes": 0 } }, { "open_day": "WEDNESDAY", "open_time": { "hours": 11, "minutes": 0 }, "close_day": "WEDNESDAY", "close_time": { "hours": 21, "minutes": 0 } }, { "open_day": "THURSDAY", "open_time": { "hours": 11, "minutes": 0 }, "close_day": "THURSDAY", "close_time": { "hours": 22, "minutes": 0 } }, { "open_day": "FRIDAY", "open_time": { "hours": 11, "minutes": 0 }, "close_day": "FRIDAY", "close_time": { "hours": 23, "minutes": 0 } }, { "open_day": "SATURDAY", "open_time": { "hours": 10, "minutes": 0 }, "close_day": "SATURDAY", "close_time": { "hours": 23, "minutes": 0 } }, { "open_day": "SUNDAY", "open_time": { "hours": 10, "minutes": 0 }, "close_day": "SUNDAY", "close_time": { "hours": 20, "minutes": 0 } } ] }, "brand_landing_pages": [ { "brand_id": "tasty_bites_brand", "localized_landing_pages": [ { "url": "https://www.tastybitestest.com/fr", "locales": ["fr-FR", "fr-CA"] }, { "url": "https://www.tastybitestest.com/en", "locales": ["en-US", "en-GB"] } ], "default_url": "https://www.tastybitestest.com" }, { "brand_id": "delicious_eats_brand", "localized_landing_pages": [ { "url": "https://www.deliciouseats.com/fr", "locales": ["fr-FR", "fr-CA"] }, { "url": "https://www.deliciouseats.com/en", "locales": ["en-US", "en-GB"] } ], "default_url": "https://www.deliciouseats.com" } ] } } ] }