API: Callsign search with wildcard

52 views
Skip to first unread message

Ryan Gartin

unread,
Mar 17, 2017, 2:25:45 AM3/17/17
to aprs.fi
Currently wildcard search of callsigns using the API isn't possible.  I've tried the following: "*", "%", "?", "%3F", "%25", "%2A".

Depending on what device a HAM uses, the default Symbol will vary and so will their callsign, making it unpredictable. If there is a limit of 20 callsigns per query, then I can only query 2 callsigns in reality because I have to check the 10 or so different combinations. K4ABC-1,K4ABC-2, etc.

Seeing as this is supported on the main website can we get it in the API as well? I think a "*" (or URI Encoded "%2A") makes the most sense. 

If there is a concern of searching/returning to much of the Database, can we get the base callsign to be searchable? You could do this by regex replace (/-.//). I don't care about finding hundreds of "K4*".

Thanks!

Heikki Hannikainen

unread,
Mar 17, 2017, 2:50:24 AM3/17/17
to aprs.fi
On Thu, 16 Mar 2017, Ryan Gartin wrote:

> Currently wildcard search of callsigns using the API isn't possible.
>  I've tried the following: "*", "%", "?", "%3F", "%25", "%2A".

Right, the API call is for getting latest data for a specific station.
It's not a searching API at all. Search is intentionally not a feature of
the API.

The intended use is getting data about specific stations. The API only
exposes data which can be very quickly looked up from the memory cache.

If you need more complex functions such as searching on different
criteria, I'm afraid you'll need to collect it from the APRS-IS and put it
in a database of your own. The APRS packet parser used by aprs.fi is open
source and might be helpful: https://github.com/hessu/perl-aprs-fap

- Hessu

Ryan Gartin

unread,
Mar 17, 2017, 9:41:22 AM3/17/17
to aprs.fi
Perhaps I confused the issue/request. Let me simplify:

Can you please add a regex "-." search on your end. This way when I query "K4ABC" I will get results for:

K4ABC-7
K4ABC-9

I'm really poor at issue titles. I was not asking for search functionality. I don't see any way this could be abused since the "-" character would fail anything but a full callsign.

Heikki Hannikainen

unread,
Mar 17, 2017, 9:56:38 AM3/17/17
to aprs.fi
Sorry, no, I will not be adding search.

Repeating myself a bit: this API is for looking up specific stations. It
is not supposed to return other stations (other SSIDs). It'd be silly and
unexpected if it returned OH7LZB-9 when I'm specifically asking OH7LZB
alone. How would one then ask for OH7LZB alone and not all the other
SSIDs?

The lookup happens from an indexed cache in memory (hash lookup) which
does not even support regular expression search.

- Hessu

Ryan Gartin

unread,
Mar 17, 2017, 10:18:42 AM3/17/17
to apr...@googlegroups.com
So how are you doing it on the aprs.fi frontend?

I type in: "K4ABC" and it finds my mobile station "K4ABC-9".

--
You received this message because you are subscribed to a topic in the Google Groups "aprs.fi" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/aprsfi/7b95a1JmTS8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to aprsfi+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Heikki Hannikainen

unread,
Mar 17, 2017, 10:30:57 AM3/17/17
to apr...@googlegroups.com
On Fri, 17 Mar 2017, Ryan Gartin wrote:

> So how are you doing it on the aprs.fi frontend?

The aprs.fi web frontend uses other methods, it does not use this API.
It's not really relevant.

The API intentionally is not built to have search, or history / time
series download features. My specific intention is that the API can not
be used to build search and history display functions that are present on
the aprs.fi web UI and the aprs.fi iOS app. If you wish to have those
functions, you'll need to deploy your own backend database.

This is partially due to technical reasons, partially due to what I want
it to do (*fast* and *cheap* lookups of specific stations), and partially
because I don't want people duplicating some key aprs.fi web/app functions
in their own services while using my backend API for free.

Sorry!
> You received this message because you are subscribed to the Google Groups "aprs.fi" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to aprsfi+un...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>
>

- Hessu

Ryan Gartin

unread,
Apr 13, 2017, 4:53:16 PM4/13/17
to aprs.fi
Following up on a solution:

Thanks to Hessu's open source packet parser I was able to throw up a quick API written in nodeJS and a MySQL backend to accomplish this. Currently the database is 0.5GB so I will be expanding the history to 31 days. Wildcard search is supported.


Thanks again Hessu for your contributions to the community that make things like this possible!
-Ryan

Bill Vodall

unread,
Apr 13, 2017, 5:41:52 PM4/13/17
to apr...@googlegroups.com
>. Wildcard
> search is supported.

How does that work? Simple query of my call, upper or lower case,
returns nothing..

Bill

> http://simpleaprs.info/

Heikki Hannikainen

unread,
Apr 14, 2017, 3:39:35 AM4/14/17
to apr...@googlegroups.com
On Thu, 13 Apr 2017, Bill Vodall wrote:

>> . Wildcard
>> search is supported.
>
> How does that work? Simple query of my call, upper or lower case,
> returns nothing..

Maybe you could move any further discussion on that service somewhere
else; as this mailing list is dedicated for the aprs.fi service. Thank
you!

I let the original announcement mail through the moderation step as an
exception.

- Hessu

Reply all
Reply to author
Forward
0 new messages