mobbin
v0.1.1
Published
CLI + lightweight SDK for Mobbin's (mostly undocumented) web JSON endpoints and asset downloads.
Readme
Mobbin CLI
Small Node.js CLI + SDK for calling Mobbin's JSON endpoints under https://mobbin.com/api/*.
Some endpoints are public, others require an authenticated mobbin.com session cookie.
Requirements
- Node.js
>=18(uses built-infetch)
Quickstart (run from this repo)
./mobbin-cli.js --help
./mobbin-cli.js trending-apps --platform ios
./mobbin-cli.js trending-sites
./mobbin-cli.js searchable-apps --platform webInstall As mobbin (recommended)
This repo includes a package.json with a bin entry, so you can link it once and then use mobbin anywhere.
cd /path/to/tools/mobbin
npm link
mobbin --help
mobbin trending-apps --platform iosIf you do not want to use npm link, a simple shell alias also works:
alias mobbin="/path/to/tools/mobbin/mobbin-cli.js"
mobbin trending-sitesAuthentication (cookies)
Auth-gated endpoints require a valid mobbin.com session cookie.
The CLI will try to find cookies automatically for auth-gated commands:
MOBBIN_COOKIE/--cookieMOBBIN_COOKIE_FILE/--cookie-file- Common local files like
~/.config/mobbin/cookie.txt - macOS only: local browser cookie stores (Safari, Chrome, Edge, Brave, Chromium)
- If run in a TTY and no cookies are found for an auth-gated command, the CLI will open
mobbin.comand prompt you to log in, then retry cookie discovery.
You can provide cookies explicitly in three ways (highest priority first):
--cookie "name=value; name2=value2"--cookie-file <path>(either):- Netscape cookie file (common export format)
- Playwright storage state JSON (the CLI extracts cookies for
mobbin.com) - JSON array of cookie objects (common browser export format)
MOBBIN_COOKIEenv var
Examples:
mobbin search --query "login" --platform ios --experience apps --cookie "session=..."
mobbin search --query "login" --cookie-file ./cookies.txt
mobbin search --query "login" --cookie-file ./storage-state.json
MOBBIN_COOKIE="session=..." mobbin recent-searchesCommon auth errors
401or{ error: { message: "unauthenticated" } }: missing/expired cookie400fromcontent-apps: often needs auth and/or server-side state (Mobbin seems to expect a non-nullsearchRequestIdin some flows)
One-time setup: save cookies to a file
This opens mobbin.com in your browser (macOS) and then saves a cookie string to ~/.config/mobbin/cookie.txt:
mobbin auth save-cookie --out ~/.config/mobbin/cookie.txtIf your Mobbin login is in Safari, you can force Safari cookie reading:
mobbin auth save-cookie --cookie-from safariIf Mobbin is logged in under a non-default Chrome profile, pass the profile directory name:
mobbin auth save-cookie --cookie-from chrome --cookie-profile "Profile 1"Security note: this file contains session cookies. Treat it like a password.
Commands
All commands output pretty JSON by default.
- Add
--rawto print raw (non-JSON) output - Add
--compactto print compact JSON (1 line)
Public endpoints (work without cookies):
mobbin trending-apps --platform ios
mobbin trending-sites
mobbin searchable-sites
mobbin searchable-apps --platform ios
mobbin trending-keywords --platform ios
mobbin dictionary
mobbin trending-filter-tags --platform ios --experience appsAuth-gated endpoints (require cookies):
mobbin search --query "login" --platform ios --experience apps
mobbin popular-apps --platform ios --limit 10
mobbin app-versions --app-id <uuid>
mobbin screen-info --screen-id <uuid>
mobbin recent-searches
mobbin content-apps --platform ios --tab latest --page-size 24Download Screenshots
Mobbin API responses often include Supabase storage URLs (e.g. https://*.supabase.co/storage/v1/object/public/...).
Those URLs may not be directly browsable, but Mobbin serves the same assets via bytescale.mobbin.com.
Use download to fetch screenshots to disk:
# Download all screenshots for an app (all versions)
mobbin download --app-id <uuid> --out-dir ./out
# Download a single screen
mobbin download --screen-id <uuid> --out-dir ./out
# Download all full-page screens for a site (latest version)
mobbin download --site-id <uuid> --out-dir ./out
# Download from a Mobbin site URL (any /sites/... URL works)
mobbin download "https://mobbin.com/sites/<anything>-<siteId>" --out-dir ./out
# Download one or many URLs (Supabase or Bytescale URLs)
mobbin download "https://ujasntkfphywizsdaapi.supabase.co/storage/v1/object/public/content/app_screens/<file>.png" --out-dir ./out
# Download from a Mobbin screen page URL
mobbin download "https://mobbin.com/screens/<uuid>" --out-dir ./outextract is an alias of download (same flags).
Tip: download caches Mobbin's Bytescale mapping in ~/.config/mobbin/bytescale.json. Use --bytescale-refresh if downloads suddenly start failing.
Notes:
download --app-id,--screen-id, and--site-idrequire auth cookies--app-id,--screen-id, and--site-idaccept comma-separated listsdownload --site-idresolves the latestsiteVersionId(Mobbin no longer reliably redirects) then fetches the site's/sectionspage HTML and extractscontent/app_fullpage_screens/*URLs (if this breaks, pass the exact/sites/.../<siteVersionId>/sectionsURL)--platformis typically one ofios|android|web--experiencedefaults toapps(Mobbin also uses other values in the UI)content-apps --tabmaps to sorting behavior:latest(sort bypublishedAt, also hides non-ideal apps)popular(sort bypopularity)top(sort byrating)
Raw API Calls
Use call to hit any endpoint (useful for recon / experimenting).
mobbin call /api/search-bar/fetch-trending-sites --method POST --data "{}"
mobbin call /api/search-bar/fetch-trending-apps --method POST --data '{"platform":"ios"}'Tip: --data must be valid JSON.
SDK
mobbin-sdk.js exports:
MobbinClient(a small fetch wrapper)buildContentAppsPayload()(helper for/api/content/fetch-apps)
Example:
import { MobbinClient } from "./mobbin-sdk.js";
const client = new MobbinClient({ cookie: process.env.MOBBIN_COOKIE });
const apps = await client.fetchTrendingApps({ platform: "ios" });
console.log(apps);