While searching for places using google nearby search for anyone of type from ["hospital", "pharmacy", "doctor", "dentist", "physiotherapist", "clinic", "diagnostic center"] , In return, the response from Google Places is giving places other than the mentioned types. Any solution to avoid results other than mentioned types. The e.g. parameters { location: [ '6.4504948', '3.3956989' ], type: 'Clinics', radius: 25000 }
Related
I'm working on app and want to get all comments for a specific post, I created each comment for each country with its lat long(as one post may has many comments), but When I execute query I'm not getting all result, but it shows me only 17 results while there are 200+ comments
My query is as follows
db.posts.aggregate([
{ "$geoNear": {
"near": [70.0000,30.0000 ],
"spherical": true,
"distanceField": "distance",
"distanceMuliplier": 6371,
}},
{
"$match":{"post_id":"5efb10c325a36375c97dbda4"}
} ])
and I picked lat long from this link
https://gist.github.com/sindresorhus/1341699
Please help me, Thank you
Is there an API call which will returns all recent public tweets regarding for specific location?
I tried GET trends/place but it's WOEID not worked for Sri Lanka and Cities.
(Sri Lanka WOEID is 23424778)
I don't want to use tweeter GET search/tweets.json endpoint because search based on certain key words.
Is there any solution for this?
Finally, I got the answer. We could not get trends on each and every location using tweeter API 1.1.
you have to check our closest trending place using this API call. For Austalia
https://api.twitter.com/1.1/trends/closest.json?lat=37.781157&long=-122.400612831116
the response like be this.
[
{
"country": "Australia",
"countryCode": "AU",
"name": "Australia",
"parentid": 1,
"placeType": {
"code": 12,
"name": "Country"
},
"url": "http://where.yahooapis.com/v1/place/23424748",
"woeid": 23424748
}
]
after that, you can use GET trends/place.
even though you cannot use GET trends/place for geo-based filtering you can use tweeter search endpoint. if you do not want to filter it by keyword ignore the q parameter and use geocodeparameter. for example,
https://api.twitter.com/1.1/search/tweets.json?result_type=recent&geocode=5.954920,80.554956,12mi
In here mi is miles.
I try to use insert activity request through this special form http://joxi.net/J2bykQQS4XYxXm
{
"object": {
"originalContent": "LaLALaLALa"
},
"access": {
"items": [
{
"type": "domain"
}
],
"domainRestricted": true
}
}
but always I have 403 error in answer. http://joxi.net/DrllG33c4vnb5r
I tried to use user_id instead me but had same results :(
Most likely, you are not doing this as part of a Google Domain. Now also known as "gsuite", this allows companies to be able to post messages that are visible to other members of the same company. This does not allow you to post messages that are available for most Google+ users to see.
There is no public API available from Google to let you post to the public Google+. There is an API available to select partners (such as HootSuite) which let them post to the public Google+, but they seem to be slow or reluctant to add additional partners.
I want to use Google API for Did you mean feature. So basically I want to write a piece of code, which sends a word to Google search and either Google finds the exact hits or gives a "DID YOU MEAN" reply which i would use.
Is it made available? Tried finding it but couldn't find.
So I invested some time and this what I've found
1/ You should have your custom search engine
https://cse.google.com
2/ Configure it to search all webs
https://support.google.com/customsearch/answer/2631040?hl=en
3/ Make query to that engine following the document
https://developers.google.com/custom-search/json-api/v1/using_rest
Spelling / Did you mean repairs if possible can be found in "spelling" section. (Irrelevant sections removed) . Fox ex: I searched for "devart" here
{
"kind": "customsearch#search",
"url": {
},
"queries": {
"request": [
]
},
"context": {
},
"searchInformation": {
},
"spelling": {
"correctedQuery": "deviantart",
"htmlCorrectedQuery": "<b><i>deviantart</i></b>"
},
"items": [
]
}
I had the same question and its downvoted also while they are allowing these questions on the site. You may want to read about the auto-complete apis here
https://stackoverflow.com/questions/40061449/google-auto-correct-api
Google Search autocomplete API?
I am trying to do application specific places search with google place api. Here is how I am adding a place:
Request:
{
"location": {
"lat": 37.760538,
"lng": -121.900879
},
"accuracy": 50,
"name": "p2p",
"types": ["other"]
}
I get success response as shown below:
Response:
{
"id" : "dfe583b1ac058750cf524f958afc5e82ade455d7",
"place_id" : "qgYvCi0wMDAwMDBhNWE4OWU4NTMzOjgwOGZlZTBhNjI3OjBjNTU1OTU4M2Q2NDI5YmM",
"reference" : "CkQxAAAAsPE72V-jhHUjj6vPy2HdC__2MhAdXanL6mlFBA4bcayRabKyMlfKFiah7U2vkoCj1P_0w9ESFSv5mfDkyufaZhIQTHBHY_jPGRHEE3EmEAGElhoUXTSylMslwHSTK5tYdstW2rOZKbw",
"scope" : "APP",
"status" : "OK"
}
When I search for this place using radar search, I get ZERO_RESULTS.
Request:
https://maps.googleapis.com/maps/api/place/radarsearch/json?key=key&radius=5000&location=37.761926,-121.891856&keyword=p2p
Response:
{
"html_attributions": [ ],
"results": [ ],
"status": "ZERO_RESULTS"
}
Is there something that I am doing the right way? Please help.
Thanks & Regards,
--Rajani
Your scope is "APP". That means you can access it (via PlaceID) from the application that created the entry only. If the location passes Google's moderation process, then it will gain scope "GOOGLE" and be accessible from the general searches.
scope — Indicates the scope of the place_id. The possible values are:
APP: The place ID is recognised by your application only. This is because your
application added the place, and the place has not yet
passed the moderation process.
GOOGLE: The place ID is available to other applications and on Google Maps.
Note: The scope field is included only in Nearby Search results and
Place Details results. You can only retrieve app-scoped places via the
Nearby Search and the Place Details requests. If the scope field is
not present in a response, it is safe to assume the scope is GOOGLE.
See: https://developers.google.com/places/documentation/search