Rankbase API Documentation

Programmatically access your Shopify App Store keyword ranking data.

Overview

Rankbase is a keyword ranking and analytics platform built by a Shopify app developer, for Shopify app developers. It connects to your Google Analytics 4 property and analyzes how users discover your app through App Store search, which keywords drive the most traffic and installs, and how your search position changes over time.

The Rankbase API lets you access this data programmatically so you can build custom dashboards, automate reporting, feed data into spreadsheets, or integrate keyword insights into your own tools and workflows. For a complete overview of all features, see the Rankbase documentation.

What data is available?

  • Keyword rankings — Every search keyword that led users to your Shopify app listing, with position data, dates, countries, and locales.
  • Install click keywords — Keywords that led to actual app install button clicks (not just listing views).
  • Search type breakdown — Separate organic search results (search) from paid search ads (search_ad).
  • Most important keywords — Automatically calculated keyword importance based on the share of total traffic each keyword drives.
  • Per-shop install source — Look up the install source for a specific store by its .myshopify.com URL, including the source classification (App Store Search, Direct, Organic Search, etc.), date, and locale.

How it works

When a user searches the Shopify App Store, Shopify sends search query data to your connected Google Analytics 4 property. Rankbase reads this GA4 data, processes it into keyword reports, and exposes it through both the web dashboard and this API. You need to have Google Analytics connected for your app in the Rankbase dashboard before the API can return data.

Quick start

  1. Sign up at https://rankbase.io and add your Shopify app.
  2. Connect your Google Analytics 4 property in the app settings.
  3. Go to the API section in your dashboard and create an API key.
  4. Use the API key as a Bearer token to make requests to the endpoints below.

Authentication

All API requests require a Bearer token in the Authorization header. You can create API keys from the API section in your dashboard.

Authorization: Bearer rb_your_api_key_here

API keys are scoped to your team. Any app belonging to your team can be queried using the same key. Each team can have up to 5 API keys.

Important: Your API key is shown only once when created. Store it securely. If you lose it, delete the key and create a new one.

Base URL

All API endpoints are served under the following base URL:

https://rankbase.io/api/v1

Rate Limiting

API requests are limited to 60 requests per minute per team. Rate limit information is included in response headers:

HeaderDescription
X-RateLimit-LimitMaximum requests per minute
X-RateLimit-RemainingRemaining requests in current window
Retry-AfterSeconds until the rate limit resets (only present on 429 responses)

GET /apps/{appId}/keywords

Retrieve keyword ranking data for a specific Shopify app. Returns all search keywords that led users to your app listing on the Shopify App Store, along with position data, country breakdown, and importance scoring.

The appId is the numeric ID of your app in Rankbase. You can find it in the URL when viewing your app in the dashboard (e.g. /app/30 means appId is 30).

Query Parameters

ParameterTypeDefaultDescription
daysinteger90Number of days to look back (1-365). Ignored if start_date and end_date are provided.
start_datestring-Start of date range in YYYY-MM-DD format. Must be used together with end_date.
end_datestring-End of date range in YYYY-MM-DD format. Must be used together with start_date.
installedstring"false"Set to "true" to return only keywords that led to install button clicks (not just listing views).
search_typestring"all"Filter by search type: "all" (both organic and ads), "search" (organic only), or "search_ad" (paid ads only).

Example Request

curl -H "Authorization: Bearer rb_your_api_key" \
  "https://rankbase.io/api/v1/apps/30/keywords?days=30"

Example: Filter by date range

curl -H "Authorization: Bearer rb_your_api_key" \
  "https://rankbase.io/api/v1/apps/30/keywords?start_date=2025-01-01&end_date=2025-01-31"

Example: Only install-click keywords from organic search

curl -H "Authorization: Bearer rb_your_api_key" \
  "https://rankbase.io/api/v1/apps/30/keywords?days=30&installed=true&search_type=search"

Response Fields

FieldTypeDescription
app_idintegerThe app's ID in Rankbase.
app_namestringThe app's display name.
daysintegerThe number of days covered by the report.
installedbooleanWhether the results are filtered to install-click keywords only.
search_typestringThe search type filter applied ("all", "search", or "search_ad").
total_keywordsintegerTotal number of unique keywords returned.
keywordsobjectMap of keyword string to keyword data. Each keyword contains totalUsers (number of users who searched this term), positions (array of position records with position, date, locale, search_type, country), averagePosition, latestPosition, and score.
most_important_keywordsobjectMap of keyword string to percentage (integer). Shows keywords that drive more than 2 users, ranked by their share of total traffic.

Example Response

