A simple, unofficial REST API to scrape phone specifications and data from GSMArena.com. Built with Fastify and TypeScript for maximum performance and type safety.
This project provides structured JSON data for phone brands, device lists, detailed specifications, and popularity rankings.
- No API Key Required: Open and free to use.
- Structured JSON Output: Clean, predictable, and easy-to-use data format.
- Comprehensive Endpoints: Get brands, phone lists, detailed specs, latest devices, and top-ranked phones.
- Fast & Lightweight: Built on top of Fastify, one of the fastest web frameworks for Node.js.
- Fully Typed: Written in TypeScript for a better developer experience.
To get a local copy up and running, follow these simple steps.
- Node.js (v18 or later)
- pnpm (or npm/yarn)
- Clone the repo
git clone https://github.com/your-username/gsmarena-parser-api.git cd gsmarena-parser-api - Install packages
pnpm install
- Run the development server
The server will start on
http://localhost:4000and automatically restart on file changes.pnpm dev
- For production:
pnpm build pnpm start
All successful responses are wrapped in a { status: true, data: ... } object.
GET /brands- Returns an object of all available brands.
- Example:
http://localhost:4000/brands
-
GET /brands/:brandSlug- Returns a list of phones for a specific brand.
- Example:
http://localhost:4000/brands/apple-phones-48
-
GET /latest- Returns a list of the latest added devices. The response is wrapped in a
{ title, phones }object. - Example:
http://localhost:4000/latest
- Returns a list of the latest added devices. The response is wrapped in a
-
GET /top-by-interest- Returns a ranked list of phones by daily user interest.
- Example:
http://localhost:4000/top-by-interest
-
GET /top-by-fans- Returns a ranked list of phones by the number of fans.
- Example:
http://localhost:4000/top-by-fans
-
GET /search?query=:searchQuery- Returns a list of phones matching the search query.
- Example:
http://localhost:4000/search?query=iPhone 15 Pro
-
GET /:slug- Returns detailed specifications for a specific phone.
- Example:
http://localhost:4000/apple_iphone_15_pro_max-12557
Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Distributed under the MIT License. See LICENSE file for more information.
This project is for educational purposes only. It is not affiliated with GSMArena.com in any way. Web scraping can be against the terms of service of a website. Please use this project responsibly and respect the terms of service of GSMArena.com. The developer assumes no liability for any misuse of this scraper.
