> For the complete documentation index, see [llms.txt](https://docs.pullbay.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.pullbay.com/documentation/guides/how-to-guides-for-app-store/how-to-export-app-store-reviews.md).

# How to Export App Store Reviews

Exporting your app store reviews to CSV is one of the fastest ways to analyze user feedback, share insights with your team, and integrate review data into business intelligence tools. If you're managing an iOS app, you know that reviews are scattered across the App Store—pulling them all together takes work. This guide shows you how to **export app store reviews to CSV** using the Pullbay App Store Reviews API in just a few minutes.

## Why Export App Store Reviews?

Before we dive into the how-to, here's why this matters:

* **Team collaboration**: CSV files are easy to share with product, marketing, and support teams
* **Offline analysis**: Process reviews in Excel, Google Sheets, or any BI tool without API calls
* **Data preservation**: Keep a historical record of reviews for trend analysis and compliance
* **Bulk operations**: Filter, sort, and segment reviews by rating, date, country, or version
* **Integration**: Feed review data into your analytics pipeline or CRM

Now let's get into the step-by-step process.

{% stepper %}
{% step %}

### Get Your API Key

1. Log in to your [Pullbay dashboard](https://dashboard.pullbay.com/)
2. Navigate to **API Keys** in the sidebar
3. Copy your API key (starts with `live_` for production or `test_` for testing)
4. Keep this key secure—treat it like a password
   {% endstep %}

{% step %}

### Find Your App's App ID

Your App ID is a unique number that identifies your app on the App Store. To find it:

1. Open your app's App Store link: `https://apps.apple.com/us/app/my-app/id123456789`
2. Extract the number after `/id`—in this example, it's **123456789**
3. This is your `APP_ID` for API calls
   {% endstep %}

{% step %}

### Call the Managed Reviews Endpoint

The Pullbay `/v1/app-store/reviews/all` endpoint fetches **all reviews automatically**, handling pagination behind the scenes. This is much simpler than manual pagination.

```python
import requests
import csv
from datetime import datetime

# Configuration
API_KEY = "live_your_api_key_here"
APP_ID = "123456789"  # Replace with your app ID
BASE_URL = "https://api.pullbay.com/v1"

# Call the managed endpoint (fetches all pages automatically)
response = requests.get(
    f"{BASE_URL}/app-store/reviews/all",
    params={"app_id": APP_ID},
    headers={"Authorization": f"Bearer {API_KEY}"}
)

if response.status_code == 200:
    data = response.json()
    reviews = data.get("data", [])
    print(f"Fetched {len(reviews)} reviews")
else:
    print(f"Error: {response.status_code} - {response.text}")
```

{% endstep %}

{% step %}

### Write Reviews to CSV

Once you have the review data, writing to CSV is straightforward using Python's built-in `csv` module.

#### Full Python Script: Export Reviews to CSV

Here's a complete, production-ready script that fetches all reviews and exports them to a CSV file:

```python
import requests
import csv
from datetime import datetime

API_KEY = "live_your_api_key_here"
APP_ID = "123456789"  # Replace with your app ID
BASE_URL = "https://api.pullbay.com/v1"
OUTPUT_FILE = "reviews.csv"

def export_reviews_to_csv():
    """Fetch all app store reviews and export to CSV."""

    print(f"Fetching reviews for app {APP_ID}...")

    # Fetch all reviews
    response = requests.get(
        f"{BASE_URL}/app-store/reviews/all",
        params={"app_id": APP_ID},
        headers={"Authorization": f"Bearer {API_KEY}"}
    )

    if response.status_code != 200:
        print(f"Error: {response.status_code} - {response.text}")
        return

    data = response.json()
    reviews = data.get("data", [])
    meta = data.get("meta", {})

    if not reviews:
        print(f"No reviews found for app {APP_ID}")
        return

    # Write to CSV
    with open(OUTPUT_FILE, "w", newline="", encoding="utf-8") as csvfile:
        fieldnames = ["date", "rating", "title", "content", "author", "version", "helpful_count"]
        writer = csv.DictWriter(csvfile, fieldnames=fieldnames)

        writer.writeheader()
        for review in reviews:
            writer.writerow({
                "date": review.get("date", ""),
                "rating": review.get("rating", ""),
                "title": review.get("title", ""),
                "content": review.get("content", ""),
                "author": review.get("author", ""),
                "version": review.get("version", ""),
                "helpful_count": review.get("helpful_count", 0)
            })

    print(f"✓ Exported {len(reviews)} reviews to {OUTPUT_FILE}")
    print(f"Credits used: {meta.get('credits_used', 'N/A')}")

if __name__ == "__main__":
    export_reviews_to_csv()
```

**Running the script:**

```bash
python export_reviews.py
```

This generates `reviews.csv` with columns: date, rating, title, content, author, version, helpful\_count.
{% endstep %}
{% endstepper %}

## Optional: Filter Reviews Before Export

You might want to export only a subset of reviews—for example, only 1-2 star reviews or reviews from the last 90 days.

```python
from datetime import datetime, timedelta

def export_reviews_filtered():
    """Export only recent 1-2 star reviews."""

    response = requests.get(
        f"{BASE_URL}/app-store/reviews/all",
        params={"app_id": APP_ID},
        headers={"Authorization": f"Bearer {API_KEY}"}
    )

    if response.status_code != 200:
        print(f"Error: {response.status_code}")
        return

    reviews = response.json().get("data", [])

    # Filter for low ratings and recent dates
    cutoff_date = datetime.now() - timedelta(days=90)
    filtered = [
        r for r in reviews
        if r.get("rating", 5) <= 2 and
           datetime.fromisoformat(r.get("date", "")) > cutoff_date
    ]

    # Write filtered reviews
    with open("negative_reviews.csv", "w", newline="", encoding="utf-8") as f:
        fieldnames = ["date", "rating", "title", "content", "author", "version"]
        writer = csv.DictWriter(f, fieldnames=fieldnames)
        writer.writeheader()
        for review in filtered:
            writer.writerow({
                "date": review.get("date", ""),
                "rating": review.get("rating", ""),
                "title": review.get("title", ""),
                "content": review.get("content", ""),
                "author": review.get("author", ""),
                "version": review.get("version", "")
            })

    print(f"Exported {len(filtered)} negative reviews to negative_reviews.csv")

if __name__ == "__main__":
    export_reviews_filtered()
```

## Troubleshooting Tips

| Issue                   | Cause                             | Solution                                                                                         |
| ----------------------- | --------------------------------- | ------------------------------------------------------------------------------------------------ |
| **401 Unauthorized**    | Invalid or missing API key        | Check your API key in the dashboard; ensure it's in the `Authorization: Bearer` header           |
| **404 Not Found**       | Incorrect app ID                  | Verify the app ID from your App Store URL (the number after `/id`)                               |
| **Empty results**       | No reviews for that app or region | The app may not have any reviews; try a different app ID or check in the App Store directly      |
| **Rate limit exceeded** | Too many requests                 | Check your plan's request limit; see the dashboard for current rate limits                       |
| **CSV encoding issues** | Special characters in reviews     | The script uses UTF-8 encoding; if you see garbled text, open the file in a Unicode-aware editor |

## Next Steps

* **Explore rate limits**: Check the dashboard for your current plan's request limits (Free: 10 req/min, Starter: 60 req/min, Growth: 300 req/min, Scale: 1000+ req/min)
* **Schedule exports**: Use cron jobs or cloud tasks to export reviews on a regular schedule
* **Automate reporting**: Feed CSV data into your BI tool or email reports to stakeholders

By exporting your reviews regularly, you can keep a complete audit trail and spot trends that the App Store dashboard might miss.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.pullbay.com/documentation/guides/how-to-guides-for-app-store/how-to-export-app-store-reviews.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
