<mediawiki xmlns="http://www.mediawiki.org/xml/export-0.10/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.mediawiki.org/xml/export-0.10/ http://www.mediawiki.org/xml/export-0.10.xsd" version="0.10" xml:lang="en">
  <siteinfo>
    <sitename>wiki.coolgeo.net</sitename>
    <dbname>wikicoolgeo</dbname>
    <base>http://wiki.coolgeo.net/index.php/Main_Page</base>
    <generator>MediaWiki 1.34.0</generator>
    <case>first-letter</case>
    <namespaces>
      <namespace key="-2" case="first-letter">Media</namespace>
      <namespace key="-1" case="first-letter">Special</namespace>
      <namespace key="0" case="first-letter" />
      <namespace key="1" case="first-letter">Talk</namespace>
      <namespace key="2" case="first-letter">User</namespace>
      <namespace key="3" case="first-letter">User talk</namespace>
      <namespace key="4" case="first-letter">wiki.coolgeo.net</namespace>
      <namespace key="5" case="first-letter">wiki.coolgeo.net talk</namespace>
      <namespace key="6" case="first-letter">File</namespace>
      <namespace key="7" case="first-letter">File talk</namespace>
      <namespace key="8" case="first-letter">MediaWiki</namespace>
      <namespace key="9" case="first-letter">MediaWiki talk</namespace>
      <namespace key="10" case="first-letter">Template</namespace>
      <namespace key="11" case="first-letter">Template talk</namespace>
      <namespace key="12" case="first-letter">Help</namespace>
      <namespace key="13" case="first-letter">Help talk</namespace>
      <namespace key="14" case="first-letter">Category</namespace>
      <namespace key="15" case="first-letter">Category talk</namespace>
    </namespaces>
  </siteinfo>
  <page>
    <title>Main Page</title>
    <ns>0</ns>
    <id>1</id>
    <revision>
      <id>159</id>
      <parentid>158</parentid>
      <timestamp>2025-10-28T18:57:20Z</timestamp>
      <contributor>
        <username>Admin</username>
        <id>1</id>
      </contributor>
      <model>wikitext</model>
      <format>text/x-wiki</format>
      <text xml:space="preserve" bytes="14011">&lt;strong&gt;XML Interface Description for coolgeo.net and Mailheader.org.&lt;/strong&gt;

This is about the coolgeo.net website along with the API interface for universal usage.
coolgeo.net offers an easy XML API to to query geo and station data&lt;br&gt;
The XML API is also used by mailheader.org&lt;br&gt;&lt;br&gt;

=About coolgeo.net=

