{
  "info": {
    "name": "Rivioo API",
    "description": "App Store and Google Play reviews as JSON. Set the `key` variable to your rk_live_ API key. Docs: https://api.rivioo.app/docs/api",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "auth": {
    "type": "bearer",
    "bearer": [{ "key": "token", "value": "{{key}}", "type": "string" }]
  },
  "variable": [
    { "key": "baseUrl", "value": "https://api.rivioo.app/v1" },
    { "key": "key", "value": "rk_live_your_key_here" }
  ],
  "item": [
    {
      "name": "Search for an app",
      "request": {
        "method": "GET",
        "url": {
          "raw": "{{baseUrl}}/apps/search?q=spotify&store=android",
          "host": ["{{baseUrl}}"],
          "path": ["apps", "search"],
          "query": [
            { "key": "q", "value": "spotify" },
            { "key": "store", "value": "android" },
            { "key": "country", "value": "us", "disabled": true }
          ]
        },
        "description": "Find an app's canonical id. Never counts against your monthly quota."
      }
    },
    {
      "name": "Fetch reviews for an app",
      "request": {
        "method": "POST",
        "header": [{ "key": "Content-Type", "value": "application/json" }],
        "url": {
          "raw": "{{baseUrl}}/reviews/fetch",
          "host": ["{{baseUrl}}"],
          "path": ["reviews", "fetch"]
        },
        "body": {
          "mode": "raw",
          "raw": "{\n  \"store\": \"android\",\n  \"app_id\": \"com.spotify.music\",\n  \"country\": \"us\",\n  \"limit\": 500\n}"
        },
        "description": "Cache hit returns 200 with the first page of reviews. Cache miss starts a live fetch and returns 202 with a job to poll."
      }
    },
    {
      "name": "Check a job's status",
      "request": {
        "method": "GET",
        "url": {
          "raw": "{{baseUrl}}/jobs/:id",
          "host": ["{{baseUrl}}"],
          "path": ["jobs", ":id"],
          "variable": [{ "key": "id", "value": "" }]
        },
        "description": "Poll a fetch job: queued -> running -> completed (or failed)."
      }
    },
    {
      "name": "Get a completed job's reviews",
      "request": {
        "method": "GET",
        "url": {
          "raw": "{{baseUrl}}/jobs/:id/reviews?page_size=100",
          "host": ["{{baseUrl}}"],
          "path": ["jobs", ":id", "reviews"],
          "query": [{ "key": "page_size", "value": "100" }],
          "variable": [{ "key": "id", "value": "" }]
        }
      }
    },
    {
      "name": "Page through reviews",
      "request": {
        "method": "GET",
        "url": {
          "raw": "{{baseUrl}}/reviews?cursor=",
          "host": ["{{baseUrl}}"],
          "path": ["reviews"],
          "query": [
            { "key": "cursor", "value": "" },
            { "key": "page_size", "value": "100", "disabled": true }
          ]
        },
        "description": "Follow meta.next_cursor from any page until it is null."
      }
    },
    {
      "name": "Check your usage",
      "request": {
        "method": "GET",
        "url": {
          "raw": "{{baseUrl}}/usage",
          "host": ["{{baseUrl}}"],
          "path": ["usage"]
        },
        "description": "Plan, quota used and remaining, reset date, and today's refresh count. Never counts against your monthly quota."
      }
    }
  ]
}
