কাছাকাছি অনুসন্ধানে স্থানান্তরিত করুন (নতুন)
সেভ করা পৃষ্ঠা গুছিয়ে রাখতে 'সংগ্রহ' ব্যবহার করুন
আপনার পছন্দ অনুযায়ী কন্টেন্ট সেভ করুন ও সঠিক বিভাগে রাখুন।
ইউরোপিয়ান ইকোনমিক এরিয়া (EEA) ডেভেলপার ভূমিকা
Places API কাছাকাছি অনুসন্ধান (লেগেসি) সমর্থন করে। আপনি যদি কাছাকাছি অনুসন্ধান (উত্তরাধিকার) এর সাথে পরিচিত হন তবে কাছাকাছি অনুসন্ধান (নতুন) নিম্নলিখিত পরিবর্তনগুলি করে:
- কাছাকাছি অনুসন্ধান (নতুন) HTTP POST অনুরোধ ব্যবহার করে। একটি HTTP POST অনুরোধের অংশ হিসাবে অনুরোধের বডিতে বা হেডারে প্যারামিটারগুলি পাস করুন৷ বিপরীতে, কাছাকাছি অনুসন্ধান (উত্তরাধিকার), আপনি একটি HTTP GET অনুরোধ ব্যবহার করে URL প্যারামিটার পাস করেন।
- ক্ষেত্র মাস্কিং প্রয়োজন. প্রতিক্রিয়ায় আপনি কোন ক্ষেত্রগুলি ফেরত দিতে চান তা অবশ্যই উল্লেখ করতে হবে। প্রত্যাবর্তিত ক্ষেত্রের কোনো ডিফল্ট তালিকা নেই। আপনি যদি এই তালিকাটি বাদ দেন, পদ্ধতিগুলি একটি ত্রুটি ফেরত দেয়। আরও তথ্যের জন্য, ফিল্ডমাস্ক দেখুন।
- কাছাকাছি অনুসন্ধান (নতুন) প্রমাণীকরণ প্রক্রিয়া হিসাবে API কী এবং OAuth টোকেন উভয়কেই সমর্থন করে।
- নিকটবর্তী অনুসন্ধানে (নতুন) প্রতিক্রিয়া বিন্যাস হিসাবে শুধুমাত্র JSON সমর্থিত।
- একটি পাঠ্য ক্যোয়ারী অন্তর্ভুক্ত সমস্ত অনুরোধ এখন পাঠ্য অনুসন্ধান (নতুন) ব্যবহার করা উচিত কারণ কাছাকাছি অনুসন্ধান (নতুন) পাঠ্য ইনপুট সমর্থন করে না।
- কাছাকাছি অনুসন্ধান (নতুন) এর জন্য JSON প্রতিক্রিয়া বিন্যাস উত্তরাধিকার API-এর বিন্যাস থেকে পরিবর্তিত হয়েছে। আরও বিশদ বিবরণের জন্য, স্থানান্তর করুন এপিআই প্রতিক্রিয়া দেখুন।
নিচের সারণীটি কাছাকাছি অনুসন্ধান (উত্তরাধিকার) এর প্যারামিটারগুলিকে তালিকাভুক্ত করে যেগুলি কাছাকাছি অনুসন্ধান (নতুন) এর জন্য পুনঃনামকরণ বা পরিবর্তন করা হয়েছে, বা যে প্যারামিটারগুলি আর সমর্থিত নয়৷
বর্তমান পরামিতি | নতুন প্যারামিটার | নোট |
---|
keyword | | সমর্থিত নয়। পরিবর্তে পাঠ্য অনুসন্ধান (নতুন) ব্যবহার করুন। |
language | languageCode | |
location | locationRestriction | প্রয়োজন। |
maxprice/minprice |
| সমর্থিত নয়। |
| maxResultCount | নতুন প্যারামিটার। |
opennow |
| সমর্থিত নয়। |
pagetoken | | সমর্থিত নয়। |
radius |
| এখন locationRestriction ব্যবহার করুন। |
rankby | rankPreference | |
| regionCode | নতুন প্যারামিটার। |
type | includedTypes excludedTypes includedPrimaryTypes excludedPrimaryTypes | নতুন প্যারামিটারগুলি একাধিক প্রকারের মানও গ্রহণ করে। উত্তরাধিকার API শুধুমাত্র একটি একক মান গ্রহণ করে। |
উদাহরণ অনুরোধ
নিম্নলিখিত উদাহরণ GET অনুরোধ কাছাকাছি অনুসন্ধান (উত্তরাধিকার) ব্যবহার করে। এই উদাহরণে, আপনি restaurant
ধরনগুলির স্থানগুলির তথ্য সম্বলিত একটি JSON প্রতিক্রিয়ার অনুরোধ করেন এবং URL প্যারামিটার হিসাবে সমস্ত প্যারামিটার পাস করেন:
curl -L -X GET \
'https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=37.7937%2C-122.3965&radius=500&type=restaurant&key=API_KEY'
কাছাকাছি অনুসন্ধান (নতুন), আপনি একটি POST অনুরোধ করেন এবং JSON অনুরোধের অংশে বা POST অনুরোধের অংশ হিসাবে শিরোনামে সমস্ত প্যারামিটার পাস করেন৷ এই উদাহরণটি একটি ফিল্ড মাস্কও ব্যবহার করে তাই প্রতিক্রিয়াতে শুধুমাত্র প্রদর্শনের নাম এবং স্থানের বিন্যাসিত ঠিকানা অন্তর্ভুক্ত থাকে:
curl -X POST -d '{
"includedTypes": ["restaurant"],
"locationRestriction": {
"circle": {
"center": {
"latitude": 37.7937,
"longitude": -122.3965},
"radius": 500.0
}
}
}' \
-H 'Content-Type: application/json' -H "X-Goog-Api-Key: API_KEY" \
-H "X-Goog-FieldMask: places.displayName,places.formattedAddress" \
https://places.googleapis.com/v1/places:searchNearby
অন্য কিছু উল্লেখ না করা থাকলে, এই পৃষ্ঠার কন্টেন্ট Creative Commons Attribution 4.0 License-এর অধীনে এবং কোডের নমুনাগুলি Apache 2.0 License-এর অধীনে লাইসেন্স প্রাপ্ত। আরও জানতে, Google Developers সাইট নীতি দেখুন। Java হল Oracle এবং/অথবা তার অ্যাফিলিয়েট সংস্থার রেজিস্টার্ড ট্রেডমার্ক।
2025-09-04 UTC-তে শেষবার আপডেট করা হয়েছে।
[null,null,["2025-09-04 UTC-তে শেষবার আপডেট করা হয়েছে।"],[],[],null,["**European Economic Area (EEA) developers** If your billing address is in the European Economic Area, effective on 8 July 2025, the [Google Maps Platform EEA Terms of Service](https://cloud.google.com/terms/maps-platform/eea) will apply to your use of the Services. Functionality varies by region. [Learn more](/maps/comms/eea/faq).\n\nIntroduction\n\nPlaces API supports\n[Nearby Search (Legacy)](/maps/documentation/places/web-service/search-nearby).\nIf you are familiar with Nearby Search (Legacy), the [Nearby Search (New)](/maps/documentation/places/web-service/nearby-search) makes the following\nchanges:\n\n- Nearby Search (New) uses HTTP POST requests. Pass parameters in the request body or in headers as part of an HTTP POST request. In contrast, with Nearby Search (Legacy), you pass URL parameters using an HTTP GET request.\n- Field masking is required. You must specify which fields you want returned in the response. There is no default list of returned fields. If you omit this list, the methods return an error. For more information, see [FieldMask](/maps/documentation/places/web-service/nearby-search#fieldmask).\n- Nearby Search (New) supports both [API keys](/maps/documentation/places/web-service/get-api-key) and [OAuth](/maps/documentation/places/web-service/oauth-token) tokens as the authentication mechanism.\n- Only JSON is supported as a response format in Nearby Search (New).\n- All requests that include a text query should now use [Text Search (New)](/maps/documentation/places/web-service/text-search) because Nearby Search (New) does not support text input.\n- The JSON response format for Nearby Search (New) has changed from the format of the legacy APIs. For more details, see [Migrate the Places API response](/maps/documentation/places/web-service/migrate-response).\n\nThe following table lists parameters in Nearby Search (Legacy) that have been\nrenamed or modified for Nearby Search (New), or parameters that are no\nlonger supported.\n\n| Current parameter | New parameter | Notes |\n|---------------------|-------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------|\n| `keyword` | | Not supported. Use [Text Search (New)](/maps/documentation/places/web-service/text-search) instead. |\n| `language` | `languageCode` | |\n| `location` | `locationRestriction` | Required. |\n| `maxprice/minprice` | | Not supported. |\n| | `maxResultCount` | New parameter. |\n| `opennow` | | Not supported. |\n| `pagetoken` | | Not supported. |\n| `radius` | | Use `locationRestriction` now. |\n| `rankby` | `rankPreference` | |\n| | `regionCode` | New parameter. |\n| `type` | `includedTypes` `excludedTypes` `includedPrimaryTypes` `excludedPrimaryTypes` | The new parameters also accept multiple type values. The legacy API only accepts a single value. |\n\nExample request\n\nThe following example GET request uses the Nearby Search (Legacy). In this\nexample, you request a JSON response containing information about places of type\n`restaurant` and pass all parameters as URL parameters: \n\n```curl\ncurl -L -X GET \\\n'https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=37.7937%2C-122.3965&radius=500&type=restaurant&key=API_KEY'\n```\n\nWith Nearby Search (New), you make a POST request and pass all\nparameters in the JSON request body or in headers as part of the POST request.\nThis example also uses a field mask so the response only includes the display\nname and formatted address of the place: \n\n```curl\ncurl -X POST -d '{\n \"includedTypes\": [\"restaurant\"],\n \"locationRestriction\": {\n \"circle\": {\n \"center\": {\n \"latitude\": 37.7937,\n \"longitude\": -122.3965},\n \"radius\": 500.0\n }\n }\n}' \\\n-H 'Content-Type: application/json' -H \"X-Goog-Api-Key: API_KEY\" \\\n-H \"X-Goog-FieldMask: places.displayName,places.formattedAddress\" \\\nhttps://places.googleapis.com/v1/places:searchNearby\n```"]]