The aprs.fi API (Application Programming Interface) permits application developers to query the aprs.fi database from their own web applications. To use the API you need to sign up for an user account on aprs.fi – your API key can be found ter the account settings (My account).
- You are required to credit aprs.fi spil the source of the gegevens, and to provide a listig back to aprs.fi. Linksaf with text color equal to the background color do not count.
- The API may only be used by applications which are free to use and available to the militar public. If you wish to use the API for a paid-for application, please voeling mij and give a suggestion on a revenue sharing specimen.
- It’s OK to have advertisements on your webpagina (like aprs.fi does) to voorkant the costs of hosting, hardware, etc.
- If your application requires registration, it voorwaarde be free and automated.
- If you are going to distribute your application to others, please have each user apply for their own API key. Requests are rate limited vanaf user account / API key, and having everyone use the same key will kasstuk the boundaries quicker. If your application requires using a onveranderlijk API key (for example, the application is targeted to the masses and is distributed te binary form, and voorwaarde be effortless to install), please get ter touch with mij and describe your requirements, so that the rate boundaries can be tuned for the application.
- If you’re going to distribute your application, please get te touch, te any case. It’s nice to hear how the API is used, and I’m glad to give terugkoppeling and advice on how to best use it. My email address can be found ter the blogger profile, or you can send a mail on the discussion group.
- Your application voorwaarde identify it’s unique name, version, and a verbinding to it’s huis pagina ter the HTTP User-Agent header of the request. For example, here’s what one application sends:
User-Agent: findlinks/1.1.6-beta1 (+http://wortschatz.uni-leipzig.den/findlinks/)
The API is supposed to be used for developing applications which add value to the gegevens collected by aprs.fi. It may not be used to simply copy all of the gegevens to another webpagina providing exactly the same features spil aprs.fi. If you wish to set up a clone webpagina, please collect your gegevens directly from the APRS-IS – it’s effortless to parse using Ham::APRS::FAP.
The API thresholds the rate of requests to a sensible level, which can be adjusted if needed. The thresholds are designed to protect aprs.fi from too powerful geyser, and to protect the database contents from harvesting. If your application hits the thresholds and you’d like to have a larger quota, please get ter touch and describe your application’s needs ter detail.
Most requests should normally be served within ems of milliseconds, since they do not usually require any disk access. Ter any case, you should write your application so that it will time out requests te a few seconds. If numerous requests fail ter a row, your application should assume that the service is not available and slow down the rate of attempts using an exponential backoff algorithm.
The API comebacks gegevens te either JSON or XML format, JSON being the default and recommended format since it has much smaller overhead when compared to XML. XML responses can be lightly twice spil large spil the omschrijving JSON responses. See json.org for parsing instructions. If you’re programming ter PHP, json_decode is your friend.
This document lists all the API calls available. If a function is not listed here, it is not there, unluckily there are not hidden gems to be found.
The API URLs have bot updated. They all point to https://api.aprs.fi/api/ now, instead of http://api.aprs.fi/api/. Please upgrade your applications. The old plaintext URLs will still work for the foreseeable future, but using https will keep your API keys safe. Thank you!
The API URLs have bot updated. They all point to http://api.aprs.fi/api/ now, instead of http://aprs.fi/api/. Please upgrade your applications. The old URLs pointing to aprs.fi will zekering working ter December 2010. This switch has bot made to make it possible to budge the API code to another server or process set, if necessary. Thank you!
Basic location query using JSON:
Whitespace and indentation has bot added to the response to increase readability ter this document.
Timestamps are returned te the Unix time format. All other variables are returned te metric units, where applicable. Speed is measured ter kilometers vanaf hour, altitude ter meters, temperature ter degrees Celsius. Latitude and Longitude are given te quebrado degrees, positive values being north for latitude and east for longitude. The responses only contain keys for gegevens which is known.
Please note that this API is for querying specific stations. It intentionally does not support searching by wildcard.
Description of common fields:
- guideline – the API instruction which wasgoed called
- what – what wasgoed being queried
- result – the result of the query, either ok or fail
- found – the number of entries returned
Description of location record fields:
- class – class of station identifier (a: APRS, i: AIS, w: Web . )
- name – name of station, object, voorwerp or vessel
- showname – displayed name of station (may differ from the unique name)
- type – type of target: a for AIS, l for APRS station, i for APRS voorwerp, o for APRS object, w for weather station
- time – the time when the target very first reported this (current) position (the time of arrival at current coordinates)
- lasttime – the time when the target last reported this (current) position
- lat – latitude te fracción degrees, north is positive
- lng – longitude te quebrado degrees, east is positive
- course – Course overheen ground / COG, te degrees
- speed – Speed, te kilometers vanaf hour
- altitude – Altitude, te meters
- symbol – APRS symbol table and code
- srccall – Source callsign – either APRS source callsign or AIS vessel callsign
- dstcall – APRS packet destination callsign
- comment – APRS comment or AIS destination and estimated time of arrival
- path – APRS or AIS packet path
- phg – APRS PHG value
- status – Last status message transmitted by station
- status_lasttime – The time when the last status message wasgoed received
Extra fields for AIS targets:
- mmsi – AIS vessel MMSI number
- imo – AIS vessel IMO number
- vesselclass – AIS vessel class code
- navstat – AIS navigational status code
- heading – Heading
- length – AIS vessel length ter meters
- width – AIS vessel width te meters
- draught – AIS vessel draught ter meters
- ref_front – AIS vessel position reference distance from the vuurlijn
- ref_left – AIS vessel position reference distance from the left
Basic location query using XML:
Querying numerous targets using a single request:
You can request gegevens for up to 20 targets by separating the callsigns using a comma. The rate limiting boundaries the amount of API queries overheen time, not the amount of targets queried. Batch queries of numerous stations are swifter for you and generate less blast on the server.
Querying weather gegevens:
Again, all gegevens is returned ter metric format: temperatures te degrees Celsius, wind speed te meters vanaf 2nd. Numerous stations may be requested by separating callsigns using the comma character, like ter location queries described above.
- temp – Temperature te degrees Celsius
- time – Time of the last weather report
- pressure – Atmospheric pressure, te millibars (mbar)
- humidity – Relative air humidity, %
- wind_direction – Media wind direction
- wind_speed – Media wind speed, te meters vanaf 2nd
- wind_gust – Wind gust, m/s
- rain_1h – Rainfall overheen past 1 hour, te millimeters
- rain_24h – Rainfall overheen past 24 hours, ter mm
- rain_mn – Rainfall since midnight, ter mm
- luminosity – Luminosity, watts / square peettante (W/m^2)
Querying text messages:
This API call comebacks at most Ten latest APRS messages for the given recipient(s). Up to Ten recipients can be queried te a single call by separating the callsigns with a comma. The returned message ID can be used at your end to check whether fresh messages have bot received since the last call.
- messageid – an incrementing id of the message (will wrap to 0 some day)
- time – Time when the message wasgoed received
- srccall – Source callsign
- dst – APRS message destination
- message – The message contents