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