SHORT VERSION: If you are in a hurry, the following video will deliver the gist of WURFL Query REST API.
WURFL Query REST API
Let’s get into the details.
WURFL Query REST API (or QuWURFL, as we call it for short) is the closest to a free and public device information database.We say “the closest” because it does not come in the form of a database you can download, but — for most practical uses — it does serve the same purpose: you can enhance your website or other services with device knowledge at no cost as long as your use is within reason: QuWURFL is a public REST API that lets you access lists of mobile devices, along with their names and properties.
You are welcome!
You are probably trying to understand what is driving ScientiaMobile to make such a powerful service available free of charge before you invest your precious time. Let’s address that aspect first.
QuWURFL uses a freemium model. This free API will demonstrate WURFL’s value and further establish ScientiaMobile’s role as a leader in device detection among developers. At the same time, we know that companies and organizations don’t just adopt software, be it on-prem or in the Cloud (SaaS), but demand solutions that come with a service-level agreement (SLA) and industry-grade support, that are scalable and that offer additional features not available to free users. That’s where the QuWURFL Business Edition comes into play. In short, if the free version is good enough for you, go nuts and adopt it today.
Figure: WURFL Query REST API Community Edition available at: https://api.query.wurfl.io/
And now, the technical part.
At ScientiaMobile, we excel at detecting devices as they introduce themselves with an HTTP request. WURFL’s 20+ years of experience in this field vouch for that. But what about devices not introducing themselves with HTTP(S)?
That was the challenge that inspired QuWURFL: let programmers query WURFL devices based on their properties, including “their names” and including its capability values. This API allows users to query WURFL programmatically, turning every device property into a search key while offering multiple ways to explore the data.
The WURFL Query REST API offers a variety of endpoints. One of them — autofill — fits this use case perfectly: https://api.query.wurfl.io/v1/docs/#operation/autofill-devices
The endpoint needs a short string as input, and it will return a (JSON) list of objects representing WURFL devices that match that string. While the match will apply to both model and marketing names, it will also cover the brand name (if the user is typing Apple, Samsung, Huawei, or some other brand name). Let’s say the user has typed ‘pixel’ and we only want four suggestions ( maximum query string parameter). Invoking this endpoint would take care of it:
$ curl "https://api.query.wurfl.io/v1/devices/autofillBySubstring?key=pixel&maximum=4" [ { "model_name": "Pixel Fold", "marketing_name": "", "brand_name": "Google", "wurfl_id": "google_pixel_fold_ver1", "relevance": 281 }, { "model_name": "Pixel Tablet", "marketing_name": "", "brand_name": "Google", "wurfl_id": "google_pixel_tablet_ver1", "relevance": 281 }, { "model_name": "Pixel 7a", "marketing_name": "", "brand_name": "Google", "wurfl_id": "google_pixel_7a_ver1", "relevance": 280 }, { "model_name": "P50", "marketing_name": "", "brand_name": "Pixel", "wurfl_id": "pixel_p50_ver1", "relevance": 153 } ]
As our servers will honor this request in milliseconds (plus the network round trip), it makes sense to call this endpoint from within a web application. Just wait for some user input and — when you have a few chars — invoke the API, get the suggestions in JSON format and build your iTunesque autofill (you may want to use a JavaScript technique called debouncing to make sure that the user is done typing before you ask QuWURFL for suggestions).
We know this works because we used it in our demo application at https://demo.query.wurfl.io/ (type something in the top toolbar field to see it in action).
This post is starting to look a lot similar to the blog post we wrote last month to announce the first beta version of QuWURFL, and to our WURFL Query REST API Getting Started Guide (which I invite you to read if you are looking for examples of how the different endpoints can be invoked with curl). So let’s talk about something more relevant. The first thing is support. While we are not offering dedicated customer support to free users, we decided to set up a Discord server, and have some of our support people check there regularly. Feel free to come by and say hi. We are friendly people. We are usually there during US office hours (plus some).
What is more important, is what you can do with QuWURFL, particularly if you pair it with a WURFL.js account.
Helping consumers identify their phones and other mobile devices
If you stop a random person in the street, they might be unable to tell you their device make and model. What about their OS version or the display size? Forget it. Scan this QR code and you will see a live example of how WURFL detects a device by going full Sherlock on HTTP headers.
(In the unlikely event the device is not recognized, please let us know what it is, and we will rush to add it).
Even better, if you visit the QuWURFL Demo App with your desktop browser and scan the QR code there with your phone, you will see the phone information automagically pushed to the webpage open on your PC screen.
What this might mean for your business is up to you to figure out, but there is a pretty compelling scenario that QuWURFL and WURFL.js are enabling here: you can have customers scan a QR code and the sales assistant will see device information show up on their screen. This will go a long way in streamlining the process of determining what service or product is supported on that device. This would apply to selling phone accessories, determining if an App is compatible with that device or a piece of the appliance will interoperate with the device that a potential customer already owns.
QuWURFL Premium (WURFL Query REST API Business Edition)
Finally, what will the premium version of QuWURFL give you over the free version?
- Access to your own customer vault (valid domains/API keys).
- Separate set of servers for Business Edition customers (https://api.query.wurflcloud.com/).
- Service Level Agreement (SLA).
- Direct customer support.
- Custom set of WURFL properties.
- No rate limiting.
If the premium version is what you need, you can find us here: https://www.scientiamobile.com/general-inquiry/