Sand AISand AI MAGI-2MAGI-2 अब SandBase पर है: 1080p वीडियो, नेटीव ऑडियो के साथअभी आज़माएँ

Brave Place Search

API दस्तावेज़
https://api.sandbase.ai/v1/api/brave/local-place-search

Place Search from Brave. Returns the official Brave API response unchanged.

मूल्य
$0.005USD / कॉल
मेथड
POST
प्रतिक्रिया
JSON
पैरामीटर
0 आवश्यक · 13 वैकल्पिक

प्लेग्राउंड

इनपुट
1100
Number of results to return. The maximum is 100. सीमा: 1 से 100.
Two-letter country code (ISO 3166-1 alpha-2) to scope the search.
Optional geolocation of the user in the format <latitude>x<longitude> . Used to calculate distance values in results.
Latitude of the geographical coordinates. सीमा: -90 से 90.
Location string to search for points of interest in an area. This is alternative to the latitude and longitude parameters. For locations in US prefer the form <city> <state> <country name> , ie. san francisco ca united states For non-US locations, use the form <city> <country name> , ie. tokyo japan
Longitude of the geographical coordinates. सीमा: -180 से 180.
Query string to search for points of interest in an area. If no q is provided, the endpoint will return general points of interest in the given area.
Search radius bias around the given coordinates, in meters. NOTE : This is not strictly the radius of the search (nor the resulting radius of the results), but rather a bias towards results that are closer to the given coordinates. Search is performed globally if no radius is provided. न्यूनतम: 0.
Safe search level for the query results.
Language for the search results.
Whether to apply spellcheck before executing the search.
User interface language for the response. Usually <language>-<region> .
Units of measurement for distance values: metric is kilometres, imperial is miles.
आउटपुटतैयार

आपका आउटपुट यहाँ दिखाई देगा

इनपुट पूरा करें, फिर Run पर क्लिक करें।

API README

Brave Place Search API

Returns a list of places (points of interest) that match a search query in an area. You give a q such as coffee and either a location string or latitude and longitude. Each result has a name, address, coordinates, phone number, opening hours and rating.

Use cases

  • Build a store locator that lists nearby cafes with address and phone number.
  • Show opening hours for each day so a user can see which places are open now.
  • Compare ratings and review counts across places of one type in a city.
  • Plot results on a map using the coordinates of each place.

Request

curl -X POST "https://api.sandbase.ai/v1/api/brave/local-place-search" \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"q": "coffee", "location": "seattle washington united states"}'

The result is returned in outputs[0].data.

Parameters

NameTypeRequiredDescription
countintegerNoNumber of results to return. The maximum is 100.
countrystringNoTwo-letter country code (ISO 3166-1 alpha-2) to scope the search.
geolocstringNoOptional geolocation of the user in the format <latitude>x<longitude> . Used to calculate distance values in results.
latitudenumberNoLatitude of the geographical coordinates.
locationstringNoLocation string to search for points of interest in an area. This is alternative to the latitude and longitude parameters. For locations in US prefer the form <city> <state> <country name> , ie. san francisco ca united s
longitudenumberNoLongitude of the geographical coordinates.
qstringNoQuery string to search for points of interest in an area. If no q is provided, the endpoint will return general points of interest in the given area.
radiusnumberNoSearch radius bias around the given coordinates, in meters. NOTE : This is not strictly the radius of the search (nor the resulting radius of the results), but rather a bias towards results that are closer to the given c
safesearchstringNoSafe search level for the query results.
search_langstringNoLanguage for the search results.
spellcheckbooleanNoWhether to apply spellcheck before executing the search.
ui_langstringNoUser interface language for the response. Usually <language>-<region> .
unitsstringNoUnits of measurement for distance values: metric is kilometres, imperial is miles.

Example response

Real response for the request above, trimmed: lists keep their first item and long strings are cut.

