Device detection

Use our Device Detection API to get device model, operating system, browser, and crawlers.

The API matches request evidence to our device database in the cloud or on-premise for the very best performance.

Create a Resource Key

Microsoft Xbox One games console

{
  "hardwarevendor": "Microsoft",
  "hardwaremodel": "Xbox One",
  "devicetype": "Console",
  "platformname": "Xbox OS",
  "browsername": "Internet Explorer",
  "releaseyear": 2013,
  "priceband": "450.00 - 499.99"
}

https://cloud.51degrees.com/api/v4/json?resource=YOUR_KEY&user-agent=Mozilla/5.0 (co … Xbox; Xbox One)

Legacy

Legacy

Psst. What do you do when the regexes in that "free" script you picked up from a place you've forgotten break and you start losing money? 😫

Single feature. Missing the whole picture.

51Degrees

51Degrees

36 million downloads, 1.6 million websites, and 98,000 downloads in the last week.

Plans and prices are on the pricing page, and every property is in the Property Dictionary.

What you need to know

🔗

Follow the device detection tutorial for cloud or on-premise integration. For cloud use, read about the Resource Key, then create a Resource Key with the properties you need.

On-premise, your server reads a data file that 51Degrees updates automatically. In the cloud, your server sends each request to 51Degrees and gets JSON back. ON-PREMISE Your server with the data file Automatic updates 51Degrees CLOUD Your server Request JSON 51Degrees cloud
On-premise getting started, C#
using (var pipeline = new DeviceDetectionPipelineBuilder(
        loggerFactory)
    .UseOnPremise(dataFile, null, false)
    .SetPerformanceProfile(PerformanceProfiles.LowMemory)
    .SetShareUsage(false)
    .SetAutoUpdate(false)
    .SetDataUpdateOnStartUp(false)
    .SetDataFileSystemWatcher(false)
    .Build())
{
    using (var data = pipeline.CreateFlowData())
    {
        data.AddEvidence(evidence);
        data.Process();
        var device = data.Get<IDeviceData>();
    }
}

The full C# on-premise example

Compare the ways to deploy on the deployment options page.

Read the device detection quick start

🔗 Request, your website receives a page request with its headers and optional JavaScript evidence. Detect, the API matches the evidence to the device database. Respond, the API returns the device's properties for you to use. Request headers, script Detect match the data Respond device properties
  1. Your website (or content management system) receives a user's web page request.
  2. The API matches the request (User-Agents, other HTTP headers, and some optional JavaScript) to a device database.
  3. Use the returned properties to choose content for the device.

Read how device detection works

🔗

We match the User-Agent, Client-Hint, and other request evidence to device profiles in our database. Those profiles contain properties such as model, processing power, screen resolution, and retail price.

The User-Agent, Client Hints, and other headers are matched to a device profile in our database, which gives properties such as the model, screen, processor, and price. User-Agent Client Hints Other headers Profile in our database Properties model, screen, processor, price

Read about User-Agent Client Hints

🔗

Apple devices leave the hardware model out of the User-Agent, so the request headers alone cannot tell one iPhone or iPad from another. Our client-side JavaScript gathers more evidence from the device, such as its screen resolution and graphics processor, and the API then returns the model, or the model group when several models give the same evidence.

Request, the User-Agent says iPhone, iPad, or Mac. JavaScript, the server sends a script that runs on the device. Profile ID, the script sends a hardware profile ID back to the server. Model, the result gives the Apple model, or the model group when several models give the same evidence. Request iPhone or Mac JavaScript runs on device Profile ID sent back Model or model group

It works even when an iPhone browses in desktop mode and reports itself as a Mac, or when an app such as Facebook changes the User-Agent.

Read about Apple model detection

🔗

Get IP intelligence and device detection properties in the same call.

One call, device and ip
{
  "device": {
    "hardwarevendor": "Apple",
    "platformname": "iOS"
  },
  "ip": {
    "country": "United Kingdom",
    "connectiontype": "Broadband"
  }
}

See the combined examples

🔗

1.6 million websites have used 51Degrees Device Detection, and we report more than 99.99% accuracy. Ask us how that measure applies to the request evidence you can supply.

