mcpField
A
App Store Trends API

App Store Trends API

リモート
trendsapi.aiデータ・分析010 週間前に更新
リポジトリ公式サイト

App Store Trends API について

App Store Trends APIは、Python、JavaScript、HTTP経由でAndroidアプリのダウンロード履歴と、iOSおよびGoogle Playのライブランキングを提供します。アプリ需要の分析向けで、履歴データとライブランキングは別々に取得できます。

主な機能

  1. 01アプリダウンロード時系列の取得
  2. 02期間別の成長率測定
  3. 03ライブApp Storeランキングの取得
  4. 04ライブGoogle Playランキングの取得
  5. 05非同期Pythonクライアント
  6. 06HTTP API経由のアクセス

活用シーン

  1. 01bundle IDによるAndroidダウンロード数の追跡
  2. 02期間ごとのアプリダウンロード成長率の比較
  3. 03現在のiOSランキングの確認
  4. 04Google Playランキング位置の確認

設定

リモートサーバーはインストール不要です。クライアントを選んで設定をコピーするか、ワンクリックで導入できます。

エンドポイントhttps://app-store.api.trendsapi.ai/mcp
インストールコマンドをコピー
Claude CodeTerminal
Cursor.cursor/mcp.json
VS Code.vscode/mcp.json
Claude Desktopclaude_desktop_config.json
Windsurf~/.codeium/windsurf/mcp_config.json

コマンドはターミナルで実行し、JSON は各クライアントの MCP 設定に貼り付けて再起動します。認可が必要なサーバーは初回接続時にログインを求めます。

すべてのエンドポイント
Streamable HTTPhttps://app-store.api.trendsapi.ai/mcp認証が必要

ツール

詳細

App Store と Google Play のチャート API

Trends API による App Store と Google Play の需要データです。Android のダウンロード履歴に加え、iOS と Play のリアルタイムランキングを取得できます。

License: MIT PyPI Python

API キー:trendsapi.ai/#get-key。HTTP の仕様とすべてのデータソース:trendsapi-ai/trendsapi。

認証

pip install trendsapi-app-store
export TRENDSAPI_KEY=your_key

Python 3.9 以降に対応しています。HTTP API と同じキーを使用します。

from trendsapi_app_store import TrendsAPI

client = TrendsAPI()                    # TRENDSAPI_KEY
# client = TrendsAPI(api_key="YOUR_KEY")

キーワード用ヘルパーの既定の source は "app downloads" です。source= を渡すと、同じクライアントでほかのプラットフォームを指定できます。すべてのソースに対応した公式フルクライアント(プリセットなし):trendsapi。

メソッド

メソッドREST の mode戻り値
get_time_series(keyword, source=, data_mode=)get_time_serieslist[TrendsDataPoint]
get_growth(keyword, percent_growth=, source=, data_mode=)get_growthGetGrowthResponse
get_live(limit=, offset=, category=)get_top_trendsGetTopTrendsResponse
get_top_trends(type=, ...)get_top_trendsGetTopTrendsResponse

source は小文字で指定します(app downloads)。type は正確に指定します(App Store Top Free)。両方を混在させると 400 エラーになります。

from trendsapi_app_store import TrendsAPI

client = TrendsAPI()                    # TRENDSAPI_KEY
# client = TrendsAPI(api_key="YOUR_KEY")

series = client.get_time_series("com.openai.chatgpt")
print(series[-1].date, series[-1].value)

growth = client.get_growth("com.openai.chatgpt", percent_growth=["3M", "12M"])
print(growth.results[0].growth, growth.results[0].direction)

hot = client.get_live(limit=10)
print(hot.data)                         # [[1, "..."], ...]

get_time_series

points = client.get_time_series("com.openai.chatgpt")

各データポイント:

フィールド常に存在意味
dateはいYYYY-MM-DD
valueはいこの系列の 0〜100 のインデックス
keywordはいエコーバックされた値
volumeいいえ利用可能な場合の絶対ボリューム
source または datatypeいいえパイプラインのラベル

Python では list[TrendsDataPoint] が返されます。["date"] ではなく、.date と .value を使用してください。 JS では同じフィールドがオブジェクトのプロパティとして返されます。

