{"openapi":"3.1.0","info":{"title":"AppDrift API","version":"1.1.0","description":"ASO data + AI actions for agents and integrations: keyword difficulty, tracked ranks, page-one opportunities, the weekly action plan, one-click keyword optimization, metadata generation, and translation. Charging endpoints consume plan tokens and charge only on success. Docs: https://appdrift.co/docs/mcp"},"servers":[{"url":"https://appdrift-backend-1fabfc95f592.herokuapp.com"}],"security":[{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"http","scheme":"bearer","description":"AppDrift API access key (ad_live_...) from https://appdrift.co/dashboard/developers — any paid plan."}}},"paths":{"/v1/keyword-difficulty":{"get":{"summary":"Score keyword difficulty + popularity (any keyword). Free.","parameters":[{"name":"keyword","in":"query","required":true,"schema":{"type":"string"}},{"name":"platform","in":"query","schema":{"type":"string","enum":["ios","android"],"default":"ios"}},{"name":"country","in":"query","schema":{"type":"string","default":"us"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"keyword":{"type":"string"},"platform":{"type":"string"},"country":{"type":"string"},"difficulty":{"type":"number","description":"0-100, higher = harder"},"popularity":{"type":["number","null"]},"source":{"type":"string","enum":["cache","live"]}}}}}}}},"503":{"description":"Store returned no results — retry shortly"}}}},"/v1/apps":{"get":{"summary":"List connected apps. Free.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"platform":{"type":"string"},"bundle_id":{"type":"string"},"status":{"type":"string"}}}}}}}}}}}},"/v1/apps/{id}/keywords":{"get":{"summary":"Tracked keywords with latest rank. Free.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"keyword":{"type":"string"},"platform":{"type":"string"},"country":{"type":"string"},"rank":{"type":["integer","null"]}}}}}}}}},"404":{"description":"App not found"}}}},"/v1/apps/{id}/opportunities":{"get":{"summary":"Page-one push candidates (rank 11-30, easiest first). Free.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"keyword":{"type":"string"},"rank":{"type":"integer"},"difficulty":{"type":["number","null"]}}}}}}}}},"404":{"description":"App not found"}}}},"/v1/action-plan":{"get":{"summary":"This week's prioritized ASO action plan across all apps. Free.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"app":{"type":"string"},"type":{"type":"string"},"priority":{"type":"number"},"action":{"type":"string"},"detail":{"type":"string"}}}}}}}}}}}},"/v1/apps/{id}/optimize":{"post":{"summary":"One-click keyword optimization: AI-rewrites title/subtitle/keywords toward a target keyword, returns a before/after diff. Costs 3 tokens, charged only on success.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["keyword"],"properties":{"keyword":{"type":"string","minLength":2,"maxLength":60},"country":{"type":"string","description":"Storefront country code, e.g. us"}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"platform":{"type":"string"},"keyword":{"type":"string"},"current":{"type":"object"},"proposed":{"type":"object"},"rationale":{"type":"string"},"tokens_charged":{"type":"integer"}}}}}}}},"402":{"description":"Insufficient tokens"},"404":{"description":"App not found"}}}},"/v1/apps/{id}/optimize/apply":{"post":{"summary":"Write an accepted optimization proposal into the app's editable draft version. Free.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["fields"],"properties":{"fields":{"type":"object","description":"Field → new value map from the optimize response's `proposed`"}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object"}}}}}},"404":{"description":"App not found"},"409":{"description":"NO_DRAFT_VERSION — create a draft version in the dashboard first"}}}},"/v1/generate-metadata":{"post":{"summary":"Generate ASO metadata fields from an app brief. 1 token per short field, 2 per long field (description/full_description); charged only on success.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["app_name","app_description"],"properties":{"platform":{"type":"string","enum":["ios","android"],"default":"ios"},"app_name":{"type":"string"},"app_description":{"type":"string","minLength":20},"language":{"type":"string","default":"en-US"},"fields":{"type":"array","items":{"type":"string"},"description":"Subset to generate. ios: name, subtitle, promotional_text, description, keywords. android: title, short_description, full_description. Defaults to all."},"keywords":{"type":"array","items":{"type":"string"},"maxItems":20},"target_audience":{"type":"string"},"category":{"type":"string"}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"platform":{"type":"string"},"language":{"type":"string"},"fields":{"type":"object","additionalProperties":{"type":"string"}},"tokens_charged":{"type":"integer"}}}}}}}},"402":{"description":"Insufficient tokens"}}}},"/v1/translate":{"post":{"summary":"Translate one metadata field into up to 15 languages. Per-language price: 1 token (3 for description, 5 for full_description); charged only on success.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["field","text","target_languages"],"properties":{"field":{"type":"string","enum":["title","subtitle","description","whats_new","promotional_text","android_title","short_description","full_description","recent_changes"]},"text":{"type":"string"},"target_languages":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":15},"source_language":{"type":"string","default":"en-US"}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"field":{"type":"string"},"translations":{"type":"object","additionalProperties":{"type":"string"}},"tokens_charged":{"type":"integer"}}}}}}}},"402":{"description":"Insufficient tokens"}}}},"/v1/me":{"get":{"summary":"Key introspection: plan name + token balance. Free.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"plan":{"type":"string"},"tokens_remaining":{"oneOf":[{"type":"integer"},{"type":"string","const":"unlimited"}]}}}}}}}}}}}}}