इस पेज पर, लोकप्रिय जगह (पीओआई) के फ़ीड की तकनीकी जानकारी दी गई है. इसमें ज़रूरी फ़ील्ड की खास जानकारी, स्कीमा की पूरी जानकारी, और लागू करने के तरीके के बारे में बताने वाला JSON सैंपल शामिल है.
फ़ीड की खास बातें
इस सेक्शन में, पीओआई फ़ीड की ज़रूरी शर्तों और परिभाषाओं के बारे में बताया गया है.
फ़ील्ड के लिए ज़रूरी शर्तें
| फ़ील्ड का नाम | आवश्यकता | ब्यौरा |
|---|---|---|
| poi_id | ज़रूरी है | पार्टनर की ओर से जनरेट की गई स्ट्रिंग, जिससे किसी लोकप्रिय जगह (प्रॉपर्टी) की पहचान होती है. |
| नाम | ज़रूरी है | लोकप्रिय जगह का नाम. इस नाम का इस्तेमाल, एग्रीगेटर यूनिट में प्रॉपर्टी के डिसप्ले नेम के तौर पर किया जाएगा. |
| टेलीफ़ोन | यह होना बढ़िया है | लोकप्रिय जगह का संपर्क फ़ोन नंबर. इसमें देश और एरिया कोड शामिल होने चाहिए. उदाहरण के लिए, +14567891234. |
| url | यह होना बढ़िया है | लोकप्रिय जगह की सार्वजनिक वेबसाइट का यूआरएल. ध्यान दें: इसका इस्तेमाल सिर्फ़ मैच करने के लिए किया जाएगा, दिखाने के लिए नहीं. |
| जगह | ज़रूरी है (पता) ज़रूरी नहीं है (अक्षांश/देशांतर) |
लोकप्रिय जगह की लोकेशन. ज़रूरी जानकारी: प्रॉपर्टी को सही तरीके से मैच करने के लिए, पता और उससे जुड़े फ़ील्ड की जानकारी देना ज़रूरी है. अतिरिक्त जानकारी: अक्षांश और देशांतर. अगर अक्षांश/देशांतर की जानकारी दी जाती है, तो Google आपके एग्रीगेटर यूनिट मैप में प्रॉपर्टी पिन दिखाने के लिए, अक्षांश/देशांतर का इस्तेमाल करेगा. |
| इमेज | ज़रूरी है (एक इमेज) एक से ज़्यादा इमेज होने पर बेहतर रहेगा |
लोकप्रिय जगह की इमेज. प्रॉपर्टी दिखाने के लिए, इमेज अहम होंगी. हमारा सुझाव है कि आप कम से कम एक इमेज ज़रूर जोड़ें. ज़्यादा से ज़्यादा पांच इमेज सबमिट की जा सकती हैं. एक से ज़्यादा इमेज उपलब्ध कराने पर, उनका इस्तेमाल उसी क्रम में किया जाएगा जिस क्रम में उन्हें उपलब्ध कराया गया था. ऐसा तब होगा, जब कोई इमेज इस्तेमाल करने लायक न हो. इमेज की समीक्षा की जाएगी, ताकि यह पक्का किया जा सके कि वे Google की सेफ़ सर्च की नीतियों का उल्लंघन न करती हों. |
| रेटिंग | सुझाए गए | प्रॉपर्टी की औसत रेटिंग. |
| num_ratings | सुझाए गए | rating फ़ील्ड के लिए, योगदान देने वाली रेटिंग की संख्या. |
| rating_scale | यह होना बढ़िया है | rating फ़ील्ड के लिए इस्तेमाल किया जाने वाला रेटिंग स्केल. अगर ज़्यादा से ज़्यादा रेटिंग 5 है, तो rating_scale की वैल्यू 5 होगी. |
| कैटगरी | यह होना बढ़िया है | यह प्रॉपर्टी की कैटगरी को दिखाता है. |
| hotel_data | यह होना बढ़िया है | होटल के लिए खास फ़ील्ड. ज़्यादा जानकारी के लिए, HotelData की परिभाषा देखें. |
| hotel_star_class | सुझाए गए | होटल की आधिकारिक स्टार रेटिंग. यह वैल्यू, 0 से 5 के बीच का कोई पूर्णांक होनी चाहिए. अगर आपका सिस्टम, आधे स्टार या दशमलव वाली वैल्यू (उदाहरण के लिए, 3.5) का इस्तेमाल करता है, तो उसे पूर्णांक (3) में बदलें. अगर स्टार क्लास उपलब्ध नहीं है, उसके बारे में जानकारी नहीं है या उसे नहीं बताया गया है, तो कृपया वैल्यू के तौर पर 0 डालें. अगर इसे 0 पर सेट किया जाता है, तो उपयोगकर्ताओं को यूज़र इंटरफ़ेस (यूआई) पर होटल की स्टार रेटिंग नहीं दिखेगी. |
| brand_landing_pages | वैकल्पिक | hotel_data के तहत आने वाली प्रॉपर्टी के लिए, ब्रैंड के हिसाब से बनाए गए लैंडिंग पेज. हर एंट्री में, कॉन्फ़िगरेशन > ब्रैंड में कॉन्फ़िगर किए गए ब्रैंड से मैच करने वाला brand_id, default_url, और वैकल्पिक localized_landing_pages शामिल होता है. ज़्यादा जानकारी के लिए, BrandLandingPages की परिभाषा देखें. |
| brand_ids | बहिष्कृत | अब इसका इस्तेमाल नहीं किया जा सकता. इसके बजाय, brand_landing_pages का इस्तेमाल करें. इस होटल को दिखाने वाले ब्रैंड. अगर यह फ़ील्ड खाली है, तो होटल को फ़ीड से जुड़े किसी भी ब्रैंड के तहत दिखाया जा सकता है. |
| ब्यौरा | यह होना बढ़िया है | प्रॉपर्टी की पूरी जानकारी. |
| display_address | यह होना बढ़िया है | यूज़र इंटरफ़ेस (यूआई) पर दिखने वाला पता. |
इमेज से जुड़े दिशा-निर्देश
फ़ीड में जोड़ी गई सभी इमेज के लिए, इन दिशा-निर्देशों का पालन करना ज़रूरी है:
- फ़ॉर्मैट: JPEG, PNG या WebP होना चाहिए.
- फ़ाइल का साइज़: हर इमेज का साइज़ 30 एमबी से कम होना चाहिए.
- ज़्यादा से ज़्यादा डाइमेंशन: कुल 75 मेगापिक्सल से कम (चौड़ाई x ऊंचाई < 7,50,00,000).
- यूआरएल टाइप: इमेज ऐसेट का डायरेक्ट पाथ (उदाहरण के लिए, .jpg पर खत्म होने वाला यूआरएल).
- अनुमतियां: पक्का करें कि होस्टिंग सर्वर और
robots.txtफ़ाइल,Googlebotऔर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 संग्रह में कंप्रेस करके अपलोड करें.
- एंटी-पैटर्न की चेतावनी: हर प्रॉपर्टी के लिए एक फ़ाइल का इस्तेमाल न करें. इसके अलावा, एक ही संग्रह में देश के हिसाब से अलग-अलग फ़ाइलों का इस्तेमाल न करें. यह तरीका काम नहीं करता है. इससे डेटा एक्सट्रैक्ट करने में गड़बड़ियां होंगी.
परिभाषाएं
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; }
इमेज की परिभाषा
// 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_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" } ] } } ] }