{"id":29131323,"url":"https://github.com/mohammednudman/play-supported-devices","last_synced_at":"2026-05-05T04:40:12.097Z","repository":{"id":301231889,"uuid":"1008596689","full_name":"mohammednudman/play-supported-devices","owner":"mohammednudman","description":"Typed and optimized local cache of Google’s supported Android devices list, with exact and partial search.","archived":false,"fork":false,"pushed_at":"2025-06-25T20:18:38.000Z","size":0,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-25T20:34:43.259Z","etag":null,"topics":["android","cli","devices","google-play","json","npm-package","open-data","search","typescript","web-scraping"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mohammednudman.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-06-25T19:44:50.000Z","updated_at":"2025-06-25T19:59:24.000Z","dependencies_parsed_at":"2025-06-25T20:44:57.192Z","dependency_job_id":null,"html_url":"https://github.com/mohammednudman/play-supported-devices","commit_stats":null,"previous_names":["mohammednudman/play-supported-devices"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mohammednudman/play-supported-devices","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohammednudman%2Fplay-supported-devices","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohammednudman%2Fplay-supported-devices/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohammednudman%2Fplay-supported-devices/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohammednudman%2Fplay-supported-devices/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mohammednudman","download_url":"https://codeload.github.com/mohammednudman/play-supported-devices/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohammednudman%2Fplay-supported-devices/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262714504,"owners_count":23352466,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","cli","devices","google-play","json","npm-package","open-data","search","typescript","web-scraping"],"created_at":"2025-06-30T05:07:44.354Z","updated_at":"2026-05-05T04:40:12.092Z","avatar_url":"https://github.com/mohammednudman.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 📱 play-supported-devices\n\n[![npm](https://img.shields.io/npm/v/play-supported-devices?color=blue\u0026label=npm)](https://www.npmjs.com/package/play-supported-devices)\n[![license](https://img.shields.io/npm/l/play-supported-devices)](./LICENSE)\n[![auto-update](https://github.com/mohammednudman/play-supported-devices/actions/workflows/refresh.yml/badge.svg)](https://github.com/mohammednudman/play-supported-devices/actions)\n[![CI](https://github.com/mohammednudman/play-supported-devices/actions/workflows/ci.yml/badge.svg)](https://github.com/mohammednudman/play-supported-devices/actions)\n\n\u003e A fast, searchable, auto-updating local cache of [Google Play Supported Devices](https://storage.googleapis.com/play_public/supported_devices.html) as a lightweight NPM package.\n\n---\n\n## 🚀 Features\n\n- 🧠 Pre-parsed JSON of Google’s supported Android devices\n- 🔍 Optimized in-memory search engine for exact and partial matches\n- ⚡ Fast lookups by `manufacturer`, `model`, `codename`, etc.\n- 🔁 Auto-refresh every 3 hours via GitHub Actions (or manually via CLI)\n- ✅ Zero dependencies for end users\n- 📦 Ready for use in Node.js, web tools, or CLIs\n\n---\n\n## 📦 Installation\n\n```bash\nnpm install play-supported-devices\n```\n\n---\n\n## 🔧 Usage\n\n### Basic Example\n\n```ts\nimport {\n  getAllDevices,\n  searchExact,\n  searchContains,\n  listColumns\n} from 'play-supported-devices';\n\nconst all = getAllDevices();\nconsole.log(`Total devices: ${all.length}`);\n\nconst samsungs = searchExact('manufacturer', 'Samsung');\nconsole.log('Samsung devices:', samsungs.length);\n\nconst partial = searchContains('model', 'S928');\nconsole.table(partial.slice(0, 5));\n\nconsole.log('Available columns:', listColumns());\n```\n\n---\n\n## 🧠 Data Structure\n\nEach device entry follows:\n\n```ts\ninterface DeviceEntry {\n  marketingName: string;   // e.g. \"Galaxy S24 Ultra\"\n  device: string;          // e.g. \"dm3q\" (same as codename)\n  model: string;           // e.g. \"SM-S928B\"\n  manufacturer: string;    // e.g. \"Samsung\"\n  codename: string;        // e.g. \"dm3q\"\n}\n```\n\n---\n\n## 🔍 Search API\n\nAll queries are **case-insensitive**.\n\n### `getAllDevices(): DeviceEntry[]`\n\nReturns all devices from the local cache.\n\n---\n\n### `searchExact(column, value): DeviceEntry[]`\n\nFind entries where the column exactly matches the value.\n\n```ts\nsearchExact('manufacturer', 'Samsung');\n```\n\n---\n\n### `searchContains(column, value): DeviceEntry[]`\n\nFind entries where the column contains the value.\n\n```ts\nsearchContains('model', '928B');\n```\n\n---\n\n### `listColumns(): (keyof DeviceEntry)[]`\n\nGet list of valid searchable columns:\n```ts\n['marketingName', 'device', 'model', 'manufacturer', 'codename']\n```\n\n---\n\n## 🔄 Updating the Cache\n\n### Manually\n\n```bash\nnpm run update\n```\n\nThis fetches the latest HTML from Google and updates `data/devices.json`.\n\n### Automatically\n\nA GitHub Actions workflow runs every **3 hours** to keep the cache fresh and versioned.\n\n---\n\n## 💻 CLI (optional)\n\n\u003e Coming soon\n\nUse the package via CLI with commands like:\n\n```bash\nnpx play-supported-devices samsung\nnpx play-supported-devices --contains model S928B\n```\n\n---\n\n## 📁 Project Structure\n\n```\n.\n├── src/               # Core logic and index\n├── data/devices.json  # Auto-updated JSON cache\n├── scripts/update.ts  # Refresh logic\n├── test/              # Vitest test suite\n└── README.md\n```\n\n---\n\n## ✅ Development\n\n```bash\nnpm install\nnpm run build        # Compile with tsup\nnpm run test         # Run tests with vitest\nnpm run update       # Fetch and regenerate devices.json\n```\n\n---\n\n## 📃 License\n\nMIT © [Mohammed Nudman Raza Shaikh](https://github.com/mohammednudman)\n\n---\n\n## 🙌 Contributions\n\nPRs and suggestions welcome!  \nIf the HTML structure changes, feel free to file an issue or submit a parser patch.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmohammednudman%2Fplay-supported-devices","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmohammednudman%2Fplay-supported-devices","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmohammednudman%2Fplay-supported-devices/lists"}