google-play-reviews
Retrieve user reviews for Google Play apps to analyze feedback, track ratings, and understand customer sentiment for market research and competitor analysis.
Instructions
Get reviews for a Google Play app. Returns an array of reviews with:
id: Review ID string
userName: Reviewer's name
userImage: Reviewer's profile image URL
date: Review date (ISO string)
score: Rating (1-5)
scoreText: Rating display text
title: Review title
text: Review content
url: Review URL
version: App version reviewed
thumbsUp: Number of thumbs up votes
replyDate: Developer reply date (if any)
replyText: Developer reply content (if any)
criterias: Array of rating criteria (if any)
Note: Reviews are returned in the specified language. The total review count shown in Google Play refers to ratings, not written reviews.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| appId | Yes | Package name of the app (e.g., 'com.mojang.minecraftpe') | |
| lang | No | Language code for reviews (default: en) | en |
| country | No | Country code (default: us) | us |
| sort | No | Sort order: newest, rating, or helpfulness (default: newest) | newest |
| num | No | Number of reviews to retrieve (default: 100). Ignored if paginate is true. | |
| paginate | No | Enable pagination with 150 reviews per page | |
| nextPaginationToken | No | Token for fetching next page of reviews |
Implementation Reference
- src/server.js:507-533 (handler)The handler function that executes the tool logic: fetches Google Play app reviews using the gplay.reviews method with provided parameters, maps sort order, handles pagination, and returns a JSON-formatted response containing the reviews data and next page token.async ({ appId, lang, country, sort, num, paginate, nextPaginationToken }) => { const sortMap = { newest: gplay.sort.NEWEST, rating: gplay.sort.RATING, helpfulness: gplay.sort.HELPFULNESS }; const reviews = await gplay.reviews({ appId, lang, country, sort: sortMap[sort], num, paginate, nextPaginationToken }); return { content: [{ type: "text", text: JSON.stringify({ reviews: reviews.data, nextPage: reviews.nextPaginationToken }) }] }; }
- src/server.js:497-506 (schema)Zod schema defining the input parameters for the tool, including appId (required), lang, country, sort order, number of reviews, pagination flag, and pagination token.{ appId: z.string().describe("Package name of the app (e.g., 'com.mojang.minecraftpe')"), lang: z.string().default("en").describe("Language code for reviews (default: en)"), country: z.string().default("us").describe("Country code (default: us)"), sort: z.enum(["newest", "rating", "helpfulness"]).default("newest") .describe("Sort order: newest, rating, or helpfulness (default: newest)"), num: z.number().default(100).describe("Number of reviews to retrieve (default: 100). Ignored if paginate is true."), paginate: z.boolean().default(false).describe("Enable pagination with 150 reviews per page"), nextPaginationToken: z.string().optional().describe("Token for fetching next page of reviews") },
- src/server.js:479-534 (registration)Registration of the 'google-play-reviews' tool via server.tool(), including the tool description, input schema, and inline handler function.server.tool("google-play-reviews", "Get reviews for a Google Play app. Returns an array of reviews with:\n" + "- id: Review ID string\n" + "- userName: Reviewer's name\n" + "- userImage: Reviewer's profile image URL\n" + "- date: Review date (ISO string)\n" + "- score: Rating (1-5)\n" + "- scoreText: Rating display text\n" + "- title: Review title\n" + "- text: Review content\n" + "- url: Review URL\n" + "- version: App version reviewed\n" + "- thumbsUp: Number of thumbs up votes\n" + "- replyDate: Developer reply date (if any)\n" + "- replyText: Developer reply content (if any)\n" + "- criterias: Array of rating criteria (if any)\n" + "\nNote: Reviews are returned in the specified language. The total review count\n" + "shown in Google Play refers to ratings, not written reviews.", { appId: z.string().describe("Package name of the app (e.g., 'com.mojang.minecraftpe')"), lang: z.string().default("en").describe("Language code for reviews (default: en)"), country: z.string().default("us").describe("Country code (default: us)"), sort: z.enum(["newest", "rating", "helpfulness"]).default("newest") .describe("Sort order: newest, rating, or helpfulness (default: newest)"), num: z.number().default(100).describe("Number of reviews to retrieve (default: 100). Ignored if paginate is true."), paginate: z.boolean().default(false).describe("Enable pagination with 150 reviews per page"), nextPaginationToken: z.string().optional().describe("Token for fetching next page of reviews") }, async ({ appId, lang, country, sort, num, paginate, nextPaginationToken }) => { const sortMap = { newest: gplay.sort.NEWEST, rating: gplay.sort.RATING, helpfulness: gplay.sort.HELPFULNESS }; const reviews = await gplay.reviews({ appId, lang, country, sort: sortMap[sort], num, paginate, nextPaginationToken }); return { content: [{ type: "text", text: JSON.stringify({ reviews: reviews.data, nextPage: reviews.nextPaginationToken }) }] }; } );