What kind of international code is used for identifying countries like - api

I need the name of the code in with:
ROM: Roma, Italy
BCN: Barcelona, Spain
MAD: Madrid, Spain
BUE: Buenos Aires, Argentina
PCM: Playa del Carmen, Mexico
PAR: Paris, France
LON: London, UK
etc...
I am developing an app that searches flights between countries and I need a full list of this kind of codes to interatct with another third party API.
I tried to google it but the only things that apears are flight sites instead of a wikipedia page or something.
Can you give me any pointer?

These are IATA (3 letter) Airport Codes.
This list may help you:
http://www.photius.com/wfb2001/airport_codes_alpha.html.
You could also use the official IATA search engine (Location code category).
If you want an officially sanctionned list, you apparently need to pay a hefty price.

It seems you are looking for IATA airport codes:
The assignment of these codes is governed by IATA Resolution 763, and
it is administered by IATA headquarters in Montreal. The codes are
published biannually in the IATA Airline Coding Directory.
Unfortunately, that authoritative list is quite expensive. But I am certain you can find many unofficial lists by searching the web.

Use 'World Airport Codes' search query and Google's your uncle. Below are some links from my search:
World Airport Codes
Airport Codes
Localized World Airport Codes
Openflights

Related

What's South Korea's country name in API?

[SOLVED] the official name is Korea, Republic of. You can's miss any white space when you use it.
I am using Last.FM API, when I try geo.getTopArtists(Get the most popular artists on Last.fm by country), I need to input a parameter :
country (Required) : A country name, as defined by the ISO 3166-1 country names standard.
Then I checked ISO 3116-1, and found South Korea's name is Korea, Republic of
but it doesn't work. Then I tried korea, southkorea,koreaofrepublic ,all failed.
What should I input?
http://ws.audioscrobbler.com/2.0/?method=geo.gettopartists&country=korea&api_key=aa652ac51995d952d83d12093d25d9d9&format=json
It should be ISO 3166-1 country name standard .
https://en.wikipedia.org/wiki/ISO_3166-1
if you copy/paste this link in your browser, you will get the complete list of countries
that are supported by Rest Countries Api.
https://restcountries.com/v2/all
My suggestion is to do it in Firefox, because, list will be formatted in a readable way.
From there, you can search for the any data you might need.
For example, in the case of South Korea, you would go to the link, type 'korea' in the search bar, and you would get two results ( for North and South Korea), and when you expand the JSON object, you could read the exact name of the country as they listed it in their API. "Korea (Republic of)" in this case.

Enforce MapBox Geocoding API to return only results with a zipcode

I'm working with MapBox Geocoding API to have suggestions of addresses in the location search feature of my website.
The following is a sample call:
https://api.mapbox.com/geocoding/v5/mapbox.places/Zur.json?country=ch&limit=5&proximity=8.765.432&language=en-GB&access_token=***
My goal is to enforce the api to return only results that include a zipcode.
For example if I input "Zur" (limiting the search to Swiss) I get the following:
- Zürich, Zürich, Switzerland
- Zürich, Switzerland
- Zürich Airport, Flughafenstrasse, Kloten, Zürich 8302, Switzerland
- Zurich, Buchs, Zürich 8107, Switzerland
The expected results should be without the first two lines, as they don't have a zipcode.
I tried implementing myself the removal of results without the zipcode on client side (just after I got an answer from the api), but it is a suboptimal solution (for example it doesn't ensure to have enough results).
I was not able to find such feature in MapBox. Is there a better solution out of there?
Just add ?types=address
See all list of types:
https://docs.mapbox.com/api/search/geocoding/#data-types

Google Maps API Geocode Postal Code and set Country code?

I'm using this API call to Google Maps to get the latitude and longitude of a postal code
http://maps.googleapis.com/maps/api/geocode/json?address=2340&sensor=false
The postal code is in Australia. This API call returns locations all around the world with partial matching postal codes in the address.
Is there a parameter I can use to set the country to Australia?
Thanks
The correct way to do this is not via region biasing but rather using component filtering:
https://maps.google.com/maps/api/geocode/json
?components=country:AU|postal_code:2340
&sensor=false
Some demonstrations:
2340
93274
Please note that if you use the components parameter, you don't need to specify the address parameter.
The documentation says that Region Biasing is based on CcTLDs, which would make Australia au (haven't tried it myself).
Although it also states this:
Note that biasing only prefers results for a specific domain; if more relevant results exist outside of this domain, they may be included.

Facebook Country list for user locations

Is there a list of "facebook country names"?
in my iphone app , after retrieving the location information, I want to select the country back, and the user will be able to change it, so I have to find the list of countries and, if possible cities, used by facebook
I believe Facebook uses the ISO 3166-1 alpha-2 codes (2 digit country codes, ie United Kingdom is 'GB').
http://www.iso.org/iso/country_codes/iso_3166_code_lists/country_names_and_code_elements.htm

FourSquare API is giving lots of result but not the result I expect

I am using FourSquare api for searching a particular business
https://api.foursquare.com/v2/users/search?name=Spa Gregories&oauth_token=ACCESS_TOKEN
it is giving lots of result but not the result i expect. that is
Spa Gregories
2710 Via De La Valle, Ste B-270
San Diego, California 92014
when i use https://foursquare.com/search?q=Spa+Gregories&near=san+diago then i got the exact result. So is their any way to find the business according the location. I have only name and city location to use for Search. I have also checked for the venues option but it asks for longitude and latitude.
thnks
Seems you're hitting the user search endpoint instead of the venue search.
Looks like this is the one you want:
https://developer.foursquare.com/docs/venues/search.html