Title: | 'Apple App Store' and 'iTunes' Data Extraction |
---|---|
Description: | Using 'Apple App Store' <https://www.apple.com/app-store/> web scraping and 'iTunes' API <https://performance-partners.apple.com/search-api> to extract content information, app ratings and reviews. |
Authors: | Ashley Baldry [aut, cre] |
Maintainer: | Ashley Baldry <[email protected]> |
License: | GPL-2 |
Version: | 0.2.1 |
Built: | 2025-02-01 02:56:42 UTC |
Source: | https://github.com/ashbaldry/appler |
A dataset containing a selection of apps available on the Apple App Store with a corresponding ID that can be used in appler functions.
To see more information about the application online, you can add the following URL in your browser: apps.apple.com/app/id<id> where <id> is the 'app_id' column
apple_apps
apple_apps
A data frame with 2 columns and 202 rows
Application name
Apple ID of the application
All of the applications in this table are available in Canada ('country_id = "ca"') at the time of writing (2022-12-03), however they might not be available in all countries, or have a different application name.
<https://apps.apple.com>
# Get information about Microsoft Teams teams <- apple_apps[apple_apps$app_name == "Microsoft Teams", "app_id"] # Search for any other apps search_apple(term = "Microsoft Teams", country = "ca", media = "software") # General application information including average rating lookup_apple(teams, country = "ca") # Latest application reviews get_apple_reviews(teams, country = "ca") # Current position on App store get_apple_chart_postion(teams, country = "ca")
# Get information about Microsoft Teams teams <- apple_apps[apple_apps$app_name == "Microsoft Teams", "app_id"] # Search for any other apps search_apple(term = "Microsoft Teams", country = "ca", media = "software") # General application information including average rating lookup_apple(teams, country = "ca") # Latest application reviews get_apple_reviews(teams, country = "ca") # Current position on App store get_apple_chart_postion(teams, country = "ca")
Search for whether an application is currently in the top 100 apps of any category on the Apple App Store.
get_apple_chart_postion(id, country)
get_apple_chart_postion(id, country)
id |
The ID of the App on the Apple App Store. Either found by using |
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 |
A list of two, containing the 'position' and the 'category' of the app if available.
If the application is not in the charts then both fields will return as NA
# 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 chart position for GitHub in the UK # (App ID found in trackId column of github_search_results) get_apple_chart_postion(1477376905, "gb")
# 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 chart position for GitHub in the UK # (App ID found in trackId column of github_search_results) get_apple_chart_postion(1477376905, "gb")
Scrapes the App store page and retrieves the split of the ratings between 1 and 5 stars
get_apple_rating_split(id, country = "us")
get_apple_rating_split(id, country = "us")
id |
The ID of the App on the Apple App Store |
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 |
For overall rating and count, use lookup_apple
A 5 row data.frame with the split of 1-5 stars given rounded to the nearest percent
# 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 app store rating split for GitHub in the UK # (App ID found in trackId column of github_search_results) get_apple_rating_split(1477376905, country_id)
# 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 app store rating split for GitHub in the UK # (App ID found in trackId column of github_search_results) get_apple_rating_split(1477376905, country_id)
Using Apple's RSS feed, extract the most recent or helpful reviews for a specific application.
get_apple_reviews( id, country = "us", all_results = FALSE, page_no = 1, sort_by = c("mostrecent", "mosthelpful") )
get_apple_reviews( id, country = "us", all_results = FALSE, page_no = 1, sort_by = c("mostrecent", "mosthelpful") )
id |
The ID of the App on the Apple App Store. Either found by using |
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
|
page_no |
If |
sort_by |
Which order should the reviews be pulled? There are currently two possible options:
|
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.
A data.frame
of the extracted reviews, containing:
id
The review ID
review_time
The time the review was posted on the App Store
author
The username of the reviewer
app_version
The version of the application that was installed when reviewing the application
title
Title summary of the review
rating
The rating (out of 5) given to the application
review
The text of the review
If there were no reviews then it will return NULL
.
# 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)
# 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)
A small dataset containing current artists available on iTunes with a corresponding ID that can be used in appler functions.
To see more information about the artist online, you can add the following URL in your browser: music.apple.com/artist/<id> where <id> is the 'artist_id' column
itunes_artists
itunes_artists
A data frame with 2 columns and 10 rows
Artist name
Apple ID of the artist
<https://music.apple.com>
# Get information about Microsoft Teams lizzo <- itunes_artists[itunes_artists$artist == "Lizzo", ] lizzo_id <- lizzo$artist_id lizzo_name <- lizzo$artist # Search for artist by name, can find the ID from this query search_apple(term = lizzo_name, country = "ca", lang = "en") # Get information about the artist lookup_apple(id = lizzo_id, country = "ca", sort = "recent")
# Get information about Microsoft Teams lizzo <- itunes_artists[itunes_artists$artist == "Lizzo", ] lizzo_id <- lizzo$artist_id lizzo_name <- lizzo$artist # Search for artist by name, can find the ID from this query search_apple(term = lizzo_name, country = "ca", lang = "en") # Get information about the artist lookup_apple(id = lizzo_id, country = "ca", sort = "recent")
You can create a lookup request to search for content in the stores based on iTunes IDs, UPCs/EANs, and All Music Guide (AMG) IDs. ID-based lookups are faster and contain fewer false-positive results.
lookup_apple( id, country = NULL, entity = NULL, limit = NULL, sort = NULL, id_type = "id" )
lookup_apple( id, country = NULL, entity = NULL, limit = NULL, sort = NULL, id_type = "id" )
id |
The ID of the iTunes entity |
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 |
entity |
|
limit |
|
sort |
|
id_type |
The ID type to lookup, options are:
|
A data.frame
of any results that match the iTunes database.
If there were no successful results then it will return NULL
.
https://performance-partners.apple.com/search-api
# Search for all Jack Johnson audio and video content search_apple(term = "Jack Johnson") # Look up Jack Johnson by iTunes artist ID lookup_apple(909253) # Look up Jack Johnson by AMG artist ID lookup_apple(468749, id_type = "amgArtistId")
# Search for all Jack Johnson audio and video content search_apple(term = "Jack Johnson") # Look up Jack Johnson by iTunes artist ID lookup_apple(909253) # Look up Jack Johnson by AMG artist ID lookup_apple(468749, id_type = "amgArtistId")
Using Apple's iTunes API, will find any content available from Apple based on a given search term.
search_apple( term, country = NULL, media = NULL, entity = NULL, attribute = NULL, limit = NULL, lang = c("en_us", "ja_jp"), explicit = c("Yes", "No") )
search_apple( term, country = NULL, media = NULL, entity = NULL, attribute = NULL, limit = NULL, lang = c("en_us", "ja_jp"), explicit = c("Yes", "No") )
term |
The URL-encoded text string you want to search for. For example: |
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 |
media |
|
entity |
|
attribute |
|
limit |
|
lang |
|
explicit |
|
A data.frame
of any results that match the iTunes database.
If there were no successful results then it will return NULL
.
https://performance-partners.apple.com/search-api
# Search for all Jack Johnson audio and video content search_apple(term = "jack johnson") # To search for all Jack Johnson audio and video content and return only the first 25 items search_apple(term = "jack johnson", limit = 25)
# Search for all Jack Johnson audio and video content search_apple(term = "jack johnson") # To search for all Jack Johnson audio and video content and return only the first 25 items search_apple(term = "jack johnson", limit = 25)