get_growth

g = client.get_growth("com.openai.chatgpt", percent_growth=["12M", "3M", "YTD"])
print(g.results[0].growth, g.results[0].direction)

percent_growth の既定値は ["12M"] です。プリセット:7D 14D 30D 1M 2M 3M 6M 9M 12M/1Y 18M 24M/2Y 36M/3Y 48M 60M/5Y MTD QTD YTD。カスタム指定:{"name": "Launch", "recent": "2024-06-01", "baseline": "2024-01-01"}。

フィールド意味
search_termキーワード
data_sourceデータソース
resultsウィンドウごとのオブジェクト(period、growth、direction、日付、値)
metadata件数/成功フラグ

複数のウィンドウを指定しても、リクエスト数は 1 件としてカウントされます。Python:growth.results[0].growth。JS:growth.results[0].growth。

get_live

hot = client.get_live(limit=10)
フィールド意味
as_of_tsスナップショットの時刻
typeフィード名
limit、offset、countページネーション
data[rank, label] の行

Python:hot.data。JS:hot.data。offset= と category= は省略可能です(Amazon Best Sellers by Category と Top Websites のみ)。

非同期処理

import asyncio
from trendsapi_app_store import AsyncTrendsAPI

async def main():
    c = AsyncTrendsAPI()
    return await asyncio.gather(
        c.get_time_series("com.openai.chatgpt"),
        c.get_time_series("com.openai.chatgpt", source="google search"),
    )

asyncio.run(main())

200 のレスポンス 1 件につき、課金リクエスト 1 件としてカウントされます。

Pandas

from dataclasses import asdict
import pandas as pd
from trendsapi_app_store import TrendsAPI

df = pd.DataFrame(asdict(p) for p in TrendsAPI().get_time_series("com.openai.chatgpt"))
df["date"] = pd.to_datetime(df["date"])
print(df.set_index("date")["value"].resample("ME").mean().tail())

呼び出し(curl)

フィールド値
エンドポイントPOST https://api.trendsapi.ai/api
認証Authorization: Bearer $TRENDSAPI_KEY
履歴get_time_series または get_growth と source: app downloads を指定
キーワードAndroid のバンドル ID。例:com.openai.chatgpt(chatgpt ではありません)
リアルタイムの typeApp Store Top Free、App Store Top Paid、Google Play
curl -sS -X POST https://api.trendsapi.ai/api \
  -H "Authorization: Bearer $TRENDSAPI_KEY" \
  -H "Content-Type: application/json" \
  -d '{"mode":"get_time_series","source":"app downloads","keyword":"com.openai.chatgpt"}'

データソースに関する注意

  • keyword に chatgpt を指定すると 404 エラーになります。Play Store の ID を使用してください。
  • app downloads は Android の履歴データです。iOS のランキングはリアルタイムフィードのみです。
  • リアルタイムの type の値:App Store Top Free、App Store Top Paid、Google Play。

エラー

HTTPクライアント
200ペイロードを解析します。Python のデータクラス/JS の型付きオブジェクト
400エラーを送出します。source または type の表記を修正してください
401エラーを送出します。TRENDSAPI_KEY を確認してください
404エラーを送出します。そのキーワードの系列はありません。再試行しないでください
429エラーを送出します。クォータ超過です
5xxクライアントが再試行した後、エラーを送出します

HTTP の body フィールドは JSON 文字列です。SDK はこれをデコードします。生の curl では body をもう一度解析する必要があります。

サイト:https://trendsapi.ai/trends/app-store-trends。

ライセンス

MIT。LICENSE を参照してください。

コメント

MCP は初めてですか?

プロトコルの概要から最初のサーバーの導入まで、よくある疑問にまとめて答えます。

AI アプリケーションが外部のツールやデータソースに統一的な方法で接続するためのオープンなプロトコルです。クライアントはモデルとの対話を担い、MCP サーバーはツール・リソース・プロンプトテンプレートを提供します。標準メッセージでやり取りするため、1 つのサーバーを複数のクライアントで再利用できます。