Skip to main content
Glama

gp_list

Retrieve Google Play Store app rankings for top free, paid, grossing, and trending apps by category and country.

Instructions

[Google Play] Get app rankings (top free, paid, grossing)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
collectionNoCollection type: topselling_free, topselling_paid, topgrossing, movers_shakerstopselling_free
categoryNoCategory ID (default: APPLICATION)APPLICATION
countryNoTwo-letter country code (default: us)us
langNoLanguage code (default: en)en
numNoNumber of results (default: 60)

Implementation Reference

  • The main handler function for the 'gp_list' tool. It extracts parameters from args, constructs the Google Play list URL, fetches the HTML, parses it using parseGPList, and returns the list of apps in JSON format.
    async function handleGPList(args) { try { const { collection = 'topselling_free', category = 'APPLICATION', country = 'us', lang = 'en', num = 60, } = args; const url = buildGPListUrl({ collection, category, country, lang, num }); const html = await fetchText(url); const apps = parseGPList(html); return { content: [ { type: 'text', text: JSON.stringify({ collection, category, country, results: apps, count: apps.length, }, null, 2), }, ], }; } catch (error) { return { content: [ { type: 'text', text: JSON.stringify({ error: error.message }, null, 2), }, ], isError: true, }; } }
  • The input schema for the 'gp_list' tool, defining parameters such as collection, category, country, lang, and num with their types, descriptions, defaults, and enums.
    { name: 'gp_list', description: '[Google Play] Get app rankings (top free, paid, grossing)', inputSchema: { type: 'object', properties: { collection: { type: 'string', description: 'Collection type: topselling_free, topselling_paid, topgrossing, movers_shakers', default: 'topselling_free', enum: ['topselling_free', 'topselling_paid', 'topgrossing', 'movers_shakers'], }, category: { type: 'string', description: 'Category ID (default: APPLICATION)', default: 'APPLICATION', }, country: { type: 'string', description: 'Two-letter country code (default: us)', default: 'us', }, lang: { type: 'string', description: 'Language code (default: en)', default: 'en', }, num: { type: 'number', description: 'Number of results (default: 60)', default: 60, }, }, }, },
  • Registration in the tool dispatch switch statement: routes calls to 'gp_list' to the handleGPList function.
    case 'gp_list': return await handleGPList(args);
  • Helper parser function parseList (imported as parseGPList) that extracts app data from Google Play list page HTML by reusing the search parser.
    export function parseList(html) { // List pages use similar structure to search results return parseSearch(html); }
  • Helper function buildListUrl (imported as buildGPListUrl) that constructs the Google Play list/ranking URL based on parameters.
    export function buildListUrl(params) {

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/MiguelAlvRed/mobile-store-scraper-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server