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

Googlebot crawler

{
  "iscrawler": true,
  "crawlername": "Googlebot",
  "crawlerusage": ["Input","Search","Train"],
  "isartificialintelligence": "False",
  "crawlerurl": "https://developers.google.com/search/docs/crawling-indexing/googlebot"
}

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

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 145,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,295,686 device combinations with a new data file every Monday through Friday, so you stay bang up to date. Read about data file updates.

10-Nov 08-Dec 05-Jan 02-Feb 02-Mar 30-Mar 27-Apr 25-May 22-Jun 20-Jul 17-Aug 14-Sep 12-Oct 09-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

10-Nov 08-Dec 05-Jan 02-Feb 02-Mar 30-Mar 27-Apr 25-May 22-Jun 20-Jul 17-Aug 14-Sep 12-Oct 09-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

🔗

Use device data to inform your promotions

Compare basket size and conversion across device price bands in your analytics. Include model and device age when you review the results, then use what you learn to choose promotions to test.

Who it serves. Merchandising and analytics teams.

Talk to us about this

Pairs well with Frictionless checkout, when you also want to reduce form filling at checkout.

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 Group visits by the device's price band to compare basket size and conversion.

  1. Add device price band and model as dimensions in your analytics
  2. Compare basket size and conversion across device price bands
  3. Choose promotions based on the sales patterns you find
  4. Test the promotions and review the results

Chef's tip. Before changing what visitors on $1,200 and $120 phones see, compare their basket sizes in your analytics.

🔗

Choose ad creative that works on the visitor's device

Choose a version that fits the screen and uses a video format the browser can play. A lighter file can help on a slower connection, where a larger ad may stutter before the viewer reaches the end.

Who it serves. Ad ops and creative teams adapting ads for different devices.

Talk to us about this

Pairs well with The perfect stream, to match the video stream as well as the ad creative.

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 Use the browser's supported video formats to choose an ad it can play.

  1. Read the screen size and pixel density
  2. Check which video and image formats the device can decode
  3. Pick the creative variant to match
  4. Use campaign analytics to refine the creative choices for the next campaign

Chef's tip. Resizing an ad for the screen doesn't tell you whether the device can play the video.

🔗

Use device and location data to build audiences

Group visitors by the price band and age of their devices, then add country and town from the IP address. You can target these segments without collecting behavioral data.

Who it serves. Media buyers building audiences without third-party cookies.

Talk to us about this

Pairs well with Bidstream enrichment, when you want to include these audience details in bid requests.

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 Use the device's price band to build audience segments without collecting behavioral data.

  1. Select devices in a premium price band.
  2. Add ReleaseAge to find the flagships released this year.
  3. Add country and town for local targeting.
  4. Serve premium creative to this audience, then use 51Did to cap frequency and measure the campaign.

Chef's tip. A flagship released this year and a 2019 mid-range phone can belong in different audience segments.

🔗

Check the device behind a CTV bid request

A bid request may describe a smart TV even when it comes from another device. Use NativeBrand and NativeModel to check the manufacturer and model, then compare the claimed video support with HardwareVideoCodecsDecode.

Before you bid. Flag requests where the claimed device and the detected device disagree. This helps keep spend away from spoofed CTV inventory.

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

Talk to us about this

Pairs well with Suspicious traffic management, when you need to investigate suspicious requests. The perfect stream covers playback on genuine devices.

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 Use the detected manufacturer to check the device claimed in a CTV bid request.

  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 the video formats it supports
  4. Measure and price each impression using device data

Chef's tip. Compare the claimed TV with the detected device before you spend on the impression.

🔗

Richer device data in every OpenRTB auction

Most bid requests arrive without a full device description. We add the make and model, screen details, price band, and operating system, together with a verified 51Did, before the auction starts.

Bidders get more device detail. That extra context can increase bid density and CPMs.

"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, for adding the device data through Prebid.

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. Add the device properties and 51Did to the OpenRTB request
  3. Send the enriched request to bidders
  4. Track bid density and CPMs after adding the data

Chef's tip. A reduced User-Agent gives bidders less device detail. Add the missing context to the request.

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.