このページでは、スポット(POI)フィードの技術仕様について詳しく説明します。これには、必須フィールドの概要、包括的なスキーマ定義、実装をガイドする JSON サンプルが含まれています。
フィードの詳細
このセクションでは、POI フィードの要件と定義について説明します。
フィールドの要件
| フィールド名 | 要件 | 説明 |
|---|---|---|
| poi_id | 必須 | パートナーが生成した、スポット(宿泊施設)を識別する文字列。 |
| name | 必須 | POI の名前。この名前は、アグリゲータ ユニットのプロパティの表示名として使用されます。 |
| 電話 | 推奨 | POI の連絡先電話番号(国コードと市外局番を含む。例: +14567891234)。 |
| URL | 推奨 | POI の公開ウェブサイトの URL。注: これはマッチングの目的でのみ使用され、表示はされません。 |
| ロケーション | 必須(住所) 推奨(緯度 / 経度) |
POI の場所。 必須: 宿泊施設を適切に照合するために、住所と付随するフィールドが必要です。 推奨: 緯度と経度。指定されている場合、Google はアグリゲーター ユニットの地図に宿泊施設のピンを表示する際に緯度と経度を使用します。 |
| 画像 | 必須(1 枚の画像) 推奨(複数) |
POI の画像。画像は、宿泊施設の表示において重要な役割を果たします。1 枚以上の画像を追加することを強くおすすめします。複数の画像(最大 5 枚)を指定できます。複数の画像が指定されている場合は、指定された順に使用されます(画像が使用できない場合)。 画像は、Google のセーフサーチ ポリシーに違反していないことを確認するために審査されます。 |
| 評価 | 推奨 | 宿泊施設の平均評価。 |
| num_ratings | 推奨 | rating フィールドの評価に寄与した評価の数。 |
| rating_scale | 推奨 | rating フィールドに使用される段階別評価。最高評価が 5 の場合、rating_scale は 5 になります。 |
| category | 推奨 | プロパティのカテゴリを表します。 |
| hotel_data | 推奨 | ホテル固有のフィールド。詳しくは、HotelData の定義をご覧ください。 |
| hotel_star_class | 推奨 | 公式のホテルクラスの星の値。この値は 0 ~ 5 の整数にする必要があります。システムで半星または小数値(3.5 など)を使用している場合は、整数(3)に切り捨てます。星クラスが利用できない、不明、または指定されていない場合は、値 0 を指定してください。0 に設定すると、ホテルの星クラスは UI に表示されません。 |
| brand_landing_pages | 省略可 | hotel_data の宿泊施設のブランド固有のランディング ページ。各エントリには、[設定] > [ブランド] で構成されたブランドに一致する brand_id、default_url、オプションの localized_landing_pages を指定します。詳しくは、BrandLandingPages の定義をご覧ください。 |
| brand_ids | 非推奨 | 非推奨。代わりに brand_landing_pages を使用してください。このホテルを表示できるブランド。このフィールドが空の場合、ホテルはフィードに関連付けられているいずれかのブランドで表示されます。 |
| 説明 | 推奨 | 宿泊施設の詳細な説明。 |
| display_address | 推奨 | UI に表示されるアドレス。 |
画像に関するガイドライン
フィードに追加するすべての画像は、次のガイドラインに沿っている必要があります。
- 形式: JPEG、PNG、WebP のいずれか。
- 最大ファイルサイズ: 画像 1 枚あたり 30 MB 未満。
- 最大サイズ: 合計 75 メガピクセル未満(幅 × 高さ < 75,000,000)。
- URL の種類: 画像アセットへの直接パス(例: .jpg で終わる)。
- 権限: ホスティング サーバーと
robots.txtファイルがGooglebotユーザー エージェントとGooglebot-Imageユーザー エージェントへのアクセスを許可し、画像ディレクトリをブロックしていないことを確認します。
多言語のサポート
Point of Interest フィードでは、特定のフィールドにローカライズされたコンテンツを提供できます。次のフィールドは Text 型で、ローカライズをサポートしています。
namedescriptiondisplay_address
複数の言語でコンテンツを提供するには、フィールドに default_locale を指定し、localizations リストにローカライズされた文字列を指定する必要があります。宿泊施設のすべてのローカライズを 1 つの POI エントリで提供します。1 つのプロパティを複数の言語の JSON ファイルに分割しないでください。
例:
"name": {
"localizations": [
{
"locale": "en",
"text": "Banana Hotel"
},
{
"locale": "es",
"text": "Hotel Plátano"
}
],
"default_locale": "en"
}
ファイルのパッケージ化に関するガイドライン
取り込みを正常に完了するには、次のパッケージ要件を遵守してください。
- 単一の集約 JSON アーカイブ(必須): すべての宿泊施設レコードを 1 つの JSON ファイルに結合します。単一の GZIP アーカイブに圧縮してアップロードすることをおすすめします。
- アンチパターンの警告: 1 つのプロパティに 1 つのファイルを使用したり、同じアーカイブ内で国別に複数のファイルを使用したりしないでください。この方法はサポートされておらず、抽出エラーが発生します。
定義
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; }
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 { UNKNOWN_CATEGORY = 0; HOTEL = 1; 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 { // Hotel specific fields. HotelData hotel_data = 10; // Local specific fields. LocalData local_data = 15; } }
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; }
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; } }
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; }
日本の住所
構造化された PostalAddress で日本の住所を指定する場合は、すべての必須フィールド(locality を含む)に入力し、ネイティブの日本語文字(漢字と仮名)で、行政単位の大きいものから小さいものの順に値をフォーマットします。
| フィールド | 日本の住所コンポーネント |
|---|---|
country |
ISO 3166-1 alpha-2 形式の国コード("JP")。 |
postal_code |
7 桁の郵便番号(ハイフンあり、なしのどちらでも可)。 |
region |
都道府県。スキーマでは省略可能ですが、強く推奨されます。省略すると、曖昧な市区町村名(「府中市」など)が誤った都道府県にジオコーディングされる可能性があります。数字の都道府県コード("13" など)やプレースホルダ テキストは使用しないでください。 |
locality |
市区町村。構造化された PostalAddress フィードでは必須です。東京 23 特別区の場合は区名、政令指定都市の場合は市と区を合わせた名前(市を locality に、区を street_address に入力することも可能)、通常の市の場合は市名("旭川市" など)、郡部の場合は郡と町村を合わせた名前を入力します。 |
street_address |
残りの町名・丁目・番・号、および建物名と階数(該当する場合)。都道府県や市区町村を繰り返したり、プレースホルダ文字列を挿入したりしないでください。 |
例
| アドレスの種類 | country |
postal_code |
region |
locality |
street_address |
|---|---|---|---|---|---|
| 東京 23 特別区 | "JP" |
"106-0032" |
"東京都" |
"港区" |
"六本木6-10-1 六本木ヒルズ森タワー" |
| 政令指定都市 | "JP" |
"530-0001" |
"大阪府" |
"大阪市北区" |
"梅田3-1-1" |
| 郡・町村 | "JP" |
"731-4214" |
"広島県" |
"安芸郡熊野町" |
"中溝1丁目2-3" |
- 日本語の文字を使用する: 建物やサブプレミスのマッチングを向上させるため、ローマ字ではなく漢字と仮名で住所を入力します。
- フィールド間で大きい単位から小さい単位への階層を維持する: Google は、日本の構造化された住所フィールドを順番に結合します(
region、locality、street_address)。localityに小さい単位を配置し、street_addressにその親単位を配置しないでください(たとえば、localityに"熊野町"を配置し、street_addressに"安芸郡中溝1丁目2-3"を配置すると、階層が逆になり、ジオコーディングの精度が低下します)。
イメージ定義
// 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; }
HotelData の定義
// Hotel specific feed data. message HotelData { // The official hotel class star value. // Can be used in a label like "5-star hotel." // This value is expected to be an integer between 0 and 5. A rating of 0 // should be used if a rating is unavailable or not specified. When // set to 0, no star class will be displayed on the UI for users. int32 hotel_star_class = 1; // Deprecated. Use `brand_landing_pages` instead. // // The brands that can display this hotel. // If this field is empty, the hotel can be displayed under any of the // brands associated with the feed. repeated string brand_ids = 2 [(datapol.semantic_type) = ST_PARTNER_ID, deprecated = true]; // The brand landing pages. repeated BrandLandingPages brand_landing_pages = 3; }
BrandLandingPages の定義
// The Localized brand landing pages for a single Point of Interest (POI). message BrandLandingPages { // Required. 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". // Empty list means this page is not restricted by language. repeated string locales = 3; // Restricts this page to users from the specified countries. // Must contain ISO 3166-1 alpha-2 country codes, e.g. "US". // Empty list means this page is not restricted by country. // If `is_default_for_country` is true, this field must not be empty. repeated string countries = 4; // Whether this page should be used as the default fallback for users in // `countries` when no entry for that country matches the user's // language preference. bool is_default_for_country = 5; } // 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; // Required. The default landing page url to be used when none of the // localized landing pages matches the user's language. string default_url = 3; }
サンプル
スポット フィード
ファイル名: poi_1707240000.json
{ "data": [ { "poi_id": "hotel_banana", "name": { "localizations": [ { "locale": "en", "text": "Banana Hotel" } ], "default_locale": "en" }, "telephone": "+16195550100", "url": "https://www.example-banana-hotel.com", "location": { "latitude": 32.7157, "longitude": -117.1611, "address": { "country": "US", "locality": "San Diego", "region": "CA", "postal_code": "92101", "street_address": "2845 W 7th St" } }, "images": [ { "url": "https://www.example.com/banana_hotel.jpg", "alt_text": { "localizations": [ { "locale": "en", "text": "Banana Hotel Exterior" } ] } } ], "rating": 4.5, "category": "HOTEL", "hotel_data": { "hotel_star_class": 4, "brand_landing_pages": [ { "brand_id": "brand_a", "default_url": "https://www.examplebrandA.com/hotels/hotel_banana" }, { "brand_id": "brand_b", "default_url": "https://www.examplebrandB.com/hotels/hotel_banana" } ] } }, { "poi_id": "hotel_kiwi", "name": { "localizations": [ { "locale": "en", "text": "Kiwi Hotel" } ], "default_locale": "en" }, "telephone": "+41445550100", "url": "https://www.example-kiwi-hotel.com", "location": { "latitude": 47.3769, "longitude": 8.5417, "address": { "country": "CH", "locality": "Zurich", "postal_code": "8001", "street_address": "Bahnhofstrasse 10" } }, "images": [ { "url": "https://www.example.com/kiwi_hotel.jpg", "alt_text": { "localizations": [ { "locale": "en", "text": "Kiwi Hotel Lobby" } ] } } ], "rating": 4.0, "category": "HOTEL", "hotel_data": { "hotel_star_class": 3, "brand_landing_pages": [ { "brand_id": "brand_c", "default_url": "https://www.examplebrandC.com/hotels/hotel_kiwi" } ] } }, { "poi_id": "hotel_croissant", "name": { "localizations": [ { "locale": "en", "text": "Croissant Hotel" } ], "default_locale": "en" }, "telephone": "+41445550200", "url": "https://www.example-croissant-hotel.com", "location": { "latitude": 47.3686, "longitude": 8.5392, "address": { "country": "CH", "locality": "Zurich", "postal_code": "8002", "street_address": "Paradeplatz 1" } }, "images": [ { "url": "https://www.example.com/croissant_hotel.jpg", "alt_text": { "localizations": [ { "locale": "en", "text": "Croissant Hotel View" } ] } } ], "rating": 5.0, "category": "HOTEL", "hotel_data": { "hotel_star_class": 5 } }, { "poi_id": "hotel_tiburon", "name": { "localizations": [ { "locale": "en", "text": "Hotel Tiburon" } ], "default_locale": "en" }, "telephone": "+15105550100", "url": "https://www.example-tiburon-hotel.com", "location": { "latitude": 37.7652, "longitude": -122.2416, "address": { "country": "US", "locality": "Alameda", "region": "CA", "postal_code": "94501", "street_address": "1100 Atlantic Ave" } }, "images": [ { "url": "https://www.example.com/tiburon_hotel.jpg", "alt_text": { "localizations": [ { "locale": "en", "text": "Hotel Tiburon Pool" } ] } } ], "rating": 4.2, "category": "HOTEL", "hotel_data": { "hotel_star_class": 5, "brand_landing_pages": [ { "brand_id": "brand_a", "default_url": "https://www.examplebrandA.com/hotels/hotel_tiburon" } ] } } ] }
多言語 POI フィード
ファイル名: poi_multilingual.json
{ "data": [ { "poi_id": "hotel_banana_multilingual", "name": { "localizations": [ { "locale": "en", "text": "Banana Hotel" }, { "locale": "es", "text": "Hotel Plátano" }, { "locale": "fr", "text": "Hôtel Banane" } ], "default_locale": "en" }, "description": { "localizations": [ { "locale": "en", "text": "A beautiful hotel shaped like a banana." }, { "locale": "es", "text": "Un hermoso hotel con forma de plátano." }, { "locale": "fr", "text": "Un bel hôtel en forme de banane." } ], "default_locale": "en" }, "display_address": { "localizations": [ { "locale": "en", "text": "123 Banana Way, Fruit City, CA 90000" }, { "locale": "es", "text": "123 Vía Plátano, Ciudad Fruta, CA 90000" } ], "default_locale": "en" }, "telephone": "+16195550100", "url": "https://www.example-banana-hotel.com", "location": { "latitude": 32.7157, "longitude": -117.1611, "address": { "country": "US", "locality": "Fruit City", "region": "CA", "postal_code": "90000", "street_address": "123 Banana Way" } }, "images": [ { "url": "https://www.example.com/banana_hotel.jpg", "alt_text": { "localizations": [ { "locale": "en", "text": "Banana Hotel Exterior" }, { "locale": "es", "text": "Exterior del Hotel Plátano" } ] } } ], "rating": 4.5, "category": "HOTEL", "hotel_data": { "hotel_star_class": 4, "brand_landing_pages": [ { "brand_id": "brand_mango", "default_url": "https://www.examplebrandmango.com/hotels/banana", "localized_landing_pages": [ { "url": "https://www.examplebrandmango.com/es/hotels/banana", "locales": ["es"], "countries": ["ES"], "is_default_for_country": true }, { "url": "https://www.examplebrandmango.com/fr/hotels/banana", "locales": ["fr"], "countries": ["FR"], "is_default_for_country": true } ] }, { "brand_id": "brand_apricot", "default_url": "https://www.examplebrandapricot.com/hotels/banana" } ] } } ] }