Our unmatched sub-millisecond performance gives you the edge, with 9,151,766 detections per second on a 128-core server. The API is ready to detect 142 milliseconds after it starts on an eight-core server. See the hardware benchmarks and the performance options.

We update our unrivaled 1,276,202 device combinations with a new data file every Monday through Friday, so you stay bang up to date. Read about data file updates.

03-Nov 01-Dec 29-Dec 26-Jan 23-Feb 23-Mar 20-Apr 18-May 15-Jun 13-Jul 10-Aug 07-Sep 05-Oct 02-Nov 0% 20% 40% 60% 80% 100% Week Commencing Requests (% of Total) Smartphone Desktop Other Tablet Tv Unclassified

% of active web sessions by device type

03-Nov 01-Dec 29-Dec 26-Jan 23-Feb 23-Mar 20-Apr 18-May 15-Jun 13-Jul 10-Aug 07-Sep 05-Oct 02-Nov 0% 20% 40% 60% 80% 100% Week Commencing Requests (% of Total) App Web Browser Unclassified

% of active web sessions by browser

We publish the latest graphs on our data quality page, and our processes are certified to ISO 9001 and ISO/IEC 27001. Learn more from our case studies.

See how device detection providers compare

Pick one to find out more

Each heading opens a short answer, with code, a diagram, or a figure, and a link to the documentation for more.

Read the device detection documentation
What is device detection from 51Degrees?

What is device detection from 51Degrees?

Why use device detection?

In this mobile-first, rich-media world, even the best responsive-designed websites and apps run into problems. Like when awkward screen sizes can't display a menu correctly. Or when older hardware takes minutes to load a page with one 10-second video ad.

What is device detection?

We match the User-Agent, Client-Hint, and other request evidence to device profiles in our database. Those profiles contain properties such as model, processing power, screen resolution, and retail price.

What you can use it for

You can use device detection for tailored user experiences, optimized page performance, smarter ad targeting, and sharper web analytics.

5 ways to use Device detection

🔗

The phone in their hand says what they'll spend

Price band, model, and device age are three things a shopper tells you before they've typed a word. Put them in your analytics and look at which devices fill the biggest baskets.

Who it serves. Merchandising and analytics teams.

Talk to us about this

Pairs well with Frictionless checkout, to turn shopper insights into faster, more personal checkouts.

Integration time. 30 minutes to add the dimensions to your analytics.

Ingredients, 10

Device Detection
  • PriceBand
  • ReleaseYear
  • ReleaseAge
  • HardwareModel
  • HardwareName
  • ScreenInchesDiagonal
  • PixelRatio
  • PlatformName
  • PlatformVersion
  • BrowserName

Hero ingredient. PriceBand What the shopper paid for their phone, which says a lot about what they'll pay you.

  1. Add device price band and model as dimensions in your analytics
  2. Correlate device value with basket size and conversion
  3. Change the promotions when the numbers say so
  4. Test, taste, repeat

Chef's tip. A shopper on a $1,200 phone and a shopper on a $120 phone see the same homepage. Should they?

🔗

The right asset for every screen, decided at serve time

Screen size, pixel density, and the video codecs the browser decodes decide whether a creative plays or stutters. Pick the format each device can show and the lightest file that fits the connection, and the ad gets watched to the end.

Who it serves. Ad ops and creative teams tired of one-size-fits-none.

Talk to us about this

Pairs well with The perfect stream, to deliver the right creative and the right stream, every time.

Integration time. One sprint, alongside your ad server.

Ingredients, 12

Device Detection
  • ScreenInchesDiagonal
  • ScreenPixelsWidth
  • PixelRatio
  • BrowserVideoCodecsDecode
  • Html5Video
  • WebP
  • BrowserName
  • IsMobile
  • IsTablet
  • IsTv
IP Intelligence
  • ConnectionType
Bots and Humans
  • HumanConfidence

Hero ingredient. BrowserVideoCodecsDecode Direct commercial impact: better engagement and less wasted bandwidth.

  1. Measure the exact screen size and pixel density
  2. Check which video and image formats the device can actually decode
  3. Pick the creative variant to match
  4. Garnish with analytics and refine the next campaign

Chef's tip. Responsive design stretches one creative to fit all. This recipe cooks the right one in the first place.

🔗

High-value audiences, no cookies required

