How to geocode California using country parameter in the GET request - get

I am using here api
and i was able to fetch the long, lat of most countries
but i couldn't get information from california using
the below GET request
https://geocoder.api.here.com/6.2/geocode.json?app_id=XXXXXXXXX&app_code=YYYYYYYYYYYYYY&country=california&city=los+angeles
is there something wrong with my GET request, although it worked well for country=Egypt&city=Cairo

My bad...
The answer was simply that california is a state of a USA country, so the problem is solved with replacing 'country' with 'state':
https://geocoder.api.here.com/6.2/geocode.json?app_id=XXXXXXXXX&app_code=YYYYYYYYYYYYYY&state=california&city=los+angeles

Related

How do I format google flights query to include multiple destination/origin cities or a multi-city flight?

Following up on this super helpful question, what do I need in my url query to search for multiple destination/origin airports? And what would I query for a multi-city flight?
Any help is greatly appreciated.
I tried
https://www.google.com/travel/flights?q=Flights%20to%20SFO%20OR%20LAX%20from%20HNL%20on%202023-09-13%20through%202023-09-17
and expected to get flights to San Francisco (SFO) or Los Angeles (LAX) from Honolulu, but no luck.

Tweepy-Twitter Python : Get trends where no WOEID available

I've reading docs about twitter api's and I know how to get the trends for available countrys with Woeid (where on the world id).
Twitter has a list of countrys for which they can show the trends. When you list the availables places for trends you may notice that not all cities are supported.
My problem is that I need the trends for a country that has not support for its API. The country I need is El Salvador. This country has no support on the API, neither Woeid. But you can go to homepage and you will see the local trends to the right of window.
There is an option: get the latitude, longitude of El salvador and search trough twitter geo API for trends, but it will return you the trends for other country (Guatemala).
So, as far as I searched, using the api is not an option. Is there another way to get the twitter trends from El Salvador?
Ok, I’ve been doing what you need today.
Without being able to do an api call, which yahoo don’t support, go here;
https://www.yahoo.com/news/weather/el-salvador/apopa/apopa-76867
When you search a city, the woeid is added to the address bar.
Eg Apopa, El Salvador is 76867
Type in city names in yahoo weather and get the ones you need.
Not the best solution but should work for what you need.

Dialogflow sys.location to detect full address (?)

I cant find a why to handle this situation:
Agent: Tell me your address
User Via j.f. Kennedy, Padova
in my weebhook I would like to receive something like:
{city:"Padova", streets:"Via John Fitzgerald Kennedy"}
instead of the value of the street detect by dialogflow using sys.location:
{city:"Padova", streets:"Via j.f Kennedy"}
My goal is to have the full name of the streets in my weebhook, I read https://cloud.google.com/dialogflow-enterprise/docs/reference/system-entities but I dont find help to my problem. If its not possible handle this with diaolog flow theres another way?
as said by sid8491, in dialogflow it isn't possible, you need to use a weebhook to pass the address that you are getting from the user to an API, I had the same issue and here in France, the government has an API which list all the addresses in France. If the address isn't known, the API return a list of the most matching addresses.
Often postal compagnies have this kind of API

VenueSearch method of Foursquare returns only the addresses in USA

My app which implemented VenueSearch method of Foursquare returns only the addresses in USA whereas I am in Canada . The VenueSearch method requires two parameters which are ll(latitude & longitude) and query(searching string). What should I do to make it return addresses in my venue?
If you want to find venues near you, you should pass in a correct ll—one that is near you! You can also use the near param instead of ll and pass in something like near=ottawa and we'll use some basic geocoding to determine where that is.

Get mayor and last comment from foursquare page

How can I get the last comment and who the mayor is from foursquare page ?
Let's say this is the url:
https://foursquare.com/v/anatomska-centrala/4dab1ba55da3ba8a479999b2.
And I need to fetch somehow this data:
For last comment:
Damir P. August 23, 2011
najjači fitness centar u gradu
For mayor:
Mayor: Mrgud N.
17 check-ins in last 60 days
I tried using foursquare's Venue Detail and combining it with the url's value (4dab1ba55da3ba8a479999b2) but unsuccessful.
I have non experience working with foursquare API so any help would be appreciate.
Thank you
You can indeed retrieve the mayor and all tips ("comments") from the venue detail endpoint. Try this: https://developer.foursquare.com/docs/explore#req=venues/4dab1ba55da3ba8a479999b2
In the response, look for response.venue.mayor and response.venue.tips.

Resources