Skip to content

Instantly share code, notes, and snippets.

@oldnomad
Created October 21, 2024 18:37
Show Gist options
  • Save oldnomad/5d38a9ea9b1daf9d82fa4f655b9aebe8 to your computer and use it in GitHub Desktop.
Save oldnomad/5d38a9ea9b1daf9d82fa4f655b9aebe8 to your computer and use it in GitHub Desktop.
RuStore API

RuStore API for application installation

  • URL for human-readable application info page has format https://www.rustore.ru/catalog/app/{packageName}.
  • Application info as a JSON object is available at URL https://backapi.rustore.ru/applicationData/overallInfo/{packageName}.
  • APK reference URL is https://backapi.rustore.ru/applicationData/download-link. It accepts only POST requests (see below).

Application info

Application info JSON object has following fields:

  • code: contains string OK (on success).
  • message: contains string OK (on success).
  • timestamp: ISO-8601 timestamp (seems to be time of object retrieval).
  • body: application info subobject, containing:
    • appId: numeric application ID (required for APK retrieval).
    • packageName: package name, as in the URL.
    • appName: human-readable application name.
    • category, categories: main application category and an array of all application categories.
    • companyName: human-readable company name.
    • shortDescription: human-readable short application description (one line).
    • fullDescription: human-readable application description (may contain "\n").
    • fileSize: expected APK size?
    • versionName: human-readable version string.
    • versionCode: numeric version number (sequential?).
    • minSdkVersion, targetSdkVersion, maxSdkVersion: numeric Android SDK version limitations.
    • whatsNew: human-readable "What's New?" section (may contain "\n").
    • iconUrl: full URL to application icon (PNG?).
    • fileUrls: an array of screenshots (and other references?). Each element is an object containing:
      • fileUrl: full URL to screenshot (PNG?).
      • ordinal: numeric ordinal number.
      • type: resource type ("SCREENSHOT" for screenshots).
      • orientation: image orientation ("PORTRAIT" for portrait).
    • appType: ??? (I've seen "MAIN").
    • website: full URL to application home page.
    • signature: ??? (some sort of hash).
    • privacyDataCategories: ??? (an array).
    • adaptedToTablets: boolean flag (?).
    • companyLegalForm: ??? (I've seen "ENTITY").
    • downloads: numeric ??? (seems to be an approximate number of downloads).
    • price: numeric (?).
    • purchased: ??? (I've seen null).
    • appVerUpdatedAt: ISO-8601 timestamp.
    • inAppUpdatePriority: numeric (?).
    • banner: ??? (I've seen null).
    • aggregatorInfo: ??? (I've seen null).
    • video: ??? (I've seen null).
    • publicCompanyId: ??? (string).
    • createdAt: ISO-8601 timestamp (no timezone).
    • updatedAt: ISO-8601 timestamp (no timezone).
    • activeVerCode: numeric (seems to be the same as versionCode).
    • migrationGuideLink: ??? (I've seen null).
    • labelIds: ??? (array).
    • ageRestriction: an object containing:
      • category: string (I've seen "0+").
      • name: human-readable string corresponding to category.
      • description: human-readable string containing category description.
      • imageUrl: full URL to category icon (SVG).
    • markings: ??? (array).
    • seoTags: ??? (array).

APK retrieval

Once application info is known, the latest APK reference can be retrieved by sending a POST request to URL https://backapi.rustore.ru/applicationData/download-link:

  • The request must include header Content-Type: application/json; charset=utf-8.
  • The request body is a JSON object containing:
    • appId: numeric application ID (see application info above).
    • firstInstall: boolean true.
  • The response is a JSON object containing:
    • code: contains string OK (on success).
    • message: contains string OK (on success).
    • timestamp: ISO-8601 timestamp (seems to be time of object retrieval).
    • body: APK reference subobject, containing:
      • appId: numeric application ID.
      • apkUrl: full URL to the APK.
      • versionCode: numeric version number (see application info above).

After that the APK can be downloaded from the URL provided in body.apkUrl.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment