# Google Play Chart History — Rank Movement & Entries/Exits (`ghostlabpk/google-play-chart-history`) Actor

Historical Google Play top-chart rankings for Pakistan, India & UAE — track app rank movement, new entries, and exits over time. Built for competitor tracking, ASO research, and regional market intelligence. Facts only: no reviews, no personal data, updated nightly.

- **URL**: https://apify.com/ghostlabpk/google-play-chart-history.md
- **Developed by:** [Behram Khan](https://apify.com/ghostlabpk) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.05 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Google Play Chart History — Rank Movement & Entries/Exits

Historical Google Play top-chart rankings for Pakistan, India, UAE and other
regional markets — track how an app rank has moved over time, when it
entered or dropped off a chart, and how long it has held a position.

### What this answers that a live chart cannot

A live chart tells you what is ranked today. It cannot tell you whether an
app climbed there over three weeks or landed at #1 overnight — that
question needs a record of the past, which no live fetch can produce. This
Actor reads from a nightly-growing historical archive and derives rank
movement, new entries, exits and day-count directly from it.

### What you get

One row per app, per country, per date it appeared on the chart:

| Field | Description |
|---|---|
| `package_id` | Google Play package ID |
| `title` | App name |
| `country` | ISO country code |
| `category` | Play category |
| `date` | Date this rank was observed |
| `rank` | Chart position on that date |
| `rank_delta_1d` | Change vs. the previous day (positive = moved up) |
| `rank_delta_7d` | Change vs. 7 days earlier |
| `days_on_chart` | Number of archive dates this app has appeared |
| `first_seen` / `last_seen` | First and most recent dates observed |
| `is_new_entry` | True if this is the app first appearance |
| `is_exit` | True if the app dropped off the chart after this date |
| `coverage_missing_days` | Archive gap-days between first\_seen and this row — see below |

### Coverage, honestly

The archive grows nightly and its real coverage window — first date, last
date, any gaps — is measured fresh on every run, never assumed. If you ask
for a date range the archive does not actually cover, the run fails with
the real window in the error message rather than quietly giving you less
than you asked for. When a gap does fall between two rows,
coverage\_missing\_days says so, and the surrounding rank-deltas and
day-counts should be read as a floor, not an exact count, for that
stretch — a snapshot-based archive cannot backfill a night it did not run.

### Input options

- Countries — same regional coverage as the live charts Actor.
- Categories — overall chart by default, or specific Play categories.
- Package IDs (optional) — restrict to specific apps; leave empty to
  get every app that appeared in the requested countries and categories.
- Start / end date (optional) — defaults to the archive full available
  range.

### What is excluded

No developer name, review text, icons or screenshots — facts about chart
position only.

# Actor input Schema

## `countries` (type: `array`):

ISO country codes to pull history for. Must be within the archive's actual coverage — see the Actor's run log for the measured window on each build.

## `categories` (type: `array`):

Play categories to pull history for. Leave empty for OVERALL only. Same supported list as the live charts Actor.

## `packageIds` (type: `array`):

Restrict to specific apps by package ID. Leave empty to return every app that appeared in the requested countries/categories/date range.

## `startDate` (type: `string`):

Defaults to the earliest date the archive actually holds. A date before the archive's real coverage fails the run with the actual coverage window in the error message, rather than silently returning a shorter range.

## `endDate` (type: `string`):

Defaults to the latest date the archive actually holds.

## Actor input object example

```json
{
  "countries": [
    "PK",
    "IN",
    "AE"
  ],
  "categories": [
    "OVERALL"
  ],
  "packageIds": []
}
```

# Actor output Schema

## `chartHistory` (type: `string`):

Rank-history rows with entries, exits and 1d/7d rank deltas per app/country/category/date.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "countries": [
        "PK",
        "IN",
        "AE"
    ],
    "categories": [
        "OVERALL"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("ghostlabpk/google-play-chart-history").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "countries": [
        "PK",
        "IN",
        "AE",
    ],
    "categories": ["OVERALL"],
}

# Run the Actor and wait for it to finish
run = client.actor("ghostlabpk/google-play-chart-history").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "countries": [
    "PK",
    "IN",
    "AE"
  ],
  "categories": [
    "OVERALL"
  ]
}' |
apify call ghostlabpk/google-play-chart-history --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,ghostlabpk/google-play-chart-history"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/l1IIa3iKBALWDX3Z4/builds/IudQ99GaO3KgJnIgI/openapi.json
