Skip to contents

Using Apple's RSS feed, extract the most recent or helpful reviews for a specific application.

Usage

get_apple_reviews(
  id,
  country = "us",
  all_results = FALSE,
  page_no = 1,
  sort_by = c("mostrecent", "mosthelpful")
)

Arguments

id

The ID of the App on the Apple App Store. Either found by using search_apple, or available in the URL of the app to pull reviews from. For example, GitHub's App ID is 1477376903, as seen in its URL: https://apps.apple.com/gb/app/id1477376905

country

The two-letter country code for the store you want to search. For a list of country codes see https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2

all_results

Logical, would you like all possible reviews to be pulled? By default set to FALSE

page_no

If page_no = FALSE then the page of reviews to pull. Defaults to most recent.

sort_by

Which order should the reviews be pulled? There are currently two possible options:

"mostrecent"

Sorts by the time reviews are posted and pulls the most recently posted reviews

"mosthelpful"

Sorts the reviews by usefulness and returns the most useful posts. For larger apps, the top 500 may not match the top 500 most recent

Value

A data.frame of the extracted reviews, containing:

  • idThe review ID

  • review_timeThe time the review was posted on the App Store

  • authorThe username of the reviewer

  • app_versionThe version of the application that was installed when reviewing the application

  • titleTitle summary of the review

  • ratingThe rating (out of 5) given to the application

  • reviewThe text of the review

If there were no reviews then it will return NULL.

Details

There is a limitation in Apple's RSS feed that means only the 500 most recent/helpful reviews can be pulled. There are 10 pages of results from the RSS feed, each one containing 50 reviews. It is recommended to periodically store reviews in a database or other storage system to track the older reviews.

Examples

if (FALSE) { # interactive()
# Search for GitHub in App Store in the UK
country_id <- "gb"
github_search_results <- search_apple(
  term = "GitHub",
  country = country_id,
  media = "software"
)

# Look up reviews for GitHub
# (App ID found in trackId column of github_search_results)
get_apple_reviews(1477376905, country_id)
}