The device in someone's hand says whether they're a premium, mid-market, or budget buyer, and the network says where they are. Segment by price band, device age, and technology adoption, then add the country and town from the IP address. There's no behavioral data to collect or defend.

Who it serves. Media buyers targeting premium users after the third-party cookie.

Talk to us about this

Pairs well with Bidstream enrichment, to turn enriched bid requests into premium audience targeting.

Integration time. One afternoon with the Pipeline API.

Ingredients, 12

Device Detection
  • PriceBand
  • ReleaseAge
  • ReleaseYear
  • HardwareRank
  • HardwareVendor
  • DeviceType
  • BrowserName
  • PlatformName
IP Intelligence
  • Country
  • Town
Bots and Humans
  • HumanConfidence

Hero ingredient. PriceBand It separates premium, mid-market, and budget consumers without needing any behavioral data.

  1. Reduce your traffic down to devices in a premium price band.
  2. Add ReleaseAge to find the flagships released this year.
  3. Season with country and town for market-level targeting.
  4. Serve premium creative to people who actually buy premium. Cap and measure with 51Did.

Chef's tip. Someone on a brand-new flagship and someone on a 2019 mid-ranger are not the same audience. Stop bidding like they are.

🔗

Know which screen is really behind the bid request

A bid request claims a smart TV and says what it can decode. NativeBrand and NativeModel name the manufacturer and model really behind it, and the chipset says what it truly decodes.

What changes. When the claim and the detection disagree, the inventory isn't what it says it is. Spoofed CTV inventory is flagged before you bid on it, and the budget stays with the screens that exist.

Who it serves. CTV publishers, SSPs, DSPs, and measurement platforms.

Talk to us about this

Pairs well with Suspicious traffic management, to stop fake CTV traffic, and with The perfect stream to optimize every genuine one.

Integration time. One sprint, alongside your bidder.

Ingredients, 12

Device Detection
  • IsTv
  • IsMediaHub
  • IsConsole
  • HardwareVendor
  • HardwareModel
  • NativeBrand
  • NativeModel
  • HardwareVideoCodecsDecode
  • PlatformName
  • PlatformVersion
  • BrowserName
  • DeviceType

Hero ingredient. NativeBrand The actual manufacturer of the device, not what the bid request claims. Immediate value against CTV spoofing.

  1. Separate the TVs from the sticks, boxes, and consoles
  2. Pass the real vendor and model into the CTV bid request
  3. Cross-check the claimed device against what it can actually decode
  4. Measure and price by device, not by IP

Chef's tip. Fake CTV traffic never watches television. It just bills like it does.

🔗

Richer device data in every OpenRTB auction

Most bid requests arrive with the device half described. Client Hints froze the User-Agent, and a reduced User-Agent tells a bidder less every year. We put the make, model, screen, price band, and operating system back, with a verified 51Did, before the auction starts.

What changes. Bidders pay for what they can see, so bid density and CPMs rise.

"device": {
  "devicetype": 4,
  "make": "Samsung",
  "model": "Galaxy S25",
  "os": "Android",
  "osv": "15",
  "w": 1080,
  "h": 2340
}

Who it serves. Publishers, SSPs, DSPs, and exchanges enriching the bidstream.

Talk to us about this

Pairs well with Prebid bidstream enrichment, to turn richer bid requests into smarter header bidding.

Integration time. One sprint in your bid path.

Ingredients, 17

Device Detection
  • HardwareVendor
  • HardwareModel
  • DeviceType
  • PlatformName
  • PlatformVersion
  • PlatformVendor
  • BrowserName
  • BrowserVersion
  • NativeBrand
  • NativeModel
  • ScreenPixelsWidth
  • ScreenPixelsHeight
  • PixelRatio
  • PriceBand
  • ThirdPartyCookiesEnabled
Bots and Humans
  • HumanConfidence

Hero ingredient. HumanConfidence Know how likely it is that a person will see your ad.

  1. Deploy the 51Degrees Pipeline API in your bid path
  2. Fold the device properties and 51Did into the OpenRTB request
  3. Serve to bidders while hot
  4. Watch bid density and CPMs rise

Chef's tip. Client Hints froze the User-Agent. We didn't freeze with it.

Pick the one closest to your business challenge

The story is for you and the recipe for your engineers, with the properties they need and a link to create their Resource Key.