Examples

Practical recipes you can copy and adapt.

1. Get the best camera phones

Fetches the top 10 devices ranked by their overall camera score. Returns brand, model, and score sorted highest first.

curl "https://api.bandicootlab.com/rest/v1/scores?score_definition=eq.camera_overall&select=brand,model,score&order=score.desc&limit=10" \
  -H "apikey: YOUR_API_KEY" \
  -H "Accept-Profile: api"
Response — 200
[
  { "brand": "Samsung", "model": "Galaxy S25 Ultra", "score": 823.7 },
  { "brand": "Apple", "model": "iPhone 16 Pro Max", "score": 811.2 },
  { "brand": "Google", "model": "Pixel 9 Pro XL", "score": 794.5 },
  { "brand": "Samsung", "model": "Galaxy S25+", "score": 768.1 },
  { "brand": "Apple", "model": "iPhone 17 Pro Max", "score": 762.9 }
  // ... 5 more
]

2. Compare battery life across flagships

Pulls web, video, and gaming battery sub-scores for three specific flagships so you can compare endurance head-to-head.

curl "https://api.bandicootlab.com/rest/v1/scores?score_definition=in.(battery_web,battery_video,battery_gaming)&device_id=in.(apple_iphone_17_pro_max,samsung_galaxy_s25_ultra,google_pixel_10_pro)&select=brand,model,score_definition,score" \
  -H "apikey: YOUR_API_KEY" \
  -H "Accept-Profile: api"
Response — 200
[
  { "brand": "Apple", "model": "iPhone 17 Pro Max", "score_definition": "battery_web", "score": 687.4 },
  { "brand": "Apple", "model": "iPhone 17 Pro Max", "score_definition": "battery_video", "score": 742.1 },
  { "brand": "Apple", "model": "iPhone 17 Pro Max", "score_definition": "battery_gaming", "score": 598.3 },
  { "brand": "Samsung", "model": "Galaxy S25 Ultra", "score_definition": "battery_web", "score": 651.8 },
  { "brand": "Samsung", "model": "Galaxy S25 Ultra", "score_definition": "battery_video", "score": 704.6 },
  { "brand": "Samsung", "model": "Galaxy S25 Ultra", "score_definition": "battery_gaming", "score": 623.9 },
  { "brand": "Google", "model": "Pixel 10 Pro", "score_definition": "battery_web", "score": 612.5 },
  { "brand": "Google", "model": "Pixel 10 Pro", "score_definition": "battery_video", "score": 668.3 },
  { "brand": "Google", "model": "Pixel 10 Pro", "score_definition": "battery_gaming", "score": 571.0 }
]

3. Get raw camera sharpness measurements

Returns the raw test run data for every sharpness variant (each lens × lighting × mode combination). The metrics object contains per-patch MTF data, regional averages, and oversharpening analysis.

curl "https://api.bandicootlab.com/rest/v1/test_runs?device_id=eq.apple_iphone_17_pro_max&definition_id=eq.camera_sharpness&select=variant,metrics" \
  -H "apikey: YOUR_API_KEY" \
  -H "Accept-Profile: api"
Response — 200 (truncated)
[
  {
    "variant": "Main Bright Auto",
    "metrics": {
      "overall_score_lwph": 2847,
      "adjusted_score_lwph": 2614,
      "sharpness_center_lwph": 3102,
      "sharpness_mid_lwph": 2791,
      "sharpness_corner_lwph": 2248,
      "chromatic_aberration": 0.42,
      "all_patches": [ /* 175 patches */ ]
    }
  },
  {
    "variant": "Main Mid Auto",
    "metrics": {
      "overall_score_lwph": 2203,
      "adjusted_score_lwph": 1987,
      "sharpness_center_lwph": 2456,
      // ...
    }
  }
  // ... more variants (Main Dark Auto, UW Bright Auto, Front Bright Auto, etc.)
]

4. Find all phones with telephoto cameras under $1,000

Filters the devices table for phones that have a telephoto lens and cost less than $1,000. Great for building comparison tools or recommendation engines.

curl "https://api.bandicootlab.com/rest/v1/devices?telephoto_zoom=not.is.null&price=lt.1000&select=brand,model,price,telephoto_zoom" \
  -H "apikey: YOUR_API_KEY" \
  -H "Accept-Profile: api"
Response — 200
[
  { "brand": "Samsung", "model": "Galaxy S25+", "price": 999, "telephoto_zoom": "3" },
  { "brand": "Google", "model": "Pixel 10 Pro", "price": 899, "telephoto_zoom": "5" },
  { "brand": "Samsung", "model": "Galaxy S24 FE", "price": 649, "telephoto_zoom": "3" }
  // ...
]

5. Get the full charging curve for a device

Returns the complete wired charging test run including per-percent data: time elapsed, wattage, and temperature at every 1% from 0–100%. Ideal for plotting charging speed curves.

curl "https://api.bandicootlab.com/rest/v1/test_runs?device_id=eq.samsung_galaxy_s25_ultra&definition_id=eq.charging_wired&select=variant,metrics" \
  -H "apikey: YOUR_API_KEY" \
  -H "Accept-Profile: api"
Response — 200 (truncated)
[
  {
    "variant": null,
    "metrics": {
      "curve_cost": 4217,
      "pct_10_mins": 28,
      "pct_30_mins": 65,
      "charging_data": {
        "1_percent": { "time_mins": 0.8, "wattage_w": 42.1, "temp_c": 26.3 },
        "2_percent": { "time_mins": 1.5, "wattage_w": 43.8, "temp_c": 26.7 },
        "3_percent": { "time_mins": 2.2, "wattage_w": 44.2, "temp_c": 27.1 },
        // ... per-percent data up to 100_percent
        "100_percent": { "time_mins": 62.4, "wattage_w": 2.1, "temp_c": 31.2 }
      }
    }
  }
]

Build something?

These examples are just starting points. Combine PostgREST filtering with any of our endpoints to build leaderboards, comparison tools, or data dashboards. See the Data Dictionary for the complete field reference.