PHPackages                             appstore-reviews-parser/parser - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. appstore-reviews-parser/parser

ActiveLibrary[Parsing &amp; Serialization](/categories/parsing)

appstore-reviews-parser/parser
==============================

A standalone PHP library for parsing App Store reviews from iTunes RSS feed

v1.0.1(2mo ago)03↓100%MITPHPPHP &gt;=8.0

Since Mar 9Pushed 2mo agoCompare

[ Source](https://github.com/fitz0z/appstore_reviews_parser)[ Packagist](https://packagist.org/packages/appstore-reviews-parser/parser)[ RSS](/packages/appstore-reviews-parser-parser/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)DependenciesVersions (3)Used By (0)

App Store Reviews Parser
========================

[](#app-store-reviews-parser)

A standalone PHP library for fetching and parsing App Store customer reviews from the iTunes RSS feed.

[![Latest Stable Version](https://camo.githubusercontent.com/7f4893e23c9d93a32809cf031904c5f9ab2ebbf1352dd4385060281b3b871f4d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f61707073746f72652d726576696577732d7061727365722f706172736572)](https://packagist.org/packages/appstore-reviews-parser/parser)[![GitHub License](https://camo.githubusercontent.com/688f3eef9a32106853efa42b4d06458690d18628a61df68ee1bb97cea174412b/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6669747a307a2f61707073746f72655f726576696577735f706172736572)](https://camo.githubusercontent.com/688f3eef9a32106853efa42b4d06458690d18628a61df68ee1bb97cea174412b/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6669747a307a2f61707073746f72655f726576696577735f706172736572)

Features
--------

[](#features)

- Fetch reviews from any App Store (country-specific)
- Support for pagination (up to 10 pages)
- Sort by most recent or most helpful reviews
- Minimal dependencies - only requires PHP 8.0+
- Comprehensive error handling
- Rate limiting detection
- Returns normalized JSON data structure
- Create parser from JSON configuration

Requirements
------------

[](#requirements)

- PHP 8.0 or higher
- SimpleXML extension (usually included with PHP)

Installation
------------

[](#installation)

Install via Composer:

```
composer require appstore-reviews-parser/parser
```

Or add to your composer.json:

```
{
    "require": {
        "appstore-reviews-parser/parser": "^1.0"
    }
}
```

Usage
-----

[](#usage)

### Using Method Chaining (Fluent Interface)

[](#using-method-chaining-fluent-interface)

You can create a parser instance and configure it using method chaining:

```
use AppStoreReviewsParser\AppStoreReviewsParser;

// Create parser with method chaining
$parser = new AppStoreReviewsParser();
$result = $parser->setAppId('123456789')
    ->setCountry('us')
    ->setPage(1)
    ->setSortBy('mostrecent')
    ->setTimeout(30)
    ->fetch();

if ($result['success']) {
    foreach ($result['data'] as $review) {
        echo "Rating: {$review['rating']} - {$review['title']}\n";
    }
} else {
    echo "Error: " . $result['error'];
}
```

### Using JSON Configuration

[](#using-json-configuration)

You can create a parser instance by passing a JSON string with configuration:

```
use AppStoreReviewsParser\AppStoreReviewsParser;

$jsonConfig = '{
    "app_id": "123456789",
    "country": "us",
    "page": 1,
    "sort_by": "mostrecent",
    "timeout": 30
}';

try {
    $parser = AppStoreReviewsParser::createFromJson($jsonConfig);
    $result = $parser->fetch();

    if ($result['success']) {
        print_r($result['data']);
    } else {
        echo "Error: " . $result['error'];
    }
} catch (Exception $e) {
    echo "Exception: " . $e->getMessage();
}
```

See `examples/examples.php` for more usage examples.

### Available Configuration Options

[](#available-configuration-options)

- `app_id`: Apple App Store ID (required unless using app\_url with parse\_from\_url)
- `app_url`: App Store URL to parse App ID from
- `parse_from_url`: Whether to parse App ID from app\_url (default: false). When true, app\_id can be omitted
- `country`: Two-letter country code (default: "us")
- `page`: Page number 1-10 (default: 1)
- `sort_by`: "mostrecent" or "mosthelpful" (default: "mostrecent")
- `timeout`: Request timeout in seconds (default: 30)
- `user_agent`: Custom user agent string

### Response Format

[](#response-format)

The parser returns a JSON object with the following structure:

```
{
  "success": true,
  "data": [
    {
      "id": "1234567890",
      "title": "Great app!",
      "content": "I really love using this app. It helps me a lot.",
      "rating": 5,
      "author": "John Doe",
      "version": "1.2.3",
      "vote_count": 42,
      "vote_sum": 168,
      "country": "us",
      "date": "2024-01-15T10:30:00+00:00"
    }
  ],
  "meta": {
    "app_id": "123456789",
    "country": "us",
    "page": 1,
    "total_pages": 10,
    "total_reviews": 50,
    "sort_by": "mostrecent"
  },
  "error": null
}
```

#### Response Fields

[](#response-fields)

- `success` (boolean): Indicates whether the request was successful
- `data` (array): Array of review objects, each containing:
    - `id` (string): Unique review identifier
    - `title` (string): Review title
    - `content` (string): Review text content
    - `rating` (integer): Star rating (1-5)
    - `author` (string): Name of the reviewer
    - `version` (string): App version the review was written for
    - `vote_count` (integer): Number of votes the review received
    - `vote_sum` (integer): Sum of all vote scores
    - `country` (string): Country code of the App Store
    - `date` (string): ISO 8601 formatted date of the review
- `meta` (object): Metadata about the request (only present on success):
    - `app_id` (string): App Store ID
    - `country` (string): Country code used
    - `page` (integer): Current page number
    - `total_pages` (integer): Total available pages (max 10)
    - `total_reviews` (integer): Number of reviews returned
    - `sort_by` (string): Sort order used
- `error` (string|null): Error message if the request failed, null otherwise

###  Health Score

36

—

LowBetter than 82% of packages

Maintenance88

Actively maintained with recent releases

Popularity4

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity40

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

61d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/78e0b55522160e51253345a93289ac5532cbe3bd355d3951fefbd46f3252472f?d=identicon)[fitz0z](/maintainers/fitz0z)

---

Top Contributors

[![fitz0z](https://avatars.githubusercontent.com/u/5361648?v=4)](https://github.com/fitz0z "fitz0z (9 commits)")

---

Tags

parserrssitunesreviewsappstore

### Embed Badge

![Health badge](/badges/appstore-reviews-parser-parser/health.svg)

```
[![Health](https://phpackages.com/badges/appstore-reviews-parser-parser/health.svg)](https://phpackages.com/packages/appstore-reviews-parser-parser)
```

###  Alternatives

[nikic/php-parser

A PHP parser written in PHP

17.4k902.6M1.8k](/packages/nikic-php-parser)[doctrine/lexer

PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.

11.2k910.8M118](/packages/doctrine-lexer)[erusev/parsedown

Parser for Markdown.

15.0k151.8M727](/packages/erusev-parsedown)[league/commonmark

Highly-extensible PHP Markdown parser which fully supports the CommonMark spec and GitHub-Flavored Markdown (GFM)

2.9k404.0M700](/packages/league-commonmark)[masterminds/html5

An HTML5 parser and serializer.

1.8k242.8M226](/packages/masterminds-html5)[sabberworm/php-css-parser

Parser for CSS Files written in PHP

1.8k191.2M63](/packages/sabberworm-php-css-parser)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