&lt;br&gt;
Coolgeo is using [http://maxdata.com Maxdata] to resolve IPv4 and IPv6 addresses into geographic coordinates.&lt;br&gt;
Coolgeo knows more than '''25.000 Worldwide [https://en.wikipedia.org/wiki/International_Air_Transport_Association_airport_code Codes] (Stations)''', the stations are divided into subcodes such as city or airport codes. &lt;br&gt;
Each code has its timezone and geographic coordinates associated (latitude/longitude) and knows also the timezone, currency, DST and other data. 
&lt;br&gt;&lt;br&gt;
'''Rules and notations'''
*All geo data values are set or given in decimal values.
*Date and Time is always returned within the local timezone unless specified else.
*Values are returned in upper cases.
*Distances are always set in kilometer.
*Times are always given in a 24 hour format.
&lt;br&gt;&lt;br&gt;
'''Codes'''
&lt;br&gt;IATA Codes are used for station data, please get more information [https://en.wikipedia.org/wiki/International_Air_Transport_Association_airport_code here]
*A = Airport
*B = Bus Station
*C = City
*G = Ground Data
*H = Heli Port
*R = Railway Station

'''URL Sites via WUI'''
*http://coolgeo.net '''DNS prefered IP'''
*http://v4.coolgeo.net '''enforce IPv4'''
*http://v6.coolgeo.net '''enforce IPv6'''

'''URL Sites via XML'''
*http://xml.coolgeo.net '''DNS prefered IP'''
*http://v4.xml.coolgeo.net '''enforce IPv4'''
*http://v6.xml.coolgeo.net '''enforce IPv6'''

&lt;br&gt;

=Return your current IP=
Return your current IP

'''Sample:''' '''http://xml.coolgeo.net/xml.cgi?getip=1'''&lt;br&gt;
'''Enforce IPv4 Sample:''' '''http://v4.xml.coolgeo.net/xml.cgi?getip=1'''&lt;br&gt;
'''Enforce IPv6 Sample:''' '''http://v6.xml.coolgeo.net/xml.cgi?getip=1'''&lt;br&gt;
&lt;br&gt;&lt;br&gt;Return example
 &lt;Client IP="2003:c0:xxxx:xxxx::0"/&gt;

=Search location by a IP address=
Search location by a IP address
&lt;br&gt;&lt;br&gt;
'''IPv4 Sample:''' '''http://xml.coolgeo.net/xml.cgi?ip=1.2.3.4&amp;optASN&amp;optTZData&amp;optStation&amp;optAirport'''&lt;br&gt;
'''IPv6 Sample:''' '''http://xml.coolgeo.net/xml.cgi?ip=2604%3Aa880%3A0%3A1010%3A%3A809%3Ac001&amp;optASN&amp;optTZData&amp;optStation&amp;optAirport'''


&lt;br&gt;Options:
*optASN Give ASN data
*optTZData Give TZ data
*optStation Give station data
*optAirport Give airport data
&lt;br&gt;&lt;br&gt;Return example for search ip=1.2.3.4
 &lt;Status&gt;
  &lt;Search IPAddress="1.2.3.4" Search="ipdata" optASN="1" optTZData="1" optStation="1" optAirport="1"/&gt;
  &lt;Response&gt;
   &lt;Ip 
    Latitude="47.9130" 
    Longitude="-122.3042" 
    CountryCode="US" 
    CountryName="UNITED STATES" 
    CurrencyCode="USD" 
    CurrencyName="US DOLLAR"
    IsAnonProxy="0" 
    AccuracyRadius="100"/&gt;
   /&gt;
   &lt;Asn 
    Name="Google Inc." 
    Number="AS15169"
   /&gt;
   &lt;TZ 
    Code="America/Los_Angeles" 
    Offset="-28800" OffsetRnd="-8" 
    CurrentEpoch="1451556331" 
    CurrentEpochGMT="82" 
    CurrentDate="Thu Dec 31 11:05:31 2015" 
    ShortName="PST" isDST="0"
   /&gt;
   &lt;NearestStation 
    Code="PAE" 
    Type="A" 
    Name="Snohomish Cty Arpt" 
    City="Everett" 
    Distance="2"
   /&gt;
   &lt;NearestAirport 
    Code="LKE" 
    Type="A" 
    Name="Lake Union Seaplane Base" 
    City="Seattle" 
    Distance="14"
   /&gt;
  &lt;/Response&gt;
 &lt;/Status&gt;

=Search location by a argument=
Search location by a string, this could be any meaning, a city, code or country name to be matched
&lt;br&gt;&lt;br&gt;
Search for '''Juneau''', no matter what station code.&lt;br&gt;
Sample: '''http://xml.coolgeo.net/xml.cgi?search=location&amp;value=Juneau'''
&lt;br&gt;&lt;br&gt;Return example for search=location, value=Juneau
&lt;br&gt;
 &lt;Status&gt;
  &lt;ResponseArray&gt;
   &lt;Response&gt;
    &lt;Count&gt;1&lt;/Count&gt;
    &lt;nowiki&gt;&lt;Code&gt;JNU&lt;/Code&gt;&lt;/nowiki&gt;
    &lt;Type&gt;A&lt;/Type&gt;
    &lt;Name&gt;Juneau Arpt&lt;/Name&gt;
    &lt;CityCode&gt;JNU&lt;/CityCode&gt;
    &lt;CityName&gt;Juneau&lt;/CityName&gt;
    &lt;CountryCode&gt;US&lt;/CountryCode&gt;
    &lt;CountryName&gt;UNITED STATES&lt;/CountryName&gt;
    &lt;StateCode&gt;AK&lt;/StateCode&gt;
    &lt;StateName&gt;ALASKA&lt;/StateName&gt;
    &lt;Latitude&gt;+058.3590&lt;/Latitude&gt;
    &lt;Longitude&gt;-134.5652&lt;/Longitude&gt;
   &lt;/Response&gt;
   &lt;Response&gt;
    &lt;Count&gt;2&lt;/Count&gt;
    &lt;nowiki&gt;&lt;Code&gt;JNU&lt;/Code&gt;&lt;/nowiki&gt;
    &lt;Type&gt;C&lt;/Type&gt;
    &lt;Name&gt;Juneau&lt;/Name&gt;
    &lt;CityCode&gt;JNU&lt;/CityCode&gt;
    &lt;CityName&gt;Juneau&lt;/CityName&gt;
    &lt;CountryCode&gt;US&lt;/CountryCode&gt;
    &lt;CountryName&gt;UNITED STATES&lt;/CountryName&gt;
    &lt;StateCode&gt;AK&lt;/StateCode&gt;
    &lt;StateName&gt;ALASKA&lt;/StateName&gt;
    &lt;Latitude&gt;+058.3000&lt;/Latitude&gt;
    &lt;Longitude&gt;-134.4056&lt;/Longitude&gt;
   &lt;/Response&gt;
   &lt;Response&gt;
    &lt;Count&gt;3&lt;/Count&gt;
    &lt;nowiki&gt;&lt;Code&gt;UNC&lt;/Code&gt;&lt;/nowiki&gt;
    &lt;Type&gt;A&lt;/Type&gt;
    &lt;Name&gt;Dodge County Airport&lt;/Name&gt;
    &lt;CityCode&gt;UNU&lt;/CityCode&gt;
    &lt;CityName&gt;Juneau&lt;/CityName&gt;
    &lt;CountryCode&gt;US&lt;/CountryCode&gt;
    &lt;CountryName&gt;UNITED STATES&lt;/CountryName&gt;
    &lt;StateCode&gt;WI&lt;/StateCode&gt;
    &lt;Latitude&gt;+058.3000&lt;/Latitude&gt;
    &lt;Longitude&gt;-134.4167&lt;/Longitude&gt;
   &lt;/Response&gt;
  &lt;/ResponseArray&gt;
 &lt;Search Mode="location" Value="Juneau" Found="3"/&gt;
 &lt;/Status&gt;

=Search location details by latitude and longitude=
Show details by latitude and longitude is about to return data such as the nearest city, airport, localtime and others.
&lt;br&gt;&lt;br&gt;
Sample: '''http://xml.coolgeo.net/xml.cgi?show=geo&amp;latitude=+37.78848&amp;longitude=-122.3750'''&lt;br&gt;
&lt;br&gt;
Return example for show=geo, latitude=+37.7884, longitude=-122.3750&lt;br&gt;
 &lt;Status&gt;
  &lt;Response&gt;
   &lt;TZ 
    Code="America/Los_Angeles" 
    Offset="-28800" OffsetRnd="-8" 
    CurrentEpoch="0000000000" 
    CurrentEpochGMT="0000000000" 
    CurrentDate="DDD MMM DD HH:MM:SS YYYY" 
    CurrentDateGMT="DDD MMM DD HH:MM:SS YYYY" 
    ShortName="PST" 
    isDST="0"
   /&gt;
   &lt;NearestStation 
    Code="SFO" 
    Type="C" 
    Name="San Francisco" 
    City="San Francisco" 
    Distance="2" 
    CountryCode="US" 
    CountryName="UNITED STATES"
   /&gt;
   &lt;NearestAirport 
    Code="OAK" 
    Type="A" 
    Name="Metro Oakland Intl Arpt" 
    City="Oakland" 
    Distance="16" 
    CountryCode="US" 
    CountryName="UNITED STATES"
   /&gt;
  &lt;/Response&gt;
 &lt;/Status&gt;



=Search station details by code=
Show details by Code and return data such as lat, lon, name details, currency, time and others.
&lt;br&gt;&lt;br&gt;
Sample: '''http://xml.coolgeo.net/xml.cgi?show=location&amp;value=syd&amp;type=c'''
&lt;br&gt;&lt;br&gt;
Return example for show=location, value=syd (Sydney) and type=c (Ciity Code)&lt;br&gt;
 &lt;Response 
  Code="SYD" 
  Type="C" 
  Name="Sydney" 
  CityCode="SYD" 
  CityName="Sydney" 
  StateCode="NS" 
  StateName="New South Wales" 
  CountryCode="AU" 
  CountryName="AUSTRALIA" 
  ContinentCode="OC" 
  ContinentName="Oceania" 
  Longitude="+151.2062" 
  Latitude="-033.8705" 
  TZCode="AEDT" 
  TZName="Australia/Sydney" 
  Offset="39600" 
  OffsetRnd="+11" 
  CurrentEpoch="0000000000" 
  CurrentDate="DDD MMM DD HH:MM:SS YYYY" 
  isDST="1" 
  CurrencyCode="AUD" 
  CurrencyName="Australian Dollar"
 /&gt;



=Radius search=
==By City or Airport==
===Show cities by radius search===
Display stations (using the CityCode in this example) by radius distance, use km as unit, the max distance is 500KM, stations can be a city, airport and other station codes. &lt;br&gt;
Optional request is possible by airport code (type=A) or geo data (type=G). &lt;br&gt;
This example runs by airport as reference point.&lt;br&gt;
Show cities around the airport of Edinborough (EDI)in a 100KM radius distance.
&lt;br&gt;&lt;br&gt;
Sample: '''http://xml.coolgeo.net/xml.cgi?show=radius&amp;type=A&amp;value=EDI&amp;srctype=A&amp;radius=100&amp;dsttype=C&amp;recent=1'''&lt;br&gt;

&lt;br&gt;&lt;br&gt;
This return example shows the status header and the return data as an array.&lt;br&gt;
In case of a airport search the geo data will be determined and used as a reference for the radius calculation, this data is shown in the below as Latitude/Longitude.&lt;br&gt;
&lt;br&gt;
Return status:
 &lt;Search 
  Type="A" 
  SourceType="A" 
  DestinationType="C" 
  Value="EDI" 
  Latitude="+055.9480" 
  Longitude="-003.3642" 
  Radius="100" 
  Recent="1"
 /&gt;
&lt;br&gt;
Reponse sample, note that his is a array, the '''count''' id is used as reference.&lt;br&gt;
The array is sorted by distance (km away of the reference point), sort order is ascent.&lt;br&gt;
 &lt;Response 
  Code="XWB"
  Count="2" 
  Distance="40" 
  Name="Stirling" 
  Type="C" 
  Latitude="+056.1181" 
  Longitude="-003.9383"
  CountryCode="GB"
  CountryName="UNITED KINGDOM"
 /&gt;

===Show airports by radius search===
Display stations (using the AiprotCode in this example) by radius distance, use km as unit, the max distance is 500KM, stations can be a city, airport and other station codes. &lt;br&gt;
Optional request is possible by airport code (type=A) or geo data (type=G). &lt;br&gt;
This example runs by airport as reference point, return should be airports (dsttype=A).&lt;br&gt;
Show airports around the airport of San Francisco (SFO) in a 100KM radius distance.
&lt;br&gt;&lt;br&gt;
Sample: '''http://xml.coolgeo.net/xml.cgi?show=radius&amp;type=A&amp;value=SFO&amp;srctype=A&amp;radius=100&amp;dsttype=A&amp;recent=1'''&lt;br&gt;

&lt;br&gt;&lt;br&gt;
This return example shows the status header and the return data as an array.&lt;br&gt;
In case of a airport search the geo data will be determined and used as a reference for the radius calculation, this data is shown in the below as Latitude/Longitude.&lt;br&gt;
&lt;br&gt;
Return status:
 &lt;Search 
  Type="A" 
  SourceType="A"
  DestinationType="A"
  Value="SFO"
  Longitude="-122.3819"
  Latitude="+037.6183"
  Radius="100" 
  Recent="1"
 /&gt;
&lt;br&gt;
Reponse sample, note that this is an array, the '''count''' id is used as reference.&lt;br&gt;
The array is sorted by distance (km away of the reference point), show type=cities, sort order is ascent.&lt;br&gt;
 &lt;Response 
  Code="XWB"
  Count="2" 
  Distance="40" 
  Name="Stirling" 
  Type="C" 
  Latitude="+056.1181" 
  Longitude="-003.9383"
  CountryCode="GB"
  CountryName="UNITED KINGDOM"
 /&gt;


==By Geo Data==
===Show cities by radius search===
Display any stations (using the Geo Data in this example) by radius distance, use km as unit, the max distance is 500KM, use latitude and longitude as parameter&lt;br&gt;
This example runs by geo data as reference point&lt;br&gt;
return should be any  ( no usage of dsttype).&lt;br&gt;
Show cities around the data latitude=+40.7528 and longitude=-73.9757 (NYC), 100KM radius distance.
&lt;br&gt;&lt;br&gt;
Sample: '''http://xml.coolgeo.net/xml.cgi?show=radius&amp;type=G&amp;latitude=+40.7528&amp;longitude=-73.9757&amp;radius=100&amp;dsttype=A&amp;recent=1'''&lt;br&gt;

&lt;br&gt;&lt;br&gt;
This return example shows the status header and the return data as an array.&lt;br&gt;
In case of a airport search the geo data will be determined and used as a reference for the radius calculation, this data is shown in the below as Latitude/Longitude.&lt;br&gt;
&lt;br&gt;
Return status:
 &lt;Search
  Type="G"
  SourceType=""
  DestinationType="C"
  Value=""
  Longitude="-73.9757"
  Latitude=" 40.7528"
  Radius="100"
  Recent="1"
 /&gt;

Reponse sample, note that this is an array, the '''count''' id is used as reference. &lt;br&gt;
The array is sorted by distance (km away of the reference point), show type=cities, sort order is ascent.&lt;br&gt;
 &lt;Response
  Code="NYC"
  Count="1"
  Distance="0"
  Name="New York"
  Type="C"
  Latitude="+040.7528"
  Longitude="-073.9757"
  CountryCode="US"
  CountryName="UNITED STATES"
 /&gt;



===Show any stations by radius search===
Display stations (using the Geo Data in this example) by radius distance, use km as unit, the max distance is 500KM, use latitude and longitude as parameter&lt;br&gt;
Optional request is possible by airport code (type=A) or geo data (type=G). &lt;br&gt;
This example runs by geo data as reference point&lt;br&gt;
Show any stations around the data latitude=+61.1 and longitude=-45.1 (Somewhere in Greenland), 500KM radius distance.
&lt;br&gt;&lt;br&gt;
Sample: '''http://xml.coolgeo.net/xml.cgi?show=radius&amp;type=G&amp;latitude=+61.1&amp;longitude=-45.1&amp;radius=500&amp;recent=1'''&lt;br&gt;

&lt;br&gt;&lt;br&gt;
This return example shows the status header and the return data as an array.&lt;br&gt;
In case of a airport search the geo data will be determined and used as a reference for the radius calculation, this data is shown in the below as Latitude/Longitude.&lt;br&gt;
&lt;br&gt;
Return status:
 &lt;Search
  Type="G"
  SourceType=""
  DestinationType=""
  Value="" 
  Longitude="-45.1"
  Latitude=" 61.1"
  Radius="500"
  Recent="1"
 /&gt;



Reponse sample, note that this is an array, the '''count''' id is used as reference.&lt;br&gt;
The array is sorted by distance (km away of the reference point), show type=cities, sort order is ascent.&lt;br&gt;
 &lt;Response
  Code="UAK"
  Count="1"
  Distance="13"
  Name="Narsarsuaq"
  Type="C"
  Latitude="+061.1667"
  Longitude="-045.3167"
  CountryCode="GL"
  CountryName="GREENLAND"
 /&gt;



=Distance search=
==By Latitude / Longitude==
Example for Winnipeg to Sydney&lt;br&gt;
*Winnipeg: srclat=+49.9033&amp;srclon=-97.2262
*Sydney: dstlat=-33.9377&amp;dstlon=+151.1648

 http://xml.coolgeo.net/xml.cgi?show=distance&amp;srclat=+49.9033&amp;srclon=-97.2262&amp;dstlat=-33.9377&amp;dstlon=+151.1648

Response Sample:
 &lt;Status&gt;
  &lt;Response&gt;
   &lt;DistanceMile&gt;8879.11&lt;/DistanceMile&gt;
   &lt;DistanceKilometer&gt;14289.54&lt;/DistanceKilometer&gt;
  &lt;/Response&gt;
  &lt;Search 
   Show="distance" 
   Source_Latitude=" 49.9033" 
   Source_Longitude="-97.2262" 
   Destination_Latitude="-33.9377" 
   Destination_Longitude=" 151.1648"
  /&gt;
 &lt;/Status&gt;

=Timezone=
==Timezone and UTC information by airport or city code and datetime==
This function is showing the current timezone along with the UTC epoch, UTC datetime and daylight saving information.

Fro example: Show the local Timezone and UTC datetime information for San Francisco - 4th of July 2025, 12:30 PM

 http://xml.coolgeo.net/xml.cgi?show=tzinfo&amp;code=SFO&amp;date=20250704&amp;time=123000

Response Sample:
 &lt;Status&gt;
  &lt;Response&gt;
   &lt;LocationCity&gt;San Francisco&lt;/LocationCity&gt;
   &lt;LocationTZ&gt;America/Los_Angeles&lt;/LocationTZ&gt;
   &lt;LocationTZAbbr&gt;PDT&lt;/LocationTZAbbr&gt;
   &lt;Offset&gt;-7&lt;/Offset&gt;
   &lt;OffsetSeconds&gt;-25200&lt;/OffsetSeconds&gt;
   &lt;LocalEpoch&gt;1751606580&lt;/LocalEpoch&gt;
   &lt;UTCDate&gt;2025-07-04 05:30:00&lt;/UTCDate&gt;
   &lt;UTCEpoch&gt;1751607000&lt;/UTCEpoch&gt;
   &lt;isDST&gt;1&lt;/isDST&gt;
   &lt;hasDST&gt;1&lt;/hasDST&gt;
  &lt;/Response&gt;
  &lt;Search Code="SFO" Date="20250704" Time="123000"/&gt;
 &lt;/Status&gt;</text>
      <sha1>d0ilu9qvxwhkkwlhqf9iq5v3qxf6wzv</sha1>
    </revision>
  </page>
</mediawiki>
