A simple concept, an API that provides the emergency numbers for any country in the world. I had a quick search for websites that provided this information, or even data sets that I could use. There was only one site that provided the information - however it wasn't usable for me.
I, like everyone else in the world am aware that
911 is the emergency number in the US. I’ve mainly lived in the UK, so
999 gets me help whenever I need it. I was vaguely aware that
112 could get me help in the rest of Europe. So I set out to collect all the data I could, it should be a simple project.
Unfortunately I ended up learning more about emergency numbers then I had hoped to. First of all, annoyingly, the EENA, European Emergency Number Association, the body paid to promote 112, doesn’t have a list of the countries that 112 works in. It’s ok though, because they run a social network for emergency call centre workers.
Snide aside, many European countries already have an emergency numbering system, like France with
15 for emergency ambulances,
17 for police and
18 for Fire. They continue to support these numbers for specific services while also operating a central dispatch service on
112. So far so good, 3 services, 3 numbers and one for dispatch. Dispatch is an American term, but I’ve failed to find a more concise term, the idea that one number to an operator who will direct you to the correct service depending on the type of emergency.
Canada like the US uses
911, I guess it’s easier for everyone. However in Canada one can dial
112 from a mobile phone and it will redirect to
911. Australia extends this problem even further, for historical reasons, to do with their telephone infrastructure the Australian emergency number is
000, which will work on all devices, again though
112 works on mobile phones. Until 2002
112 was the primary emergency number for mobile devices - again for technical reasons.
So now there are emergency numbers for specific services, dispatch and also for the type of device that you’re calling from. It gets even more complicated. Due to the range of numbers used to contact emergency services around the world, not all numbers are accessible from the lock screen of mobile phones. In some countries it's also necessary to have active credit on prepaid devices for the emergency numbers to work. This is especially true if you are roaming from one country to another.
A number of countries have multiple police forces, national, local, traffic, military and tourist police. Some times the police codes are city specific too. So popular tourist cities might have a short number for tourist police, military police and traffic police.
Some countries also prioritize other services, such as emergency Gas services or child services, or even have short numbers for non emergencies, like
101 for non-emergency police and
111 for health advice in the UK.
For both the multiple police numbers and the less common emergency numbers I decided to not include them in the first version of the API. Some of the data is included in the raw data that is available on github. Ultimately, it became too hard to document each of these services in a consistent way.
There is also a category of country that does not provide any common number for emergency services. I can only speculate why this is, I guess they have limited traditional telephone infrastructure. In these countries the only option is to dial your local office of the service that you need directly.
Finally, because I used the
ISO3361 list of countries, there are territories on the list that I can’t get any data for. Antarctica for instance, is a single country in the ISO standards, but obviously has no emergency services. I return
nodata = true for all of these countries.