{
  "addresses": [],
  "cities": [],
  "countries": [],
  "location": {
    "coordinates": [
      47.60621
    ],
    "country": "US",
    "name": "Seattle"
  },
  "mixed": [
    {
      "all": false,
      "index": 0,
      "type": "results"
    }
  ],
  "neighborhoods": [],
  "regions": [],
  "results": [
    {
      "categories": [
        "bakery"
      ],
      "contact": {
        "telephone": "+12067805777"
      },
      "coordinates": [
        47.60895
      ],
      "description": "Coffee Shop",
      "family_friendly": true,
      "icon_category": "cafe",
      "id": "loc4DFZ5OEXSZVDUAEEDV6PMTFK6YDFANIHQIRRVKLA=",
      "is_source_both": false,
      "is_source_local": false,
      "opening_hours": {
        "current_day": [
          {
            "abbr_name": "Tue",
            "closes": "17:00",
            "full_name": "Tuesday",
            "opens": "06:59"
          }
        ],
        "days": [
          [
            {
              "abbr_name": "Mon",
              "closes": "17:00",
              "full_name": "Monday",
              "opens": "06:59"
            }
          ]
        ]
      },
      "pictures": {
        "results": [
          {
            "original": "https://lh3.googleusercontent.com/p/AF1QipN6QS0pKXaJqJ7VUigWGEyXcjYJhKqayDx2TlVW…",
            "src": "https://imgs.search.brave.com/XjGqFPcOkdFwsXjUb7-etFuMZCsudU6EnuAEzElKZ1Y/rs:fit…"
          }
        ]
      },
      "postal_address": {
        "displayAddress": "94 Pike St Top floor Suite 34, Seattle, WA 98101",
        "type": "PostalAddress"
      }
    }
  ],
  "streets": [],
  "type": "locations"
}

Response fields

FieldMeaning
results[].titleName of the place.
results[].idPlace ID, such as loc4DFZ5OEXSZVDUAEEDV6PMTFK6YDFANIHQIRRVKLA=. Use it to look up more details about the place.
results[].postal_address.displayAddressFull street address as one text line.
results[].coordinatesTwo numbers for the place. The first value matches latitude and the second matches longitude.
results[].contact.telephonePhone number in international format.
results[].rating.ratingValue / results[].rating.bestRating / results[].rating.reviewCountAverage rating, the top possible rating, and the number of reviews behind the rating.
results[].opening_hours.current_day[] / results[].opening_hours.days[][]Opening and closing times (opens, closes, as HH:MM) with the day name in full_name and abbr_name. current_day holds today's hours.
results[].categories / results[].descriptionCategory tags and a short type label such as Coffee Shop.
results[].url / results[].thumbnail.src / results[].pictures.results[].originalThe place's website, a thumbnail image URL, and full-size photo URLs.
location.name / location.coordinates / location.countryThe area the search resolved to, with its center coordinates and country code.

Notes

  • Send either location (for example seattle washington united states) or both latitude and longitude to set the search area.
  • Use count to set how many places come back. The default is 20 and the maximum is 100.
  • Pass the id values from results[] to Brave POI Descriptions or Brave Local POIs to get more detail on each place.
  • Empty lists such as addresses, cities and streets appear in the response when the query matches only places.

Pricing

$0.005 per successful call. Failed calls are not charged. It is included in the daily free quota of each organization.

और जानें

संबंधित APIs

सभी APIs
APIकीमतप्रतिक्रिया
Brave$0.005 प्रति कॉलJSON
Brave$0.01 प्रति कॉलJSON
Brave$0.005 प्रति कॉलJSON
Brave$0.005 प्रति कॉलJSON
Brave$0.005 प्रति कॉलJSON
Brave$0.005 प्रति कॉलJSON

प्रश्न

FAQ

Brave Place Search API का उपयोग कैसे करें?

https://api.sandbase.ai/v1/api/brave/local-place-search पर Authorization header (Bearer) में अपनी SandBase API key और parameters को JSON body के रूप में भेजें। आप इस पेज के Playground में बिना code लिखे भी इसे आज़मा सकते हैं।

Brave Place Search API की लागत कितनी है?

$0.005 प्रति call, आपकी SandBase balance से बिल किया जाएगा। आपसे केवल आपके किए गए calls के लिए शुल्क लिया जाता है; कोई subscription नहीं है।

Brave Place Search API कौन-से parameters स्वीकार करती है?

कोई parameters आवश्यक नहीं हैं। वैकल्पिक: count (integer), country (AR, AU, AT, BE, BR, CA, CL, DK, FI, FR, DE, GR, HK, IN, ID, IT, JP, KR, MY, MX, NL, NZ, NO, CN, PL, PT, PH, RU, SA, ZA, ES, SE, CH, TW, TR, GB, US, ALL में से एक), geoloc (string), latitude (number), location (string) और longitude (number) और 7 और। Parameters table और इस पेज का Playground हर field सूचीबद्ध करते हैं।

Brave Place Search API क्या लौटाती है?

एक JSON response जो उसी HTTP request में लौटाया जाता है (synchronous)। इस पेज का README एक sample response शामिल करता है।

क्या मुझे एक Brave developer account या API key चाहिए?

नहीं। Brave Place Search SandBase के माध्यम से चलता है, इसलिए एक SandBase API key इस endpoint और catalog के हर अन्य API और model को कवर करती है। आपको अलग से Brave API access के लिए आवेदन करने की आवश्यकता नहीं है।