Download APKs from aptoide.
$ npm install -g aptoide
Get meta data for the package id.
$ aptoide-details com.viber.voip | jq '.'
{
"status": "OK",
"apk": {
"id": 29752,
"repo": "sambat",
"package": "com.viber.voip",
"icon": "http://pool.img.aptoide.com/sambat/aac5778dc22a11a75036e4ad22c35d33.png",
"icon_hd": "http://pool.img.aptoide.com/sambat/cc3148e57a2928cd1ada1bbea553c3c2_icon.png",
"minSdk": 5,
"minScreen": "small",
...
Download APK from the store using package id.
$ aptoide-download -o foo.apk com.viber.voip
or
$ aptoide-download --id com.viber.voip > foo.apk