{
  "app_id": 30,
  "app_name": "My Shopify App",
  "days": 30,
  "installed": false,
  "search_type": "all",
  "total_keywords": 42,
  "keywords": {
    "variant image": {
      "totalUsers": 24,
      "positions": [
        {
          "position": 3,
          "date": "2025-02-04",
          "locale": "en",
          "search_type": "search",
          "country": "CA"
        },
        {
          "position": 2,
          "date": "2025-02-05",
          "locale": "en",
          "search_type": "search",
          "country": "US"
        }
      ],
      "averagePosition": 2.4,
      "latestPosition": 2,
      "score": 624
    },
    "color swatch": {
      "totalUsers": 5,
      "positions": [
        {
          "position": 1,
          "date": "2025-02-07",
          "locale": "fr",
          "search_type": "search",
          "country": "FR"
        }
      ],
      "averagePosition": 2,
      "latestPosition": 3,
      "score": 72
    }
  },
  "most_important_keywords": {
    "variant image": 28,
    "color swatch": 15
  }
}

GET /apps/{appId}/installs

Look up the install source for one or more specific stores. Given Shopify .myshopify.com URLs, returns the install event(s) recorded for each store along with the source that drove the install (App Store Search, Direct, Organic Search, Google Ads, LLM, etc.) and the search keyword or referrer that brought the user.

Useful for deep-linking from your CRM, billing portal, or support dashboard so you can investigate where any specific customer originally came from. The lookup is not time-bounded: it returns the install regardless of when it happened, as long as the event is still retained in your Google Analytics property.

Up to 50 shops can be queried in a single request by passing a comma-separated list to shop_url. Internally the call hits Google Analytics once for the whole batch (filtered server-side), so it is meaningfully faster than making N separate calls.

The appId is the numeric ID of your app in Rankbase. You can find it in the URL when viewing your app in the dashboard (e.g. /app/30 means appId is 30).

Query Parameters

ParameterTypeRequiredDescription
shop_urlstringyesOne or more .myshopify.com domains (without protocol or trailing slash). Use a comma to separate multiple shops. Maximum 50 per request. Examples: examplestore.myshopify.com or shop-a.myshopify.com,shop-b.myshopify.com,shop-c.myshopify.com.

Example Request — Single Shop

curl -H "Authorization: Bearer rb_your_api_key" \
  "https://rankbase.io/api/v1/apps/30/installs?shop_url=examplestore.myshopify.com"

Example Request — Batch (Multiple Shops)

curl -H "Authorization: Bearer rb_your_api_key" \
  "https://rankbase.io/api/v1/apps/30/installs?shop_url=shop-a.myshopify.com,shop-b.myshopify.com,shop-c.myshopify.com"

Response Fields

FieldTypeDescription
app_idintegerThe app's ID in Rankbase.
app_namestringThe app's display name.
total_shopsintegerNumber of shops in the response. Equals the number of unique shop_url values supplied in the request.
shopsarrayOne entry per requested shop, in the same order as the input. Each entry contains shop_url (the queried URL, echoed back), total_installs, and installs (records sorted newest first). Each install record contains date (YYYY-MM-DD), shop_id, shop_url, source (e.g. "App Store Search", "Direct", "Organic Search", "Google Ads", "LLM (AI)"), type (sub-classification, e.g. "Organic Search", "Search Ads", "Category Page"), value (the keyword, category, or referrer URL associated with the source — may be null), locale, and country (ISO 2-letter code).

Example Response

{
  "app_id": 30,
  "app_name": "My Shopify App",
  "total_shops": 2,
  "shops": [
    {
      "shop_url": "shop-a.myshopify.com",
      "total_installs": 1,
      "installs": [
        {
          "date": "2026-03-14",
          "shop_id": "12345678",
          "shop_url": "shop-a.myshopify.com",
          "source": "App Store Search",
          "type": "Organic Search",
          "value": "color swatch",
          "locale": "en",
          "country": "US"
        }
      ]
    },
    {
      "shop_url": "shop-b.myshopify.com",
      "total_installs": 0,
      "installs": []
    }
  ]
}

Empty Results

If a shop has no install event in your retained Google Analytics data, that shop's entry still appears in the response with "total_installs": 0 and an empty installs array. This is not an error — it just means the install isn't in GA (either it predates retention, or the shop hasn't installed your app). The API always returns one entry per requested shop_url.

Error Responses

All errors return a JSON object with an error field describing what went wrong.

Status CodeMeaningExample Message
401Missing or invalid API key"Invalid API key."
403App does not belong to your team, or subscription is inactive"This app does not belong to your team."
404App not found"App not found."
422Validation error (invalid dates, invalid search_type, missing shop_url, more than 50 shop URLs in one request, Google Analytics not connected, GA auth expired, or required custom dimensions not configured)"shop_url query parameter is required."
429Rate limit exceeded (60 requests per minute)"Too many requests. Limit: 60 per minute."
500Internal server error"Failed to fetch keyword data."

Example Error Response

{
  "error": "Invalid API key."
}
© 2026 Rankbase. App Store keyword ranking and analytics for Shopify app developers.