Package google.maps.places.v1

فهرست

مکان‌ها

تعریف سرویس برای API مکان‌ها. توجه: هر درخواستی (به جز درخواست‌های تکمیل خودکار و GetPhotoMedia) نیاز به یک ماسک فیلد دارد که خارج از پروتوی درخواست تنظیم شده باشد ( all/* ، فرض نمی‌شود). ماسک فیلد را می‌توان از طریق هدر HTTP X-Goog-FieldMask تنظیم کرد. به این لینک مراجعه کنید: https://developers.google.com/maps/documentation/places/web-service/choose-fields

مکان‌های تکمیل خودکار

rpc AutocompletePlaces( AutocompletePlacesRequest ) returns ( AutocompletePlacesResponse )

پیش‌بینی‌ها را برای ورودی داده شده برمی‌گرداند.

دامنه‌های مجوز

به محدوده OAuth زیر نیاز دارد:

  • https://www.googleapis.com/auth/cloud-platform
GetPhotoMedia

rpc GetPhotoMedia( GetPhotoMediaRequest ) returns ( PhotoMedia )

یک رسانه عکس با رشته مرجع عکس تهیه کنید.

دامنه‌های مجوز

به محدوده OAuth زیر نیاز دارد:

  • https://www.googleapis.com/auth/cloud-platform
دریافت مکان

rpc GetPlace( GetPlaceRequest ) returns ( Place )

جزئیات یک مکان را بر اساس نام منبع آن، که رشته‌ای با فرمت places/{place_id} است، دریافت کنید.

دامنه‌های مجوز

به محدوده OAuth زیر نیاز دارد:

  • https://www.googleapis.com/auth/cloud-platform
جستجودر نزدیکی

rpc SearchNearby( SearchNearbyRequest ) returns ( SearchNearbyResponse )

جستجوی مکان‌های نزدیک به مکان‌های مورد نظر.

دامنه‌های مجوز

به محدوده OAuth زیر نیاز دارد:

  • https://www.googleapis.com/auth/cloud-platform
متن جستجو

rpc SearchText( SearchTextRequest ) returns ( SearchTextResponse )

جستجوی مکان مبتنی بر جستجوی متنی

دامنه‌های مجوز

به محدوده OAuth زیر نیاز دارد:

  • https://www.googleapis.com/auth/cloud-platform

توصیفگر آدرس

توصیف رابطه‌ای از یک مکان. شامل مجموعه‌ای رتبه‌بندی‌شده از نشانه‌های نزدیک و مناطق دقیق شامل و ارتباط آنها با مکان هدف.

فیلدها
landmarks[]

Landmark

فهرستی رتبه‌بندی‌شده از مکان‌های دیدنی نزدیک. شناخته‌شده‌ترین و نزدیک‌ترین مکان‌ها در رتبه اول قرار دارند.

areas[]

Area

فهرستی رتبه‌بندی‌شده از مناطق شامل یا مجاور. قابل تشخیص‌ترین و دقیق‌ترین مناطق در ابتدا رتبه‌بندی می‌شوند.

مساحت

اطلاعات منطقه و ارتباط منطقه با مکان هدف.

مناطق شامل زیرمحلیت‌های دقیق، همسایگی‌ها و ترکیبات بزرگی است که برای توصیف یک مکان مفید هستند.

فیلدها
name

string

نام منبع منطقه.

place_id

string

شناسه مکان منطقه.

display_name

LocalizedText

نام نمایشی منطقه.

containment

Containment

رابطه مکانی بین مکان هدف و منطقه را تعریف می‌کند.

مهار

رابطه مکانی بین مکان هدف و منطقه را تعریف می‌کند.

انوم‌ها
CONTAINMENT_UNSPECIFIED مهار نامشخص است.
WITHIN مکان هدف در محدوده‌ی منطقه، نزدیک به مرکز است.
OUTSKIRTS مکان هدف در محدوده‌ی ناحیه، نزدیک به لبه است.
NEAR مکان مورد نظر خارج از منطقه مورد نظر است، اما نزدیک به آن است.

نقطه عطف

اطلاعات اولیه‌ی مکان دیدنی و ارتباط آن مکان دیدنی با موقعیت هدف.

نشانه‌های جغرافیایی، مکان‌های برجسته‌ای هستند که می‌توان از آنها برای توصیف یک مکان استفاده کرد.

فیلدها
name

string

نام منبعِ آن مکان دیدنی.

place_id

string

شناسه مکانِ مورد نظر.

display_name

LocalizedText

نام نمایشی بنای تاریخی.

types[]

string

مجموعه‌ای از تگ‌های نوع برای این نشانه. برای فهرست کاملی از مقادیر ممکن، به https://developers.google.com/maps/documentation/places/web-service/place-types مراجعه کنید.

spatial_relationship

SpatialRelationship

رابطه مکانی بین مکان هدف و نقطه عطف را تعریف می‌کند.

straight_line_distance_meters

float

فاصله مستقیم، بر حسب متر، بین نقطه مرکزی هدف و نقطه مرکزی نقطه عطف. در برخی شرایط، این مقدار می‌تواند بیشتر از travel_distance_meters باشد.

travel_distance_meters

float

مسافت طی شده، بر حسب متر، در امتداد شبکه جاده‌ای از هدف تا نقطه عطف، در صورت مشخص بودن. این مقدار، روش حمل و نقل مانند پیاده‌روی، رانندگی یا دوچرخه‌سواری را در نظر نمی‌گیرد.

روابط فضایی

رابطه مکانی بین مکان هدف و نقطه عطف را تعریف می‌کند.

انوم‌ها
NEAR این رابطه پیش‌فرض است، زمانی که هیچ مورد خاص دیگری در زیر اعمال نمی‌شود.
WITHIN این نقطه عطف دارای هندسه فضایی است و هدف در محدوده آن قرار دارد.
BESIDE هدف مستقیماً در مجاورت نقطه عطف قرار دارد.
ACROSS_THE_ROAD هدف مستقیماً روبروی نقطه عطف در طرف دیگر جاده است.
DOWN_THE_ROAD در همان مسیرِ نشانِ راهنما اما نه در کنار یا در عرض آن.
AROUND_THE_CORNER نه در همان مسیرِ نشانِ تاریخی، بلکه فقط یک پیچ با آن فاصله دارد.
BEHIND نزدیک به سازه‌ی این بنای تاریخی اما دورتر از ورودی‌های خیابان آن.

انتساب نویسنده

اطلاعات مربوط به نویسنده‌ی داده‌های UGC. مورد استفاده در Photo و Review .

فیلدها
display_name

string

نام نویسنده Photo یا Review .

uri

string

آدرس اینترنتی (URI) نویسنده Photo یا Review .

photo_uri

string

آدرس اینترنتی عکس پروفایل نویسنده Photo یا Review .

تکمیل خودکاردرخواست مکان‌ها

درخواست نمونه اولیه برای AutocompletePlaces.

فیلدها
input

string

الزامی. رشته متنی که جستجو روی آن انجام می‌شود.

location_bias

LocationBias

اختیاری. بایاس نتایج را به یک مکان مشخص شده هدایت می‌کند.

حداکثر یکی از location_bias یا location_restriction باید تنظیم شود. اگر هیچ‌کدام تنظیم نشوند، نتایج توسط آدرس IP بایاس می‌شوند، به این معنی که آدرس IP به یک مکان نامشخص نگاشت شده و به عنوان یک سیگنال بایاس استفاده می‌شود.

location_restriction

LocationRestriction

اختیاری. نتایج را به یک مکان مشخص محدود کنید.

حداکثر یکی از location_bias یا location_restriction باید تنظیم شود. اگر هیچ‌کدام تنظیم نشوند، نتایج توسط آدرس IP بایاس می‌شوند، به این معنی که آدرس IP به یک مکان نامشخص نگاشت شده و به عنوان یک سیگنال بایاس استفاده می‌شود.

included_primary_types[]

string

اختیاری. نوع مکان اصلی (مثلاً "رستوران" یا "پمپ بنزین") در انواع مکان ( https://developers.google.com/maps/documentation/places/web-service/place-types ) ، یا فقط (regions) ، یا فقط (cities) گنجانده شده است. یک مکان فقط در صورتی برگردانده می‌شود که نوع اصلی آن در این لیست گنجانده شده باشد. حداکثر 5 مقدار را می‌توان مشخص کرد. اگر هیچ نوعی مشخص نشود، همه انواع مکان برگردانده می‌شوند.

included_region_codes[]

string

اختیاری. فقط نتایج را در مناطق مشخص شده، که به عنوان حداکثر ۱۵ کد منطقه دو کاراکتری CLDR مشخص شده‌اند، لحاظ کنید. یک مجموعه خالی نتایج را محدود نمی‌کند. اگر هر دو location_restriction و included_region_codes تنظیم شوند، نتایج در ناحیه تقاطع قرار می‌گیرند.

language_code

string

اختیاری. زبانی که نتایج به آن برگردانده می‌شود. پیش‌فرض en-US است. اگر زبان مورد استفاده در input با language_code متفاوت باشد یا اگر Place برگردانده شده ترجمه‌ای از زبان محلی به language_code نداشته باشد، نتایج ممکن است به زبان‌های ترکیبی باشند.

region_code

string

اختیاری. کد منطقه، که به عنوان کد منطقه دو کاراکتری CLDR مشخص شده است. این بر قالب‌بندی آدرس، رتبه‌بندی نتایج تأثیر می‌گذارد و ممکن است بر نتایج بازگردانده شده تأثیر بگذارد. این امر نتایج را به منطقه مشخص شده محدود نمی‌کند. برای محدود کردن نتایج به یک منطقه، region_code_restriction استفاده کنید.

origin

LatLng

اختیاری. نقطه مبدا که از آن فاصله ژئودزیک تا مقصد محاسبه می‌شود (به صورت distance_meters برگردانده می‌شود). اگر این مقدار حذف شود، فاصله ژئودزیک برگردانده نخواهد شد.

input_offset

int32

اختیاری. یک آفست کاراکتر یونیکد مبتنی بر صفر از input که موقعیت مکان‌نما را در input نشان می‌دهد. موقعیت مکان‌نما ممکن است بر پیش‌بینی‌های برگردانده شده تأثیر بگذارد.

اگر خالی باشد، به طور پیش‌فرض طول input را در نظر می‌گیرد.

include_query_predictions

bool

اختیاری. اگر درست باشد، پاسخ شامل پیش‌بینی‌های مکان و پرس‌وجو خواهد بود. در غیر این صورت، پاسخ فقط پیش‌بینی‌های مکان را برمی‌گرداند.

session_token

string

اختیاری. رشته‌ای که یک جلسه تکمیل خودکار را برای اهداف صورتحساب مشخص می‌کند. باید یک رشته base64 ایمن برای URL و نام فایل با حداکثر ۳۶ کاراکتر ASCII باشد. در غیر این صورت خطای INVALID_ARGUMENT بازگردانده می‌شود.

جلسه زمانی شروع می‌شود که کاربر شروع به تایپ یک پرس‌وجو می‌کند و زمانی که مکانی را انتخاب می‌کند و درخواست Place Details یا Address Validation انجام می‌شود، پایان می‌یابد. هر جلسه می‌تواند چندین پرس‌وجو داشته باشد و به دنبال آن یک درخواست Place Details یا Address Validation قرار گیرد. اعتبارنامه‌های استفاده شده برای هر درخواست در یک جلسه باید متعلق به همان پروژه Google Cloud Console باشد. پس از پایان یک جلسه، توکن دیگر معتبر نیست؛ برنامه شما باید برای هر جلسه یک توکن جدید تولید کند. اگر پارامتر session_token حذف شود، یا اگر از یک توکن جلسه دوباره استفاده کنید، هزینه جلسه طوری محاسبه می‌شود که انگار هیچ توکن جلسه‌ای ارائه نشده است (هزینه هر درخواست جداگانه محاسبه می‌شود).

ما دستورالعمل‌های زیر را توصیه می‌کنیم:

  • از توکن‌های جلسه برای همه فراخوانی‌های تکمیل خودکار مکان استفاده کنید.
  • برای هر جلسه یک توکن جدید ایجاد کنید. استفاده از UUID نسخه ۴ توصیه می‌شود.
  • اطمینان حاصل کنید که اعتبارنامه‌های مورد استفاده برای همه درخواست‌های تکمیل خودکار مکان، جزئیات مکان و اعتبارسنجی آدرس در یک جلسه متعلق به یک پروژه Cloud Console هستند.
  • حتماً برای هر جلسه جدید، یک توکن جلسه منحصر به فرد ارسال کنید. استفاده از یک توکن برای بیش از یک جلسه منجر به این می‌شود که برای هر درخواست، هزینه جداگانه محاسبه شود.
include_pure_service_area_businesses

bool

اختیاری. اگر فیلد روی true تنظیم شده باشد، کسب‌وکارهای صرفاً خدماتی را نیز اضافه کنید. کسب‌وکار صرفاً خدماتی، کسب‌وکاری است که مستقیماً از مشتریان بازدید می‌کند یا به آنها کالا تحویل می‌دهد، اما به آدرس کسب‌وکار آنها خدمات ارائه نمی‌دهد. برای مثال، کسب‌وکارهایی مانند خدمات نظافت یا لوله‌کشی. این کسب‌وکارها آدرس فیزیکی یا مکانی در نقشه‌های گوگل ندارند. Places فیلدهایی از جمله location ، plus_code و سایر فیلدهای مرتبط با مکان را برای این کسب‌وکارها برنمی‌گرداند.

include_future_opening_businesses

bool

اختیاری. در صورت صحیح بودن، کسب‌وکارهایی را که هنوز باز نشده‌اند اما در آینده باز خواهند شد، لحاظ کنید.

موقعیت مکانی

منطقه مورد جستجو. نتایج ممکن است حول منطقه مشخص شده جانبدارانه باشند.

فیلدها

type فیلد اتحادیه.

type فقط می‌تواند یکی از موارد زیر باشد:

rectangle

Viewport

دریچه دیدی که توسط یک گوشه شمال شرقی و یک گوشه جنوب غربی تعریف شده است.

circle

Circle

دایره‌ای که با یک نقطه مرکزی و شعاع مشخص می‌شود.

محدودیت مکانی

منطقه مورد جستجو. نتایج به منطقه مشخص شده محدود خواهد شد.

فیلدها

type فیلد اتحادیه.

type فقط می‌تواند یکی از موارد زیر باشد:

rectangle

Viewport

دریچه دیدی که توسط یک گوشه شمال شرقی و یک گوشه جنوب غربی تعریف شده است.

circle

Circle

دایره‌ای که با یک نقطه مرکزی و شعاع مشخص می‌شود.

تکمیل خودکارپاسخ مکان‌ها

نمونه اولیه پاسخ برای AutocompletePlaces.

فیلدها
suggestions[]

Suggestion

شامل فهرستی از پیشنهادها است که به ترتیب نزولی اهمیت مرتب شده‌اند.

پیشنهاد

نتیجه پیشنهاد تکمیل خودکار.

فیلدها

kind فیلد یونیون.

kind می‌تواند فقط یکی از موارد زیر باشد:

place_prediction

PlacePrediction

پیشگویی برای یک مکان.

query_prediction

QueryPrediction

پیش‌بینی برای یک پرس‌وجو.

متن قابل قالب‌بندی

متنی که نشان‌دهنده‌ی پیش‌بینی مکان یا پرس‌وجو است. این متن می‌تواند به همین صورت یا با فرمت دلخواه استفاده شود.

فیلدها
text

string

متنی که می‌تواند به همین صورت استفاده شود یا با matches قالب‌بندی شود.

matches[]

StringRange

فهرستی از محدوده‌های رشته‌ای که مشخص می‌کند درخواست ورودی در کجای text مطابقت دارد. این محدوده‌ها می‌توانند برای قالب‌بندی بخش‌های خاصی از text استفاده شوند. اگر تطبیق با معیارهایی غیر از تطبیق رشته (مثلاً تصحیح املا یا آوانویسی) تعیین شده باشد، ممکن است زیررشته‌ها دقیقاً با input مطابقت نداشته باشند.

این مقادیر، فاصله‌های کاراکتری text در یونیکد هستند. تضمین می‌شود که محدوده‌ها به ترتیب افزایشی مرتب شوند.

پیش‌بینی مکان

نتایج پیش‌بینی برای پیش‌بینی تکمیل خودکار مکان.

فیلدها
place

string

نام منبع مکان پیشنهادی. این نام می‌تواند در سایر APIهایی که نام مکان را می‌پذیرند، استفاده شود.

place_id

string

شناسه منحصر به فرد مکان پیشنهادی. این شناسه می‌تواند در سایر APIهایی که شناسه مکان را می‌پذیرند، استفاده شود.

text

FormattableText

شامل نام قابل خواندن توسط انسان برای نتیجه‌ی برگردانده شده است. برای نتایج مربوط به تأسیس، این نام معمولاً نام و آدرس کسب و کار است.

text برای توسعه‌دهندگانی که مایل به نمایش یک عنصر رابط کاربری واحد هستند توصیه می‌شود. توسعه‌دهندگانی که مایل به نمایش دو عنصر رابط کاربری جداگانه اما مرتبط هستند، می‌توانند به جای آن structured_format استفاده کنند. این دو روش مختلف برای نمایش پیش‌بینی مکان هستند. کاربران نباید سعی کنند structured_format به text تجزیه کنند یا برعکس.

این متن ممکن است با display_name برگردانده شده توسط GetPlace متفاوت باشد.

اگر input درخواست و language_code به زبان‌های مختلفی باشند یا اگر Place ترجمه‌ای از زبان محلی به language_code نداشته باشد، ممکن است به زبان‌های ترکیبی باشد.

structured_format

StructuredFormat

تجزیه پیش‌بینی مکان به متن اصلی شامل نام مکان و متن ثانویه شامل ویژگی‌های ابهام‌زدایی اضافی (مانند شهر یا منطقه).

structured_format برای توسعه‌دهندگانی که مایل به نمایش دو عنصر رابط کاربری جداگانه اما مرتبط هستند، توصیه می‌شود. توسعه‌دهندگانی که مایل به نمایش یک عنصر رابط کاربری واحد هستند، می‌توانند به جای آن text استفاده کنند. این دو روش مختلف برای نمایش پیش‌بینی مکان هستند. کاربران نباید سعی کنند structured_format به text تجزیه کنند یا برعکس.

types[]

string

فهرست انواعی که برای این مکان از جدول A یا جدول B در https://developers.google.com/maps/documentation/places/web-service/place-types اعمال می‌شوند.

یک نوع، دسته‌بندی یک مکان است. مکان‌هایی که انواع مشترکی دارند، ویژگی‌های مشابهی نیز خواهند داشت.

distance_meters

int32

طول ژئودزیک بر حسب متر از origin ، در صورتی که origin مشخص شده باشد. پیش‌بینی‌های خاصی مانند مسیرها ممکن است در این فیلد قرار نگیرند.

پیش‌بینی پرس‌وجو

نتایج پیش‌بینی برای پیش‌بینی تکمیل خودکار پرس‌وجو.

فیلدها
text

FormattableText

متن پیش‌بینی‌شده. این متن نشان‌دهنده‌ی یک مکان نیست، بلکه یک عبارت متنی است که می‌تواند در یک نقطه‌ی پایانی جستجو (مثلاً جستجوی متن) استفاده شود.

text برای توسعه‌دهندگانی که مایل به نمایش یک عنصر رابط کاربری واحد هستند توصیه می‌شود. توسعه‌دهندگانی که مایل به نمایش دو عنصر رابط کاربری جداگانه اما مرتبط هستند، می‌توانند به جای آن structured_format استفاده کنند. این دو روش مختلف برای نمایش پیش‌بینی پرس‌وجو هستند. کاربران نباید سعی کنند structured_format به text تجزیه کنند یا برعکس.

اگر input درخواست و language_code به زبان‌های مختلفی باشند یا اگر بخشی از پرس‌وجو ترجمه‌ای از زبان محلی به language_code نداشته باشد، ممکن است به زبان‌های ترکیبی باشد.

structured_format

StructuredFormat

تجزیه پیش‌بینی پرس‌وجو به متن اصلی حاوی پرس‌وجو و متن ثانویه حاوی ویژگی‌های ابهام‌زدایی اضافی (مانند شهر یا منطقه).

structured_format برای توسعه‌دهندگانی که مایل به نمایش دو عنصر رابط کاربری جداگانه اما مرتبط هستند، توصیه می‌شود. توسعه‌دهندگانی که مایل به نمایش یک عنصر رابط کاربری واحد هستند، می‌توانند به جای آن text استفاده کنند. این دو روش مختلف برای نمایش پیش‌بینی پرس‌وجو هستند. کاربران نباید سعی کنند structured_format به text تجزیه کنند یا برعکس.

محدوده رشته

یک زیررشته را در متن داده شده شناسایی می‌کند.

فیلدها
start_offset

int32

آفست مبتنی بر صفر اولین کاراکتر یونیکد رشته (شامل).

end_offset

int32

آفست آخرین کاراکتر یونیکد مبتنی بر صفر (منحصراً).

قالب‌بندی ساختاریافته

شامل تجزیه پیش‌بینی مکان یا پرس‌وجو به متن اصلی و متن ثانویه است.

برای پیش‌بینی‌های مکان، متن اصلی شامل نام خاص مکان است. برای پیش‌بینی‌های جستجو، متن اصلی شامل جستجو است.

متن ثانویه شامل ویژگی‌های ابهام‌زدایی اضافی (مانند شهر یا منطقه) برای شناسایی بیشتر مکان یا اصلاح عبارت جستجو است.

فیلدها
main_text

FormattableText

نام مکان یا عبارت جستجو را نشان می‌دهد.

secondary_text

FormattableText

ویژگی‌های ابهام‌زدایی اضافی (مانند یک شهر یا منطقه) را برای شناسایی بیشتر مکان یا اصلاح پرس‌وجو نشان می‌دهد.

دایره

دایره‌ای با مرکز و شعاع LatLng رسم کنید.

فیلدها
center

LatLng

الزامی. طول و عرض جغرافیایی مرکز.

محدوده عرض جغرافیایی باید بین [-90.0، 90.0] و محدوده طول جغرافیایی باید بین [-180.0، 180.0] باشد.

radius

double

الزامی. شعاع بر حسب متر اندازه‌گیری شده است. شعاع باید در محدوده [0.0، 50000.0] باشد.

بلوک محتوا

بلوکی از محتوا که می‌تواند به صورت جداگانه ارائه شود.

فیلدها
content

LocalizedText

مطالب مرتبط با موضوع.

referenced_places[]

string

فهرست نام‌های منابع مکان‌های ارجاع‌شده. این نام می‌تواند در سایر APIهایی که نام‌های منابع Place را می‌پذیرند، استفاده شود.

محتوای زمینه‌ای

آزمایشی: برای جزئیات بیشتر به https://developers.google.com/maps/documentation/places/web-service/experimental/places-generative مراجعه کنید.

محتوایی که با عبارت جستجو شده در مورد مکان مرتبط باشد.

فیلدها
reviews[]

Review

فهرست نظرات درباره این مکان، متناسب با عبارت جستجو شده.

photos[]

Photo

اطلاعات (شامل منابع) درباره عکس‌های این مکان، متناسب با عبارت جستجو شده.

justifications[]

Justification

آزمایشی: برای جزئیات بیشتر به https://developers.google.com/maps/documentation/places/web-service/experimental/places-generative مراجعه کنید.

توجیهاتی برای مکان.

توجیه

آزمایشی: برای جزئیات بیشتر به https://developers.google.com/maps/documentation/places/web-service/experimental/places-generative مراجعه کنید.

توجیهات برای مکان. توجیهات به این سوال پاسخ می‌دهند که چرا یک مکان می‌تواند برای کاربر نهایی جذاب باشد.

فیلدها

justification میدان اتحادیه.

justification فقط می‌تواند یکی از موارد زیر باشد:

review_justification

ReviewJustification

آزمایشی: برای جزئیات بیشتر به https://developers.google.com/maps/documentation/places/web-service/experimental/places-generative مراجعه کنید.

business_availability_attributes_justification

BusinessAvailabilityAttributesJustification

آزمایشی: برای جزئیات بیشتر به https://developers.google.com/maps/documentation/places/web-service/experimental/places-generative مراجعه کنید.

توجیه ویژگی‌های در دسترس بودن کسب و کار

تجربی: برای جزئیات بیشتر به https://developers.google.com/maps/documentation/places/web-service/experimental/places-generative مراجعه کنید. توجیهات ویژگی‌های در دسترس بودن کسب و کار. این بخش برخی از ویژگی‌های یک کسب و کار را نشان می‌دهد که می‌تواند برای کاربر نهایی جذاب باشد.

فیلدها
takeout

bool

اگر جایی غذای بیرون‌بر ارائه می‌دهد.

delivery

bool

اگر مکانی خدمات تحویل ارائه می‌دهد.

dine_in

bool

اگر مکانی امکان صرف غذا در محل را فراهم می‌کند.

بررسی توجیه

آزمایشی: برای جزئیات بیشتر به https://developers.google.com/maps/documentation/places/web-service/experimental/places-generative مراجعه کنید.

توجیهات نقد کاربر. این بخش از نقد کاربر را که برای کاربر نهایی جالب است، برجسته می‌کند. برای مثال، اگر عبارت جستجو "پیتزای هیزمی" باشد، توجیه نقد، متن مرتبط با عبارت جستجو را برجسته می‌کند.

فیلدها
highlighted_text

HighlightedText

review

Review

مروری که متن هایلایت شده از آن تولید شده است.

متن برجسته

متن هایلایت شده توسط توجیه. این زیرمجموعه‌ای از خودِ نقد است. کلمه‌ی دقیقی که باید هایلایت شود با HighlightedTextRange مشخص شده است. ممکن است چندین کلمه در متن هایلایت شده وجود داشته باشد.

فیلدها
text

string

highlighted_text_ranges[]

HighlightedTextRange

فهرست محدوده‌های متن هایلایت شده.

محدوده متن برجسته

محدوده متن هایلایت شده.

فیلدها
start_index

int32

end_index

int32

گزینه‌های شارژ EV

اطلاعات مربوط به ایستگاه شارژ خودروهای برقی که در Place قرار دارد. اصطلاحات مربوطه در آدرس https://afdc.energy.gov/fuels/electricity_infrastructure.html آمده است. یک پورت می‌تواند همزمان یک خودرو را شارژ کند. هر پورت دارای یک یا چند کانکتور است. هر ایستگاه دارای یک یا چند پورت است.

فیلدها
connector_count

int32

تعداد کانکتورها در این ایستگاه. با این حال، از آنجا که برخی از پورت‌ها می‌توانند چندین کانکتور داشته باشند اما فقط می‌توانند یک خودرو را در یک زمان شارژ کنند (مثلاً)، تعداد کانکتورها ممکن است بیشتر از تعداد کل خودروهایی باشد که می‌توانند همزمان شارژ شوند.

connector_aggregation[]

ConnectorAggregation

فهرستی از مجموعه کانکتورهای شارژ خودروهای برقی که شامل کانکتورهایی از نوع و نرخ شارژ یکسان هستند.

تجمیع کانکتور

اطلاعات شارژ خودروهای برقی بر اساس [type, max_charge_rate_kw] گروه‌بندی شده است. تجمیع شارژ خودروهای برقی با کانکتورهایی که نوع و حداکثر نرخ شارژ یکسانی بر حسب کیلووات دارند را نشان می‌دهد.

فیلدها
type

EVConnectorType

نوع کانکتور این تجمیع.

max_charge_rate_kw

double

حداکثر نرخ شارژ استاتیک بر حسب کیلووات برای هر کانکتور در تجمیع.

count

int32

تعداد کانکتورها در این تجمیع.

availability_last_update_time

Timestamp

مهر زمانی که آخرین بار اطلاعات مربوط به در دسترس بودن کانکتور در این مجموعه به‌روزرسانی شده است.

available_count

int32

تعداد کانکتورهای موجود در این مجموعه در حال حاضر.

out_of_service_count

int32

تعداد کانکتورهای موجود در این تجمیع که در حال حاضر از سرویس خارج هستند.

نوع کانکتور EV

برای اطلاعات/زمینه بیشتر در مورد انواع کانکتور شارژ خودروهای برقی، به آدرس http://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=6872107 مراجعه کنید.

انوم‌ها
EV_CONNECTOR_TYPE_UNSPECIFIED کانکتور نامشخص.
EV_CONNECTOR_TYPE_OTHER انواع دیگر کانکتور
EV_CONNECTOR_TYPE_J1772 کانکتور نوع ۱ J1772.
EV_CONNECTOR_TYPE_TYPE_2 کانکتور IEC 62196 نوع 2. اغلب به عنوان MENNEKES شناخته می‌شود.
EV_CONNECTOR_TYPE_CHADEMO کانکتور نوع CHAdeMO.
EV_CONNECTOR_TYPE_CCS_COMBO_1 سیستم شارژ ترکیبی (AC و DC). بر اساس SAE. کانکتور نوع 1 J-1772
EV_CONNECTOR_TYPE_CCS_COMBO_2 سیستم شارژ ترکیبی (AC و DC). مبتنی بر کانکتور نوع ۲ منکس
EV_CONNECTOR_TYPE_TESLA کانکتور عمومی TESLA. این کانکتور در آمریکای شمالی NACS است، اما در سایر نقاط جهان می‌تواند غیر NACS باشد (مثلاً CCS Combo 2 (CCS2) یا GB/T). این مقدار کمتر نشان‌دهنده‌ی نوع کانکتور واقعی است و بیشتر نشان‌دهنده‌ی قابلیت شارژ یک وسیله نقلیه با برند تسلا در یک ایستگاه شارژ متعلق به تسلا است.
EV_CONNECTOR_TYPE_UNSPECIFIED_GB_T نوع GB/T مطابق با استاندارد GB/T در چین است. این نوع، تمام انواع GB_T را پوشش می‌دهد.
EV_CONNECTOR_TYPE_UNSPECIFIED_WALL_OUTLET پریز دیواری نامشخص.
EV_CONNECTOR_TYPE_NACS سیستم شارژ آمریکای شمالی (NACS)، که با استاندارد SAE J3400 شناخته می‌شود.

گزینه‌های سوخت

جدیدترین اطلاعات در مورد گزینه‌های سوخت در پمپ بنزین. این اطلاعات مرتباً به‌روزرسانی می‌شود.

فیلدها
fuel_prices[]

FuelPrice

آخرین قیمت سوخت شناخته شده برای هر نوع سوختی که این جایگاه دارد. برای هر نوع سوختی که این جایگاه دارد، یک ورودی وجود دارد. ترتیب مهم نیست.

قیمت سوخت

اطلاعات قیمت سوخت برای یک نوع معین.

فیلدها
type

FuelType

نوع سوخت.

price

Money

قیمت سوخت.

update_time

Timestamp

آخرین باری که قیمت سوخت به‌روزرسانی شده است.

نوع سوخت

انواع سوخت.

انوم‌ها
FUEL_TYPE_UNSPECIFIED نوع سوخت نامشخص
DIESEL سوخت دیزل.
DIESEL_PLUS دیزل به علاوه سوخت.
REGULAR_UNLEADED معمولی بدون سرب.
MIDGRADE میان‌رده.
PREMIUM پریمیوم.
SP91 اس پی ۹۱.
SP91_E10 اس پی ۹۱ ای۱۰.
SP92 اس پی ۹۲.
SP95 اس پی ۹۵.
SP95_E10 SP95 E10.
SP98 اس پی ۹۸.
SP99 اس پی ۹۹.
SP100 اس پی ۱۰۰.
LPG گاز مایع نفتی.
E80 ای ۸۰.
E85 ای ۸۵.
E100 ای ۱۰۰.
METHANE متان
BIO_DIESEL بیودیزل.
TRUCK_DIESEL دیزل کامیون.

درخواست دریافت عکس از رسانه

درخواست دریافت عکس از یک مکان با استفاده از نام منبع عکس.

فیلدها
name

string

الزامی. نام منبع یک رسانه تصویری با فرمت: places/{place_id}/photos/{photo_reference}/media .

نام منبع یک عکس که در فیلد photos.name شیء Place برگردانده می‌شود، با فرمت places/{place_id}/photos/{photo_reference} می‌آید. برای دریافت نام منبع رسانه عکس، باید /media به انتهای منبع عکس اضافه کنید.

max_width_px

int32

اختیاری. حداکثر عرض دلخواه تصویر را بر حسب پیکسل مشخص می‌کند. اگر تصویر از مقادیر مشخص شده کوچکتر باشد، تصویر اصلی برگردانده می‌شود. اگر تصویر در هر دو بُعد بزرگتر باشد، مقیاس آن به گونه‌ای تنظیم می‌شود که با کوچکترین بُعد از دو بُعد مطابقت داشته باشد و به نسبت ابعاد اصلی خود محدود شود. هر دو ویژگی max_height_px و max_width_px یک عدد صحیح بین ۱ تا ۴۸۰۰ را می‌پذیرند. اگر مقدار در محدوده مجاز نباشد، خطای INVALID_ARGUMENT برگردانده می‌شود.

حداقل یکی از max_height_px یا max_width_px باید مشخص شود. اگر هیچ کدام از max_height_px یا max_width_px مشخص نشده باشند، خطای INVALID_ARGUMENT برگردانده می‌شود.

max_height_px

int32

اختیاری. حداکثر ارتفاع دلخواه تصویر را بر حسب پیکسل مشخص می‌کند. اگر تصویر از مقادیر مشخص شده کوچکتر باشد، تصویر اصلی برگردانده می‌شود. اگر تصویر در هر دو بُعد بزرگتر باشد، مقیاس آن به گونه‌ای تنظیم می‌شود که با کوچکترین بُعد از دو بُعد مطابقت داشته باشد و به نسبت ابعاد اصلی خود محدود شود. هر دو ویژگی max_height_px و max_width_px یک عدد صحیح بین ۱ تا ۴۸۰۰ را می‌پذیرند. اگر مقدار در محدوده مجاز نباشد، خطای INVALID_ARGUMENT برگردانده می‌شود.

حداقل یکی از max_height_px یا max_width_px باید مشخص شود. اگر هیچ کدام از max_height_px یا max_width_px مشخص نشده باشند، خطای INVALID_ARGUMENT برگردانده می‌شود.

skip_http_redirect

bool

اختیاری. در صورت تنظیم، از رفتار پیش‌فرض تغییر مسیر HTTP صرف نظر کرده و پاسخی با فرمت متنی (مثلاً در قالب JSON برای مورد استفاده HTTP) ارائه می‌دهد. در صورت تنظیم نشدن، یک تغییر مسیر HTTP برای هدایت فراخوانی به رسانه تصویر صادر می‌شود. این گزینه برای درخواست‌های غیر HTTP نادیده گرفته می‌شود.

درخواست دریافت مکان

درخواست برای دریافت یک مکان بر اساس نام منبع آن، که رشته‌ای با فرمت places/{place_id} است.

فیلدها
name

string

الزامی. نام منبع یک مکان، با فرمت places/{place_id} .

language_code

string

اختیاری. جزئیات مکان در صورت وجود با زبان دلخواه نمایش داده خواهد شد.

فهرست فعلی زبان‌های پشتیبانی‌شده: https://developers.google.com/maps/faq#languagesupport .

region_code

string

اختیاری. کد یونیکد کشور/منطقه (CLDR) مکانی که درخواست از آنجا می‌آید. این پارامتر برای نمایش جزئیات مکان، مانند نام مکان خاص منطقه، در صورت وجود، استفاده می‌شود. این پارامتر می‌تواند بر اساس قانون مربوطه بر نتایج تأثیر بگذارد. برای اطلاعات بیشتر، به https://www.unicode.org/cldr/charts/latest/supplemental/territory_language_information.html مراجعه کنید.

توجه داشته باشید که کدهای منطقه ای سه رقمی در حال حاضر پشتیبانی نمی شوند.

session_token

string

اختیاری. رشته‌ای که یک جلسه تکمیل خودکار را برای اهداف صورتحساب مشخص می‌کند. باید یک رشته base64 ایمن برای URL و نام فایل با حداکثر ۳۶ کاراکتر ASCII باشد. در غیر این صورت خطای INVALID_ARGUMENT بازگردانده می‌شود.

جلسه زمانی شروع می‌شود که کاربر شروع به تایپ یک پرس‌وجو می‌کند و زمانی که مکانی را انتخاب می‌کند و درخواست Place Details یا Address Validation انجام می‌شود، پایان می‌یابد. هر جلسه می‌تواند چندین پرس‌وجو داشته باشد و به دنبال آن یک درخواست Place Details یا Address Validation قرار گیرد. اعتبارنامه‌های استفاده شده برای هر درخواست در یک جلسه باید متعلق به همان پروژه Google Cloud Console باشد. پس از پایان یک جلسه، توکن دیگر معتبر نیست؛ برنامه شما باید برای هر جلسه یک توکن جدید تولید کند. اگر پارامتر session_token حذف شود، یا اگر از یک توکن جلسه دوباره استفاده کنید، هزینه جلسه طوری محاسبه می‌شود که انگار هیچ توکن جلسه‌ای ارائه نشده است (هزینه هر درخواست جداگانه محاسبه می‌شود).

ما دستورالعمل‌های زیر را توصیه می‌کنیم:

  • از توکن‌های جلسه برای همه فراخوانی‌های تکمیل خودکار مکان استفاده کنید.
  • برای هر جلسه یک توکن جدید ایجاد کنید. استفاده از UUID نسخه ۴ توصیه می‌شود.
  • اطمینان حاصل کنید که اعتبارنامه‌های مورد استفاده برای همه درخواست‌های تکمیل خودکار مکان، جزئیات مکان و اعتبارسنجی آدرس در یک جلسه متعلق به یک پروژه Cloud Console هستند.
  • حتماً برای هر جلسه جدید، یک توکن جلسه منحصر به فرد ارسال کنید. استفاده از یک توکن برای بیش از یک جلسه منجر به این می‌شود که برای هر درخواست، هزینه جداگانه محاسبه شود.

عکس

اطلاعات مربوط به عکس یک مکان.

فیلدها
name

string

شناسه. مرجعی که نشان‌دهنده عکس این مکان است و می‌توان از آن برای جستجوی مجدد عکس این مکان استفاده کرد (همچنین به آن نام "منبع" API نیز گفته می‌شود: places/{place_id}/photos/{photo} ).

width_px

int32

حداکثر عرض موجود، بر حسب پیکسل.

height_px

int32

حداکثر ارتفاع قابل دسترس، بر حسب پیکسل.

author_attributions[]

AuthorAttribution

نویسندگان این عکس.

flag_content_uri

string

پیوندی که کاربران می‌توانند در آن مشکل عکس را گزارش دهند.

google_maps_uri

string

لینکی برای نمایش عکس روی نقشه گوگل.

فوتومدیا

یک رسانه تصویری از Places API.

فیلدها
name

string

نام منبع یک رسانه تصویری با فرمت: places/{place_id}/photos/{photo_reference}/media .

photo_uri

string

یک uri کوتاه مدت که می‌تواند برای رندر کردن عکس استفاده شود.

مکان

تمام اطلاعات مربوط به یک مکان.

فیلدها
name

string

نام منبع این مکان، با فرمت places/{place_id} . می‌توان از آن برای جستجوی مکان استفاده کرد.

id

string

شناسه منحصر به فرد یک مکان.

display_name

LocalizedText

نام محلی مکان، مناسب برای توضیح کوتاه و خوانا برای انسان. برای مثال، «گوگل سیدنی»، «استارباکس»، «پیرمونت» و غیره.

types[]

string

مجموعه‌ای از برچسب‌های نوع برای این نتیجه. به عنوان مثال، "political" و "locality". برای لیست کامل مقادیر ممکن، به جدول A و جدول B در https://developers.google.com/maps/documentation/places/web-service/place-types مراجعه کنید.

primary_type

string

نوع اصلی نتیجه داده شده. این نوع باید یکی از انواع پشتیبانی شده توسط Places API باشد. به عنوان مثال، "رستوران"، "کافه"، "فرودگاه" و غیره. یک مکان فقط می‌تواند یک نوع اصلی داشته باشد. برای لیست کامل مقادیر ممکن، به جدول A و جدول B در https://developers.google.com/maps/documentation/places/web-service/place-types مراجعه کنید. اگر نوع اصلی مکان از نوع پشتیبانی شده نباشد، ممکن است نوع اصلی وجود نداشته باشد. وقتی یک نوع اصلی وجود دارد، همیشه یکی از انواع موجود در فیلد types است.

primary_type_display_name

LocalizedText

نام نمایشی نوع اصلی، که در صورت لزوم به زبان درخواست بومی‌سازی شده است. برای لیست کامل مقادیر ممکن، به جدول A و جدول B در https://developers.google.com/maps/documentation/places/web-service/place-types مراجعه کنید. اگر نوع اصلی مکان از نوع پشتیبانی شده نباشد، ممکن است نوع اصلی وجود نداشته باشد.

google_maps_type_label

LocalizedText

برچسب نوع مکان در نقشه‌های گوگل، که در صورت لزوم به زبان درخواست بومی‌سازی شده است، برای مثال، "رستوران"، "کافه"، "فرودگاه" و غیره. برچسب نوع ممکن است با نام نمایشی نوع اصلی متفاوت باشد و ممکن است نوع پشتیبانی شده در جدول انواع مکان API Places نباشد.

national_phone_number

string

یک شماره تلفن قابل خواندن توسط انسان برای آن مکان، در قالب ملی.

international_phone_number

string

یک شماره تلفن قابل خواندن توسط انسان برای آن مکان، در قالب بین‌المللی.

formatted_address

string

یک آدرس کامل و قابل خواندن توسط انسان برای این مکان.

short_formatted_address

string

یک آدرس کوتاه و خوانا برای این مکان.

postal_address

PostalAddress

آدرس در قالب آدرس پستی.

address_components[]

AddressComponent

اجزای تکراری برای هر سطح محلی. به حقایق زیر در مورد آرایه address_components[] توجه کنید: - آرایه اجزای آدرس ممکن است شامل اجزای بیشتری نسبت به formatted_address باشد. - این آرایه لزوماً شامل تمام موجودیت‌های سیاسی که حاوی یک آدرس هستند، جدا از آنهایی که در formatted_address قرار دارند، نمی‌شود. برای بازیابی تمام موجودیت‌های سیاسی که حاوی یک آدرس خاص هستند، باید از geocoding معکوس استفاده کنید و طول/عرض جغرافیایی آدرس را به عنوان پارامتر به درخواست ارسال کنید. - تضمین نمی‌شود که قالب پاسخ بین درخواست‌ها یکسان باقی بماند. به طور خاص، تعداد address_components بر اساس آدرس درخواستی متفاوت است و می‌تواند در طول زمان برای همان آدرس تغییر کند. یک جزء می‌تواند موقعیت خود را در آرایه تغییر دهد. نوع جزء می‌تواند تغییر کند. یک جزء خاص ممکن است در پاسخ بعدی از دست رفته باشد.

plus_code

PlusCode

کد بعلاوه موقعیت مکانی (طول/عرض).

location

LatLng

موقعیت این مکان.

viewport

Viewport

یک نمای مناسب برای نمایش مکان روی نقشه‌ای با اندازه متوسط. این نمای نباید به عنوان مرز فیزیکی یا منطقه خدماتی کسب و کار استفاده شود.

rating

double

امتیازی بین ۱.۰ تا ۵.۰، بر اساس نظرات کاربران در مورد این مکان.

google_maps_uri

string

یک URL که اطلاعات بیشتری در مورد این مکان ارائه می‌دهد.

website_uri

string

وب‌سایت معتبر برای این مکان، مثلاً صفحه اصلی یک کسب‌وکار. توجه داشته باشید که برای مکان‌هایی که بخشی از یک زنجیره هستند (مثلاً یک فروشگاه IKEA)، این معمولاً وب‌سایت فروشگاه مربوطه خواهد بود، نه کل زنجیره.

reviews[]

Review

فهرست نظرات درباره این مکان، مرتب شده بر اساس میزان اهمیت. حداکثر ۵ نظر قابل ارسال است.

regular_opening_hours

OpeningHours

ساعات کاری معمول. توجه داشته باشید که اگر مکانی همیشه باز باشد (24 ساعت)، فیلد close تنظیم نمی‌شود. مشتریان می‌توانند به این نکته تکیه کنند که همیشه باز (24 ساعت) به صورت یک دوره open شامل day با مقدار 0 ، hour با مقدار 0 و minute با مقدار 0 نمایش داده می‌شود.

time_zone

TimeZone

پایگاه داده منطقه زمانی IANA، منطقه زمانی. برای مثال "America/New_York".

photos[]

Photo

اطلاعات (شامل منابع) در مورد عکس‌های این مکان. حداکثر ۱۰ عکس قابل بازگشت است.

adr_format_address

string

آدرس مکان در ریزفرمت adr: http://microformats.org/wiki/adr .

business_status

BusinessStatus

وضعیت تجاری آن مکان.

opening_date

Date

تاریخی که این مکان در آینده افتتاح خواهد شد. این فیلد فقط در صورتی پر می‌شود که وضعیت کسب‌وکار FUTURE_OPENING باشد.

price_level

PriceLevel

سطح قیمت مکان.

attributions[]

Attribution

مجموعه‌ای از ارائه‌دهندگان داده که باید با این نتیجه نشان داده شوند.

icon_mask_base_uri

string

یک URL کوتاه شده به یک ماسک آیکون. کاربر می‌تواند با اضافه کردن پسوند نوع به انتهای آن (مثلاً ".svg" یا ".png") به نوع آیکون‌های مختلف دسترسی پیدا کند.

icon_background_color

string

رنگ پس‌زمینه برای icon_mask با فرمت هگز، مثلاً #909CE1.

current_opening_hours

OpeningHours

ساعات کاری برای هفت روز آینده (شامل امروز). این بازه زمانی از نیمه‌شب تاریخ درخواست شروع می‌شود و شش روز بعد ساعت ۱۱:۵۹ شب به پایان می‌رسد. این فیلد شامل زیرفیلد special_days مربوط به همه ساعات است که برای تاریخ‌هایی با ساعات کاری استثنایی تنظیم شده است.

current_secondary_opening_hours[]

OpeningHours

شامل آرایه‌ای از ورودی‌ها برای هفت روز آینده، شامل اطلاعات مربوط به ساعات کاری فرعی یک کسب‌وکار است. ساعات کاری فرعی با ساعات کاری اصلی یک کسب‌وکار متفاوت است. برای مثال، یک رستوران می‌تواند ساعات کاری درایو تو یا ساعات کاری تحویل را به عنوان ساعات کاری فرعی خود مشخص کند. این فیلد، زیرفیلد type را پر می‌کند که از یک لیست از پیش تعریف‌شده از انواع ساعات کاری (مانند DRIVE_THROUGH، PICKUP یا TAKEOUT) بر اساس انواع مکان استخراج می‌شود. این فیلد شامل زیرفیلد special_days مربوط به همه ساعات کاری است که برای تاریخ‌هایی با ساعات کاری استثنایی تنظیم شده است.

regular_secondary_opening_hours[]

OpeningHours

Contains an array of entries for information about regular secondary hours of a business. Secondary hours are different from a business's main hours. For example, a restaurant can specify drive through hours or delivery hours as its secondary hours. This field populates the type subfield, which draws from a predefined list of opening hours types (such as DRIVE_THROUGH, PICKUP, or TAKEOUT) based on the types of the place.

editorial_summary

LocalizedText

Contains a summary of the place. A summary is comprised of a textual overview, and also includes the language code for these if applicable. Summary text must be presented as-is and can not be modified or altered.

payment_options

PaymentOptions

Payment options the place accepts. If a payment option data is not available, the payment option field will be unset.

parking_options

ParkingOptions

Options of parking provided by the place.

sub_destinations[]

SubDestination

A list of sub-destinations related to the place.

fuel_options

FuelOptions

The most recent information about fuel options in a gas station. This information is updated regularly.

ev_charge_options

EVChargeOptions

Information of ev charging options.

generative_summary

GenerativeSummary

AI-generated summary of the place.

containing_places[]

ContainingPlace

List of places in which the current place is located.

address_descriptor

AddressDescriptor

The address descriptor of the place. Address descriptors include additional information that help describe a location using landmarks and areas. See address descriptor regional coverage in https://developers.google.com/maps/documentation/geocoding/address-descriptors/coverage .

price_range

PriceRange

The price range associated with a Place.

review_summary

ReviewSummary

AI-generated summary of the place using user reviews.

ev_charge_amenity_summary

EvChargeAmenitySummary

The summary of amenities near the EV charging station.

neighborhood_summary

NeighborhoodSummary

A summary of points of interest near the place.

consumer_alert

ConsumerAlert

The consumer alert message for the place when we detect suspicious review activity on a business or a business violates our policies.

moved_place

string

If this Place is permanently closed and has moved to a new Place, this field contains the new Place's resource name, in places/{place_id} format. If this Place moved multiple times, this field will represent the first moved place. This field will not be populated if this Place has not moved.

moved_place_id

string

If this Place is permanently closed and has moved to a new Place, this field contains the new Place's place ID. If this Place moved multiple times, this field will represent the first moved Place. This field will not be populated if this Place has not moved.

utc_offset_minutes

int32

Number of minutes this place's timezone is currently offset from UTC. This is expressed in minutes to support timezones that are offset by fractions of an hour, eg X hours and 15 minutes.

user_rating_count

int32

The total number of reviews (with or without text) for this place.

takeout

bool

Specifies if the business supports takeout.

delivery

bool

Specifies if the business supports delivery.

dine_in

bool

Specifies if the business supports indoor or outdoor seating options.

curbside_pickup

bool

Specifies if the business supports curbside pickup.

reservable

bool

Specifies if the place supports reservations.

serves_breakfast

bool

Specifies if the place serves breakfast.

serves_lunch

bool

Specifies if the place serves lunch.

serves_dinner

bool

Specifies if the place serves dinner.

serves_beer

bool

Specifies if the place serves beer.

serves_wine

bool

Specifies if the place serves wine.

serves_brunch

bool

Specifies if the place serves brunch.

serves_vegetarian_food

bool

Specifies if the place serves vegetarian food.

outdoor_seating

bool

Place provides outdoor seating.

live_music

bool

Place provides live music.

menu_for_children

bool

Place has a children's menu.

serves_cocktails

bool

Place serves cocktails.

serves_dessert

bool

Place serves dessert.

serves_coffee

bool

Place serves coffee.

good_for_children

bool

Place is good for children.

allows_dogs

bool

Place allows dogs.

restroom

bool

Place has restroom.

good_for_groups

bool

Place accommodates groups.

good_for_watching_sports

bool

Place is suitable for watching sports.

accessibility_options

AccessibilityOptions

Information about the accessibility options a place offers.

pure_service_area_business

bool

Indicates whether the place is a pure service area business. Pure service area business is a business that visits or delivers to customers directly but does not serve customers at their business address. For example, businesses like cleaning services or plumbers. Those businesses may not have a physical address or location on Google Maps.

AccessibilityOptions

Information about the accessibility options a place offers.

فیلدها
wheelchair_accessible_parking

bool

Place offers wheelchair accessible parking.

wheelchair_accessible_entrance

bool

Places has wheelchair accessible entrance.

wheelchair_accessible_restroom

bool

Place has wheelchair accessible restroom.

wheelchair_accessible_seating

bool

Place has wheelchair accessible seating.

کامپوننت آدرس

The structured components that form the formatted address, if this information is available.

فیلدها
long_text

string

The full text description or name of the address component. For example, an address component for the country Australia may have a long_name of "Australia".

short_text

string

An abbreviated textual name for the address component, if available. For example, an address component for the country of Australia may have a short_name of "AU".

types[]

string

An array indicating the type(s) of the address component.

language_code

string

The language used to format this components, in CLDR notation.

انتساب

Information about data providers of this place.

فیلدها
provider

string

Name of the Place's data provider.

provider_uri

string

URI to the Place's data provider.

BusinessStatus

Business status for the place.

انوم‌ها
BUSINESS_STATUS_UNSPECIFIED Default value. This value is unused.
OPERATIONAL The establishment is operational, not necessarily open now.
CLOSED_TEMPORARILY The establishment is temporarily closed.
CLOSED_PERMANENTLY The establishment is permanently closed.
FUTURE_OPENING The establishment will open in the future.

ConsumerAlert

The consumer alert message for the place when we detect suspicious review activity on a business or a business violates our policies.

فیلدها
overview

string

The overview of the consumer alert message.

details

Details

The details of the consumer alert message.

language_code

string

The language code of the consumer alert message. This is a BCP 47 language code.

جزئیات

The details of the consumer alert message.

فیلدها
title

string

The title to show together with the description.

description

string

The description of the consumer alert message.

ContainingPlace

Info about the place in which this place is located.

فیلدها
name

string

The resource name of the place in which this place is located.

id

string

The place id of the place in which this place is located.

EvChargeAmenitySummary

The summary of amenities near the EV charging station. This only applies to places with type electric_vehicle_charging_station . The overview field is guaranteed to be provided while the other fields are optional.

فیلدها
overview

ContentBlock

An overview of the available amenities. This is guaranteed to be provided.

coffee

ContentBlock

A summary of the nearby coffee options.

restaurant

ContentBlock

A summary of the nearby restaurants.

store

ContentBlock

A summary of the nearby stores.

flag_content_uri

string

A link where users can flag a problem with the summary.

disclosure_text

LocalizedText

The AI disclosure message "Summarized with Gemini" (and its localized variants). This will be in the language specified in the request if available.

GenerativeSummary

AI-generated summary of the place.

فیلدها
overview

LocalizedText

The overview of the place.

overview_flag_content_uri

string

A link where users can flag a problem with the overview summary.

disclosure_text

LocalizedText

The AI disclosure message "Summarized with Gemini" (and its localized variants). This will be in the language specified in the request if available.

NeighborhoodSummary

A summary of points of interest near the place.

فیلدها
overview

ContentBlock

An overview summary of the neighborhood.

description

ContentBlock

A detailed description of the neighborhood.

flag_content_uri

string

A link where users can flag a problem with the summary.

disclosure_text

LocalizedText

The AI disclosure message "Summarized with Gemini" (and its localized variants). This will be in the language specified in the request if available.

OpeningHours

Information about business hour of the place.

فیلدها
periods[]

Period

The periods that this place is open during the week. The periods are in chronological order, in the place-local timezone. An empty (but not absent) value indicates a place that is never open, eg because it is closed temporarily for renovations.

The starting day of periods is NOT fixed and should not be assumed to be Sunday. The API determines the start day based on a variety of factors. For example, for a 24/7 business, the first period may begin on the day of the request. For other businesses, it might be the first day of the week that they are open.

NOTE: The ordering of the periods array is independent of the ordering of the weekday_descriptions array. Do not assume they will begin on the same day.

weekday_descriptions[]

string

Localized strings describing the opening hours of this place, one string for each day of the week.

NOTE: The order of the days and the start of the week is determined by the locale (language and region). The ordering of the periods array is independent of the ordering of the weekday_descriptions array. Do not assume they will begin on the same day.

Will be empty if the hours are unknown or could not be converted to localized text. Example: "Sun: 18:00–06:00"

secondary_hours_type

SecondaryHoursType

A type string used to identify the type of secondary hours.

special_days[]

SpecialDay

Structured information for special days that fall within the period that the returned opening hours cover. Special days are days that could impact the business hours of a place, eg Christmas day. Set for current_opening_hours and current_secondary_opening_hours if there are exceptional hours.

next_open_time

Timestamp

The next time the current opening hours period starts up to 7 days in the future. This field is only populated if the opening hours period is not active at the time of serving the request.

next_close_time

Timestamp

The next time the current opening hours period ends up to 7 days in the future. This field is only populated if the opening hours period is active at the time of serving the request.

open_now

bool

Whether the opening hours period is currently active. For regular opening hours and current opening hours, this field means whether the place is open. For secondary opening hours and current secondary opening hours, this field means whether the secondary hours of this place is active.

دوره

A period the place remains in open_now status.

فیلدها
open

Point

The time that the place starts to be open.

close

Point

The time that the place starts to be closed.

نقطه

Status changing points.

فیلدها
date

Date

Date in the local timezone for the place.

truncated

bool

Whether or not this endpoint was truncated. Truncation occurs when the real hours are outside the times we are willing to return hours between, so we truncate the hours back to these boundaries. This ensures that at most 24 * 7 hours from midnight of the day of the request are returned.

day

int32

A day of the week, as an integer in the range 0-6. 0 is Sunday, 1 is Monday, etc.

hour

int32

The hour in 24 hour format. Ranges from 0 to 23.

minute

int32

The minute. Ranges from 0 to 59.

SecondaryHoursType

A type used to identify the type of secondary hours.

انوم‌ها
SECONDARY_HOURS_TYPE_UNSPECIFIED Default value when secondary hour type is not specified.
DRIVE_THROUGH The drive-through hour for banks, restaurants, or pharmacies.
HAPPY_HOUR The happy hour.
DELIVERY The delivery hour.
TAKEOUT The takeout hour.
KITCHEN The kitchen hour.
BREAKFAST The breakfast hour.
LUNCH The lunch hour.
DINNER The dinner hour.
BRUNCH The brunch hour.
PICKUP The pickup hour.
ACCESS The access hours for storage places.
SENIOR_HOURS The special hours for seniors.
ONLINE_SERVICE_HOURS The online service hours.

SpecialDay

Structured information for special days that fall within the period that the returned opening hours cover. Special days are days that could impact the business hours of a place, eg Christmas day.

فیلدها
date

Date

The date of this special day.

ParkingOptions

Information about parking options for the place. A parking lot could support more than one option at the same time.

فیلدها
free_parking_lot

bool

Place offers free parking lots.

paid_parking_lot

bool

Place offers paid parking lots.

free_street_parking

bool

Place offers free street parking.

paid_street_parking

bool

Place offers paid street parking.

valet_parking

bool

Place offers valet parking.

free_garage_parking

bool

Place offers free garage parking.

paid_garage_parking

bool

Place offers paid garage parking.

گزینه‌های پرداخت

Payment options the place accepts.

فیلدها
accepts_credit_cards

bool

Place accepts credit cards as payment.

accepts_debit_cards

bool

Place accepts debit cards as payment.

accepts_cash_only

bool

Place accepts cash only as payment. Places with this attribute may still accept other payment methods.

accepts_nfc

bool

Place accepts NFC payments.

پلاس‌کد

Plus code ( http://plus.codes ) is a location reference with two formats: global code defining a 14mx14m (1/8000th of a degree) or smaller rectangle, and compound code, replacing the prefix with a reference location.

فیلدها
global_code

string

Place's global (full) code, such as "9FWM33GV+HQ", representing an 1/8000 by 1/8000 degree area (~14 by 14 meters).

compound_code

string

Place's compound code, such as "33GV+HQ, Ramberg, Norway", containing the suffix of the global code and replacing the prefix with a formatted name of a reference entity.

ReviewSummary

AI-generated summary of the place using user reviews.

فیلدها
text

LocalizedText

The summary of user reviews.

flag_content_uri

string

A link where users can flag a problem with the summary.

disclosure_text

LocalizedText

The AI disclosure message "Summarized with Gemini" (and its localized variants). This will be in the language specified in the request if available.

reviews_uri

string

A link to show reviews of this place on Google Maps.

SubDestination

Sub-destinations are specific places associated with a main place. These provide more specific destinations for users who are searching within a large or complex place, like an airport, national park, university, or stadium. For example, sub-destinations at an airport might include associated terminals and parking lots. Sub-destinations return the place ID and place resource name, which can be used in subsequent Place Details (New) requests to fetch richer details, including the sub-destination's display name and location.

فیلدها
name

string

The resource name of the sub-destination.

id

string

The place id of the sub-destination.

Polyline

A route polyline. Only supports an encoded polyline , which can be passed as a string and includes compression with minimal lossiness. This is the Routes API default output.

فیلدها
Union field polyline_type . Encapsulates the type of polyline. Routes API output defaults to encoded_polyline . polyline_type can be only one of the following:
encoded_polyline

string

An encoded polyline , as returned by the Routes API by default . See the encoder and decoder tools.

PriceLevel

Price level of the place.

انوم‌ها
PRICE_LEVEL_UNSPECIFIED Place price level is unspecified or unknown.
PRICE_LEVEL_FREE Place provides free services.
PRICE_LEVEL_INEXPENSIVE Place provides inexpensive services.
PRICE_LEVEL_MODERATE Place provides moderately priced services.
PRICE_LEVEL_EXPENSIVE Place provides expensive services.
PRICE_LEVEL_VERY_EXPENSIVE Place provides very expensive services.

PriceRange

The price range associated with a Place. end_price could be unset, which indicates a range without upper bound (eg "More than $100").

فیلدها
start_price

Money

The low end of the price range (inclusive). Price should be at or above this amount.

end_price

Money

The high end of the price range (exclusive). Price should be lower than this amount.

نقد و بررسی

Information about a review of a place.

فیلدها
name

string

A reference representing this place review which may be used to look up this place review again (also called the API "resource" name: places/{place_id}/reviews/{review} ).

relative_publish_time_description

string

A string of formatted recent time, expressing the review time relative to the current time in a form appropriate for the language and country.

text

LocalizedText

The localized text of the review.

original_text

LocalizedText

The review text in its original language.

rating

double

A number between 1.0 and 5.0, also called the number of stars.

author_attribution

AuthorAttribution

This review's author.

publish_time

Timestamp

Timestamp for the review.

flag_content_uri

string

A link where users can flag a problem with the review.

google_maps_uri

string

A link to show the review on Google Maps.

visit_date

Date

The date when the author visited the place. This is truncated to the year and month of the visit.

اصلاح‌کننده‌های مسیر

Encapsulates a set of optional conditions to satisfy when calculating the routes.

فیلدها
avoid_tolls

bool

Optional. When set to true, avoids toll roads where reasonable, giving preference to routes not containing toll roads. Applies only to the DRIVE and TWO_WHEELER TravelMode .

avoid_highways

bool

Optional. When set to true, avoids highways where reasonable, giving preference to routes not containing highways. Applies only to the DRIVE and TWO_WHEELER TravelMode .

avoid_ferries

bool

Optional. When set to true, avoids ferries where reasonable, giving preference to routes not containing ferries. Applies only to the DRIVE and TWO_WHEELER TravelMode .

avoid_indoor

bool

Optional. When set to true, avoids navigating indoors where reasonable, giving preference to routes not containing indoor navigation. Applies only to the WALK TravelMode .

RoutingParameters

Parameters to configure the routing calculations to the places in the response, both along a route (where result ranking will be influenced) and for calculating travel times on results.

فیلدها
origin

LatLng

Optional. An explicit routing origin that overrides the origin defined in the polyline. By default, the polyline origin is used.

travel_mode

TravelMode

Optional. The travel mode.

route_modifiers

RouteModifiers

Optional. The route modifiers.

routing_preference

RoutingPreference

Optional. Specifies how to compute the routing summaries. The server attempts to use the selected routing preference to compute the route. The traffic aware routing preference is only available for the DRIVE or TWO_WHEELER travelMode .

RoutingPreference

A set of values that specify factors to take into consideration when calculating the route.

انوم‌ها
ROUTING_PREFERENCE_UNSPECIFIED No routing preference specified. Default to TRAFFIC_UNAWARE .
TRAFFIC_UNAWARE Computes routes without taking live traffic conditions into consideration. Suitable when traffic conditions don't matter or are not applicable. Using this value produces the lowest latency. Note: For TravelMode DRIVE and TWO_WHEELER , the route and duration chosen are based on road network and average time-independent traffic conditions, not current road conditions. Consequently, routes may include roads that are temporarily closed. Results for a given request may vary over time due to changes in the road network, updated average traffic conditions, and the distributed nature of the service. Results may also vary between nearly-equivalent routes at any time or frequency.
TRAFFIC_AWARE Calculates routes taking live traffic conditions into consideration. In contrast to TRAFFIC_AWARE_OPTIMAL , some optimizations are applied to significantly reduce latency.
TRAFFIC_AWARE_OPTIMAL Calculates the routes taking live traffic conditions into consideration, without applying most performance optimizations. Using this value produces the highest latency.

RoutingSummary

The duration and distance from the routing origin to a place in the response, and a second leg from that place to the destination, if requested. Note: Adding routingSummaries in the field mask without also including either the routingParameters.origin parameter or the searchAlongRouteParameters.polyline.encodedPolyline parameter in the request causes an error.

فیلدها
legs[]

Leg

The legs of the trip.

When you calculate travel duration and distance from a set origin, legs contains a single leg containing the duration and distance from the origin to the destination. When you do a search along route, legs contains two legs: one from the origin to place, and one from the place to the destination.

directions_uri

string

A link to show directions on Google Maps using the waypoints from the given routing summary. The route generated by this link is not guaranteed to be the same as the route used to generate the routing summary. The link uses information provided in the request, from fields including routingParameters and searchAlongRouteParameters when applicable, to generate the directions link.

ساق پا

A leg is a single portion of a journey from one location to another.

فیلدها
duration

Duration

The time it takes to complete this leg of the trip.

distance_meters

int32

The distance of this leg of the trip.

SearchNearbyRequest

Request proto for Search Nearby.

فیلدها
language_code

string

Place details will be displayed with the preferred language if available. If the language code is unspecified or unrecognized, place details of any language may be returned, with a preference for English if such details exist.

Current list of supported languages: https://developers.google.com/maps/faq#languagesupport .

region_code

string

The Unicode country/region code (CLDR) of the location where the request is coming from. This parameter is used to display the place details, like region-specific place name, if available. The parameter can affect results based on applicable law.

For more information, see https://www.unicode.org/cldr/charts/latest/supplemental/territory_language_information.html .

Note that 3-digit region codes are not currently supported.

included_types[]

string

Included Place type (eg, "restaurant" or "gas_station") from https://developers.google.com/maps/documentation/places/web-service/place-types .

Up to 50 types from Table A may be specified.

If there are any conflicting types, ie a type appears in both included_types and excluded_types, an INVALID_ARGUMENT error is returned.

If a Place type is specified with multiple type restrictions, only places that satisfy all of the restrictions are returned. For example, if we have {included_types = ["restaurant"], excluded_primary_types = ["restaurant"]}, the returned places provide "restaurant" related services but do not operate primarily as "restaurants".

excluded_types[]

string

Excluded Place type (eg, "restaurant" or "gas_station") from https://developers.google.com/maps/documentation/places/web-service/place-types .

Up to 50 types from Table A may be specified.

If the client provides both included_types (eg restaurant) and excluded_types (eg cafe), then the response should include places that are restaurant but not cafe. The response includes places that match at least one of the included_types and none of the excluded_types.

If there are any conflicting types, ie a type appears in both included_types and excluded_types, an INVALID_ARGUMENT error is returned.

If a Place type is specified with multiple type restrictions, only places that satisfy all of the restrictions are returned. For example, if we have {included_types = ["restaurant"], excluded_primary_types = ["restaurant"]}, the returned places provide "restaurant" related services but do not operate primarily as "restaurants".

included_primary_types[]

string

Included primary Place type (eg "restaurant" or "gas_station") from https://developers.google.com/maps/documentation/places/web-service/place-types . A place can only have a single primary type from the supported types table associated with it.

Up to 50 types from Table A may be specified.

If there are any conflicting primary types, ie a type appears in both included_primary_types and excluded_primary_types, an INVALID_ARGUMENT error is returned.

If a Place type is specified with multiple type restrictions, only places that satisfy all of the restrictions are returned. For example, if we have {included_types = ["restaurant"], excluded_primary_types = ["restaurant"]}, the returned places provide "restaurant" related services but do not operate primarily as "restaurants".

excluded_primary_types[]

string

Excluded primary Place type (eg "restaurant" or "gas_station") from https://developers.google.com/maps/documentation/places/web-service/place-types .

Up to 50 types from Table A may be specified.

If there are any conflicting primary types, ie a type appears in both included_primary_types and excluded_primary_types, an INVALID_ARGUMENT error is returned.

If a Place type is specified with multiple type restrictions, only places that satisfy all of the restrictions are returned. For example, if we have {included_types = ["restaurant"], excluded_primary_types = ["restaurant"]}, the returned places provide "restaurant" related services but do not operate primarily as "restaurants".

max_result_count

int32

Maximum number of results to return. It must be between 1 and 20 (default), inclusively. If the number is unset, it falls back to the upper limit. If the number is set to negative or exceeds the upper limit, an INVALID_ARGUMENT error is returned.

location_restriction

LocationRestriction

Required. The region to search.

rank_preference

RankPreference

How results will be ranked in the response.

routing_parameters

RoutingParameters

Optional. Parameters that affect the routing to the search results.

include_future_opening_businesses

bool

Optional. If true, include businesses that are not yet open but will open in the future.

LocationRestriction

The region to search.

فیلدها

Union field type .

type can be only one of the following:

circle

Circle

A circle defined by center point and radius.

RankPreference

How results will be ranked in the response.

انوم‌ها
RANK_PREFERENCE_UNSPECIFIED RankPreference value not set. Will use rank by POPULARITY by default.
DISTANCE Ranks results by distance.
POPULARITY Ranks results by popularity.

SearchNearbyResponse

Response proto for Search Nearby.

فیلدها
places[]

Place

A list of places that meets user's requirements like places types, number of places and specific location restriction.

routing_summaries[]

RoutingSummary

A list of routing summaries where each entry associates to the corresponding place in the same index in the places field. If the routing summary is not available for one of the places, it will contain an empty entry. This list should have as many entries as the list of places if requested.

SearchTextRequest

Request proto for SearchText.

فیلدها
text_query

string

Required. The text query for textual search.

language_code

string

Place details will be displayed with the preferred language if available. If the language code is unspecified or unrecognized, place details of any language may be returned, with a preference for English if such details exist.

Current list of supported languages: https://developers.google.com/maps/faq#languagesupport .

region_code

string

The Unicode country/region code (CLDR) of the location where the request is coming from. This parameter is used to display the place details, like region-specific place name, if available. The parameter can affect results based on applicable law.

For more information, see https://www.unicode.org/cldr/charts/latest/supplemental/territory_language_information.html .

Note that 3-digit region codes are not currently supported.

rank_preference

RankPreference

How results will be ranked in the response.

included_type

string

The requested place type. Full list of types supported: https://developers.google.com/maps/documentation/places/web-service/place-types . Only support one included type.

open_now

bool

Used to restrict the search to places that are currently open. The default is false.

min_rating

double

Filter out results whose average user rating is strictly less than this limit. A valid value must be a float between 0 and 5 (inclusively) at a 0.5 cadence ie [0, 0.5, 1.0, ... , 5.0] inclusively. The input rating will round up to the nearest 0.5(ceiling). For instance, a rating of 0.6 will eliminate all results with a less than 1.0 rating.

max_result_count
(deprecated)

int32

Deprecated: Use page_size instead.

The maximum number of results per page that can be returned. If the number of available results is larger than max_result_count , a next_page_token is returned which can be passed to page_token to get the next page of results in subsequent requests. If 0 or no value is provided, a default of 20 is used. The maximum value is 20; values above 20 will be coerced to 20. Negative values will return an INVALID_ARGUMENT error.

If both max_result_count and page_size are specified, max_result_count will be ignored.

page_size

int32

Optional. The maximum number of results per page that can be returned. If the number of available results is larger than page_size , a next_page_token is returned which can be passed to page_token to get the next page of results in subsequent requests. If 0 or no value is provided, a default of 20 is used. The maximum value is 20; values above 20 will be set to 20. Negative values will return an INVALID_ARGUMENT error.

If both max_result_count and page_size are specified, max_result_count will be ignored.

page_token

string

Optional. A page token, received from a previous TextSearch call. Provide this to retrieve the subsequent page.

When paginating, all parameters other than page_token , page_size , and max_result_count provided to TextSearch must match the initial call that provided the page token. Otherwise an INVALID_ARGUMENT error is returned.

price_levels[]

PriceLevel

Used to restrict the search to places that are marked as certain price levels. Users can choose any combinations of price levels. Default to select all price levels.

strict_type_filtering

bool

Used to set strict type filtering for included_type. If set to true, only results of the same type will be returned. Default to false.

location_bias

LocationBias

The region to search. This location serves as a bias which means results around given location might be returned. Cannot be set along with location_restriction.

location_restriction

LocationRestriction

The region to search. This location serves as a restriction which means results outside given location will not be returned. Cannot be set along with location_bias.

ev_options

EVOptions

Optional. Set the searchable EV options of a place search request.

routing_parameters

RoutingParameters

Optional. Additional parameters for routing to results.

search_along_route_parameters

SearchAlongRouteParameters

Optional. Additional parameters proto for searching along a route.

include_pure_service_area_businesses

bool

Optional. Include pure service area businesses if the field is set to true. Pure service area business is a business that visits or delivers to customers directly but does not serve customers at their business address. For example, businesses like cleaning services or plumbers. Those businesses do not have a physical address or location on Google Maps. Places will not return fields including location , plus_code , and other location related fields for these businesses.

include_future_opening_businesses

bool

Optional. If true, include businesses that are not yet open but will open in the future.

EVOptions

Searchable EV options of a place search request.

فیلدها
minimum_charging_rate_kw

double

Optional. Minimum required charging rate in kilowatts. A place with a charging rate less than the specified rate is filtered out.

connector_types[]

EVConnectorType

Optional. The list of preferred EV connector types. A place that does not support any of the listed connector types is filtered out.

LocationBias

The region to search. This location serves as a bias which means results around given location might be returned.

فیلدها

Union field type .

type can be only one of the following:

rectangle

Viewport

A rectangle box defined by northeast and southwest corner. rectangle.high() must be the northeast point of the rectangle viewport. rectangle.low() must be the southwest point of the rectangle viewport. rectangle.low().latitude() cannot be greater than rectangle.high().latitude() . This will result in an empty latitude range. A rectangle viewport cannot be wider than 180 degrees.

circle

Circle

A circle defined by center point and radius.

LocationRestriction

The region to search. This location serves as a restriction which means results outside given location will not be returned.

فیلدها

Union field type .

type can be only one of the following:

rectangle

Viewport

A rectangle box defined by northeast and southwest corner. rectangle.high() must be the northeast point of the rectangle viewport. rectangle.low() must be the southwest point of the rectangle viewport. rectangle.low().latitude() cannot be greater than rectangle.high().latitude() . This will result in an empty latitude range. A rectangle viewport cannot be wider than 180 degrees.

RankPreference

How results will be ranked in the response.

انوم‌ها
RANK_PREFERENCE_UNSPECIFIED For a categorical query such as "Restaurants in New York City", RELEVANCE is the default. For non-categorical queries such as "Mountain View, CA" we recommend that you leave rankPreference unset.
DISTANCE Ranks results by distance.
RELEVANCE Ranks results by relevance. Sort order determined by normal ranking stack.

SearchAlongRouteParameters

Specifies a precalculated polyline from the Routes API defining the route to search. Searching along a route is similar to using the locationBias or locationRestriction request option to bias the search results. However, while the locationBias and locationRestriction options let you specify a region to bias the search results, this option lets you bias the results along a trip route.

Results are not guaranteed to be along the route provided, but rather are ranked within the search area defined by the polyline and, optionally, by the locationBias or locationRestriction based on minimal detour times from origin to destination. The results might be along an alternate route, especially if the provided polyline does not define an optimal route from origin to destination.

فیلدها
polyline

Polyline

Required. The route polyline.

SearchTextResponse

Response proto for SearchText.

فیلدها
places[]

Place

A list of places that meet the user's text search criteria.

routing_summaries[]

RoutingSummary

A list of routing summaries where each entry associates to the corresponding place in the same index in the places field. If the routing summary is not available for one of the places, it will contain an empty entry. This list will have as many entries as the list of places if requested.

contextual_contents[]

ContextualContent

Experimental: See https://developers.google.com/maps/documentation/places/web-service/experimental/places-generative for more details.

A list of contextual contents where each entry associates to the corresponding place in the same index in the places field. The contents that are relevant to the text_query in the request are preferred. If the contextual content is not available for one of the places, it will return non-contextual content. It will be empty only when the content is unavailable for this place. This list will have as many entries as the list of places if requested.

next_page_token

string

A token that can be sent as page_token to retrieve the next page. If this field is omitted or empty, there are no subsequent pages.

search_uri

string

A link allows the user to search with the same text query as specified in the request on Google Maps.

TravelMode

Travel mode options. These options map to what Routes API offers .

انوم‌ها
TRAVEL_MODE_UNSPECIFIED No travel mode specified. Defaults to DRIVE .
DRIVE Travel by passenger car.
BICYCLE Travel by bicycle. Not supported with search_along_route_parameters .
WALK Travel by walking. Not supported with search_along_route_parameters .
TWO_WHEELER Motorized two wheeled vehicles of all kinds such as scooters and motorcycles. Note that this is distinct from the BICYCLE travel mode which covers human-powered transport. Not supported with search_along_route_parameters . Only supported in those countries listed at Countries and regions supported for two-wheeled vehicles .