> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stophy.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# App Store top

> Read an App Store top charts page as JSON with the appstore-top parser. $0.001 per 10 apps. Send the page to scrape. Examples in cURL, TypeScript and Python.

Reads an App Store top charts page, like apps.apple.com/us/iphone/charts, and returns a list of products as JSON.

## Make a request

Send the page's URL to [scrape](https://docs.stophy.dev/api-reference/endpoint/scrape.md) with a `json` format that names the parser. Get an API key in the [Quickstart](https://docs.stophy.dev/quickstart).

```bash cURL theme={null}
curl -X POST https://api.stophy.dev/v1/scrape \
  -H "Authorization: Bearer $STOPHY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://apps.apple.com/us/iphone/charts/6002?chart=top-paid","formats":[{"type":"json","parser":"appstore-top"}]}'
```

```typescript TypeScript theme={null}
const response = await fetch("https://api.stophy.dev/v1/scrape", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.STOPHY_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    url: "https://apps.apple.com/us/iphone/charts/6002?chart=top-paid",
    formats: [{ type: "json", parser: "appstore-top" }],
  }),
});
console.log(await response.json());
```

```python Python theme={null}
import os

import requests

response = requests.post(
    "https://api.stophy.dev/v1/scrape",
    headers={"Authorization": f"Bearer {os.environ['STOPHY_API_KEY']}"},
    json={
        "url": "https://apps.apple.com/us/iphone/charts/6002?chart=top-paid",
        "formats": [{"type": "json", "parser": "appstore-top"}],
    },
)
print(response.json())
```

## Read the response

The parser's data is in `data.json`. Its fields include `results`, `cursor`, `page` and `total`. This sample is cut to the first items.

```json theme={null}
{
  "success": true,
  "data": {
    "json": {
      "results": [
        {
          "id": "932747118",
          "url": "https://apps.apple.com/us/app/shadowrocket/id932747118",
          "title": "Shadowrocket",
          "brand": "Shadow Launch Technology Limited",
          "description": "Rule based proxy utility client for iPhone/iPad.\n\n- Capture all HTTP/HTTPS/TCP traffic from any applications on your…",
          "price": {
            "amount": 2.99,
            "currency": "USD"
          },
          "originalPrice": null,
          "rating": null,
          "reviewCount": null,
          "availability": null,
          "images": [
            "https://is1-ssl.mzstatic.com/image/thumb/Purple221/v4/4f/4c/02/4f4c0272-2fe6-777f-be0e-f4fe43c30ce4/AppIcon-0-0-1x_U007…"
          ],
          "categories": [
            "Utilities"
          ],
          "seller": {
            "id": "0",
            "name": "Example user",
            "handle": null,
            "url": "https://example.com/example_user",
            "avatarUrl": null
          },
          "rank": 1,
          "bundleId": "com.liguangming.Shadowrocket",
          "genreId": "6002",
          "releasedAt": "2015-04-14T02:09:18.000Z",
          "iconUrl": "https://is1-ssl.mzstatic.com/image/thumb/Purple221/v4/4f/4c/02/4f4c0272-2fe6-777f-be0e-f4fe43c30ce4/AppIcon-0-0-1x_U007…"
        }
      ],
      "cursor": null,
      "page": null,
      "total": null
    }
  }
}
```

## Options

Send options in the `options` object of the `json` format.

| Option | What it does |
| - | - |
| `limit` | Return at most this many apps. You pay \$0.001 for each 10 returned. |

## Price

\$0.001 per 10 apps. See [Pricing](https://docs.stophy.dev/account/pricing.md).

## Limits and errors

* The URL must be an App Store top charts page, like apps.apple.com/us/iphone/charts. Any other URL fails with `invalidRequest`.
* The answer comes back in `data.json`. If the page cannot be read, the call fails with an error code from [Errors](https://docs.stophy.dev/api-reference/errors.md).

## Related

* [Pre-built parsers](https://docs.stophy.dev/scrape/prebuilt-parsers) lists every parser.
* [Scrape](https://docs.stophy.dev/scrape/overview) has the options every scrape takes.
* [App Store search](https://docs.stophy.dev/scrape/prebuilt-parsers/apps/appstore-search.md)
* [App Store app](https://docs.stophy.dev/scrape/prebuilt-parsers/apps/appstore-app.md)
* [App Store reviews](https://docs.stophy.dev/scrape/prebuilt-parsers/apps/appstore-reviews.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.