Skip to content

MobileAPI-dev/mobileapi-examples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MobileAPI Examples & SDKs

License: MIT MobileAPI

Example applications and SDK wrappers for MobileAPI.dev -- the REST API providing detailed specifications, images, and pricing data for 27,000+ mobile devices including smartphones, tablets, smartwatches, and laptops from 200+ brands.

What is MobileAPI?

MobileAPI.dev gives you a single, clean REST API to access device specifications for virtually every mobile device on the market. Use it to build comparison tools, e-commerce integrations, trade-in platforms, and more.

  • 27,805+ devices across 200+ brands
  • Fuzzy search with typo tolerance and match confidence scores
  • Device images -- thumbnails included in listings, full-resolution via dedicated endpoints
  • Free tier -- 200 requests/month, no credit card required

Get your free API key | Read the docs


Table of Contents

Example Language Description
Python SDK Python Lightweight wrapper class with type hints
Device Comparison Tool (Flask) Python Side-by-side spec comparison web app
Search Demo (CLI) Python Interactive terminal search with fuzzy matching
JavaScript SDK JavaScript ES module wrapper for Node.js and browser
Device Comparison Tool (Vanilla JS) JavaScript Single-page comparison app, no build step
Trade-In Estimator JavaScript Device trade-in value calculator
curl Examples Shell Annotated examples for every endpoint

Quick Start

Sign up for a free API key at mobileapi.dev/signup, then:

# Set your API key
export MOBILEAPI_KEY="your_api_key_here"

# Search for a device
curl -s -H "Authorization: Bearer $MOBILEAPI_KEY" \
  "https://api.mobileapi.dev/devices/search/?name=samsung+galaxy+s25"

# Get device specs
curl -s -H "Authorization: Bearer $MOBILEAPI_KEY" \
  "https://api.mobileapi.dev/devices/1/"

Examples

Python SDK

A clean, typed wrapper class for every MobileAPI endpoint.

from mobileapi import MobileAPI

api = MobileAPI()  # reads MOBILEAPI_KEY from environment
results = api.search_devices(name="iPhone 16 Pro")
for device in results["results"]:
    print(f"{device['name']} - {device['match_certainty']}% match")

View Python SDK code and docs


Device Comparison Tool (Flask)

A polished web app for comparing two devices side by side. Search with autocomplete, select devices, and view a detailed spec comparison table with images.

cd python/comparison-tool
pip install -r requirements.txt
export MOBILEAPI_KEY="your_api_key_here"
python app.py
# Open http://localhost:5000

View Comparison Tool code and docs


Search Demo (CLI)

An interactive terminal tool demonstrating MobileAPI's fuzzy search and autocomplete. Type a query, see matching devices with confidence scores.

cd python/search-demo
pip install -r requirements.txt
export MOBILEAPI_KEY="your_api_key_here"
python search.py

View Search Demo code and docs


JavaScript SDK

An ES module wrapper that works in both Node.js and the browser.

import { MobileAPI } from "./mobileapi.js";

const api = new MobileAPI("your_api_key_here");
const results = await api.searchDevices({ name: "Pixel 9" });
console.log(results);

View JavaScript SDK code and docs


Device Comparison Tool (Vanilla JS)

A single-page comparison tool built with vanilla JavaScript -- no frameworks, no build step. Open index.html in your browser and start comparing.

View Comparison Tool code and docs


Trade-In Estimator

Demonstrates how to combine MobileAPI device data with custom business logic to estimate trade-in values. Users search for a device, select its condition, and get an instant estimate.

View Trade-In Estimator code and docs


curl Examples

Annotated shell examples covering every MobileAPI endpoint, with jq formatting tips.

cd curl
chmod +x examples.sh
export MOBILEAPI_KEY="your_api_key_here"
./examples.sh

View curl examples


API Overview

Endpoint Description
GET /devices/ Paginated device listing
GET /devices/{id}/ Single device by ID
GET /devices/search/?name=... Fuzzy search by name or model
GET /devices/autocomplete/?name=... Type-ahead suggestions
GET /devices/by-manufacturer/?manufacturer=... Filter by brand
GET /devices/by-year/?year=... Filter by release year
GET /devices/by-type/?type=... Filter by type (phone/tablet/laptop/wearable)
GET /devices/{id}/images/ Image gallery metadata
GET /devices/{id}/image/ Primary device image (binary)
GET /manufacturers/ List all brands
GET /devices/{id}/{spec}/ Individual spec category

Full documentation: mobileapi.dev/docs


Built with MobileAPI

Using MobileAPI in your project? We'd love to feature it here! Open a PR to add your project to this list.

Your project could be the first one listed here.


Contributing

Contributions are welcome! Whether it's a new example app, an SDK in another language, or improvements to existing code:

  1. Fork this repository
  2. Create a feature branch: git checkout -b my-new-example
  3. Make your changes and test them
  4. Commit with a clear message: git commit -m "Add Ruby SDK wrapper"
  5. Push to your fork: git push origin my-new-example
  6. Open a Pull Request

Ideas for contributions

  • SDK wrappers in other languages (Ruby, Go, PHP, Java, C#, Rust)
  • Framework-specific examples (React, Vue, Next.js, Django REST, FastAPI)
  • Mobile app examples (React Native, Flutter, Swift, Kotlin)
  • Integration examples (Zapier, n8n, Google Sheets)
  • Data visualization dashboards

Links


License

This project is licensed under the MIT License. See LICENSE for details.

About

MobileAPI.dev examples, SDKs, and demo applications — device specs API for 27,000+ smartphones, tablets, and wearables

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors