หน้านี้จะอธิบายรายละเอียดทางเทคนิคสำหรับฟีดจุดที่น่าสนใจ (POI) ซึ่งประกอบด้วยข้อมูลสรุปของช่องที่ต้องกรอก คำจำกัดความของสคีมาที่ครอบคลุม และตัวอย่าง JSON เพื่อเป็นแนวทางในการใช้งาน
ข้อกำหนดฟีด
ส่วนนี้จะอธิบายข้อกำหนดและคำจำกัดความสำหรับฟีดจุดที่น่าสนใจ
ข้อกำหนดของช่อง
| ชื่อช่อง | ข้อกำหนด | คำอธิบาย |
|---|---|---|
| poi_id | ต้องระบุ | สตริงที่สร้างโดยพาร์ทเนอร์ซึ่งระบุจุดที่น่าสนใจ (ที่พัก) |
| name | ต้องระบุ | ชื่อของจุดที่น่าสนใจ ระบบจะใช้ชื่อนี้เป็นชื่อที่แสดงของพร็อพเพอร์ตี้ในหน่วยผู้รวบรวมข้อมูล |
| โทรศัพท์ | สิ่งที่แนะนำให้มี | หมายเลขโทรศัพท์ติดต่อของจุดที่น่าสนใจ รวมถึงรหัสประเทศและรหัสพื้นที่ เช่น +14567891234 |
| URL | สิ่งที่แนะนำให้มี | URL ของเว็บไซต์สาธารณะของจุดที่น่าสนใจ หมายเหตุ: ระบบจะใช้ข้อมูลนี้เพื่อการจับคู่เท่านั้น ไม่ใช่เพื่อการแสดงผล |
| สถานที่ | จำเป็น (ที่อยู่) ควรมี (ละติจูด/ลองจิจูด) |
สถานที่ตั้งของจุดที่น่าสนใจ ต้องระบุ: ต้องระบุที่อยู่และช่องที่เกี่ยวข้องเพื่อให้จับคู่ที่พักได้อย่างถูกต้อง ควรระบุ: ละติจูดและลองจิจูด หากระบุไว้ Google จะใช้ละติจูด/ลองจิจูดในการแสดงหมุดที่พักในแผนที่หน่วยผู้รวบรวมข้อมูล |
| รูปภาพ | จำเป็น (รูปภาพ 1 รูป) แนะนำ (หลายรูป) |
รูปภาพของจุดที่น่าสนใจ รูปภาพจะมีความสำคัญในการแสดงที่พัก เราขอแนะนําให้เพิ่มรูปภาพอย่างน้อย 1 รูป คุณระบุรูปภาพได้หลายรูป โดยสูงสุดไม่เกิน 5 รูป เมื่อระบุหลายรายการ ระบบจะใช้ตามลำดับที่ระบุ (ในกรณีที่รูปภาพใช้งานไม่ได้) รูปภาพจะได้รับการตรวจสอบเพื่อให้แน่ใจว่าไม่ละเมิดนโยบายการค้นหาปลอดภัยของ Google |
| คะแนน | แนะนำ | คะแนนเฉลี่ยของที่พัก |
| num_ratings | แนะนำ | จำนวนคะแนนที่ส่งผลต่อช่อง rating |
| rating_scale | สิ่งที่แนะนำให้มี | สเกลการให้คะแนนที่ใช้สำหรับช่อง rating หากคะแนนสูงสุดคือ 5 สเกลการให้คะแนนจะเป็น 5 |
| category | สิ่งที่แนะนำให้มี | แสดงหมวดหมู่ของที่พัก |
| hotel_data | สิ่งที่แนะนำให้มี | ช่องเฉพาะของโรงแรม ดูรายละเอียดได้ที่คำจำกัดความของ HotelData |
| hotel_star_class | แนะนำ | ค่าดาวระดับโรงแรมอย่างเป็นทางการ ค่านี้ควรเป็นจำนวนเต็มระหว่าง 0 ถึง 5 หากระบบใช้ค่าครึ่งดาวหรือค่าทศนิยม (เช่น 3.5) ให้ปัดเศษลงเป็นจำนวนเต็ม (3) โปรดระบุค่าเป็น 0 หากไม่มีระดับดาว ไม่ทราบ หรือไม่ได้ระบุ เมื่อตั้งค่าเป็น 0 ระบบจะไม่แสดงระดับดาวของโรงแรมใน UI สำหรับผู้ใช้ |
| brand_landing_pages | ไม่บังคับ | หน้า Landing Page เฉพาะแบรนด์สำหรับที่พักใน hotel_data แต่ละรายการจะระบุ brand_id ที่ตรงกับแบรนด์ที่กำหนดค่าไว้ในการกำหนดค่า > แบรนด์, default_url และ localized_landing_pages (ไม่บังคับ) ดูรายละเอียดได้ที่คำจำกัดความของ BrandLandingPages |
| brand_ids | เลิกใช้ | เลิกใช้งานแล้ว โปรดใช้ brand_landing_pages แทน แบรนด์ที่แสดงโรงแรมนี้ได้ หากช่องนี้ว่างเปล่า ระบบจะแสดงโรงแรมภายใต้แบรนด์ใดก็ได้ที่เชื่อมโยงกับฟีด |
| คำอธิบาย | สิ่งที่แนะนำให้มี | คำอธิบายโดยละเอียดของที่พัก |
| display_address | สิ่งที่แนะนำให้มี | ที่อยู่ที่แสดงใน UI |
หลักเกณฑ์เกี่ยวกับรูปภาพ
รูปภาพทั้งหมดที่เพิ่มลงในฟีดต้องเป็นไปตามหลักเกณฑ์ต่อไปนี้
- รูปแบบ: ต้องเป็น JPEG, PNG หรือ WebP
- ขนาดไฟล์สูงสุด: ไม่เกิน 30 MB ต่อรูปภาพ
- ขนาดสูงสุด: รวมไม่เกิน 75 เมกะพิกเซล (ความกว้าง x ความสูง < 75,000,000)
- ประเภท URL: เส้นทางโดยตรงไปยังชิ้นงานรูปภาพ (เช่น ลงท้ายด้วย .jpg)
- สิทธิ์: ตรวจสอบว่าเซิร์ฟเวอร์โฮสติ้งและไฟล์
robots.txtอนุญาตให้เข้าถึง User AgentGooglebotและGooglebot-Imageและไม่บล็อกไดเรกทอรีรูปภาพ
การรองรับหลายภาษา
ฟีดจุดที่น่าสนใจรองรับการแสดงเนื้อหาที่แปลแล้วสำหรับช่องที่เฉพาะเจาะจง ช่องต่อไปนี้เป็นประเภท Text และรองรับการแปลภาษา
namedescriptiondisplay_address
หากต้องการแสดงเนื้อหาในหลายภาษา คุณต้องระบุ default_locale ในช่องและระบุสตริงที่แปลแล้วในรายการ localizations
ระบุการแปลภาษาทั้งหมดสำหรับที่พักในรายการจุดที่น่าสนใจรายการเดียว อย่าแยกที่พักรายการเดียวไว้ในไฟล์ JSON หลายภาษา
ตัวอย่าง
"name": {
"localizations": [
{
"locale": "en",
"text": "Banana Hotel"
},
{
"locale": "es",
"text": "Hotel Plátano"
}
],
"default_locale": "en"
}
หลักเกณฑ์การสร้างแพ็กเกจไฟล์
โปรดปฏิบัติตามข้อกำหนดด้านแพ็กเกจต่อไปนี้เพื่อให้การนำเข้าสำเร็จ
- ไฟล์เก็บถาวร JSON แบบรวมไฟล์เดียว (จำเป็น): รวมระเบียนที่พักทั้งหมดไว้ในไฟล์ JSON ไฟล์เดียว เราขอแนะนำให้บีบอัดเป็นไฟล์เก็บถาวร GZIP ไฟล์เดียว แล้วอัปโหลด
- คำเตือนเกี่ยวกับรูปแบบที่ไม่ควรทำ: อย่าใช้ 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; } }
คำจำกัดความของข้อความ
// 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และ"安芸郡中溝1丁目2-3"ในstreet_addressจะกลับลำดับชั้นและลดความแม่นยำในการเข้ารหัสพิกัดภูมิศาสตร์)
ความคมชัดของรูปภาพ
// 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" } ] } } ] }