100 free credits. No credit card required. Get a key

How to scrape Komi with TypeScript

A public Komi creator page: the talent profile, social links and every module (links, products, music, videos), as Komi’s web app reads them.

The examples type the fields they read with an interface taken from the recorded response, and wrap fetch in one typed helper that throws a typed error.

GET /v1/komi/pages1 credit per callRefunded on failure

Before you start

  1. Get an API keySign up for 100 free credits, no card. Keys start with gs_live_.
  2. Put it in the environmentEvery example reads it from GROUNDSOCIAL_API_KEY: export GROUNDSOCIAL_API_KEY=gs_live_…
  3. Set up TypeScriptnpm init -y && npm pkg set type=module && npm i -D tsx typescript @types/node

Call Komi API from TypeScript

GET /v1/komi/pages. Save this as main.ts and run npx tsx main.ts. It reads the items in modules and prints name for each.

main.ts
// The fields this script reads, as the recorded response has them.
interface Page {
  modules: {
    name: string
  }[]
}

class ApiError extends Error {
  constructor(
    readonly code: string,
    readonly hint: string,
    readonly retryable: boolean,
  ) {
    super(`${code}: ${hint}`)
  }
}

async function call<T>(path: string, params: Record<string, string> = {}): Promise<T> {
  const url = new URL(path, 'https://api.groundsocial.dev')
  for (const [k, v] of Object.entries(params)) url.searchParams.set(k, v)
  const res = await fetch(url, {
    headers: {
      Authorization: `Bearer ${process.env.GROUNDSOCIAL_API_KEY}`,
    },
    signal: AbortSignal.timeout(60_000),
  })
  if (!res.ok) {
    const { error } = (await res.json()) as {
      error: { code: string; message: string; hint?: string; retryable: boolean }
    }
    throw new ApiError(error.code, error.hint ?? error.message, error.retryable)
  }
  return (await res.json()) as T
}

const data = await call<Page>('/v1/komi/pages', { url: 'https://kimkardashian.komi.io' })
for (const item of data.modules) {
  console.log(item.name)
}

The response

A real Komi response to this call, recorded from the live source and shortened for display: arrays keep their first items and … marks every cut. The recorded page had 7 items in modules. Live calls return current data in the same shape.

200 OK
{
  "talent": {
    "id": 104658,
    "username": "kimkardashian",
    "talentProfile": {
      "id": "64d82830-59aa-4488-bfb0-93426971d139",
      "firstName": "Kim",
      "lastName": "Kardashian",
      "displayNameType": "IMAGE",
      "displayName": "Kim Kardashian",
      "displayNameImage": null,
      "displayNameImageScale": null,
      "showDisplayName": false,
      "socialProfileLinks": [
        {
          "link": "https://www.instagram.com/kimkardashian/",
          "type": "INSTAGRAM"
        },
        {
          "link": "https://www.tiktok.com/@kimkardashian",
          "type": "TIKTOK"
        },
        "… 4 more"
      ],
      "covers": null,
      "instagram": null,
      "youtube": null,
      "website": null,
      "popularity": 0,
      "…": "19 more fields"
    },
    "accountStatus": "active",
    "avatar": "https://komi-production-assets.s3.amazonaws.com/photos/4Nd69ODJHs61_iNYPlqos.jpg",
    "hasBooking": false
  },
  "modules": [
    {
      "id": "cf97644f-474c-4218-be27-a35f7b3bca4a",
      "type": "GROUP",
      "createdAt": "2025-04-11T11:09:37.366Z",
      "updatedAt": "2025-04-11T11:09:37.366Z",
      "order": 0,
      "name": "SKIMS",
      "showTitle": true,
      "items": [
        {
          "createdAt": "2021-11-17T23:44:57.348Z",
          "updatedAt": "2025-04-25T18:46:12.469Z",
          "id": "e6ce39d2-e3df-4040-a5cc-ce016cacbc34",
          "order": 0,
          "name": "",
          "showTitle": true,
          "type": "LINK",
          "items": [
            "…"
          ],
          "groupId": "cf97644f-474c-4218-be27-a35f7b3bca4a",
          "deletedAt": null,
          "localizationId": null,
          "visible": true,
          "template": false,
          "localizationName": null
        },
        {
          "createdAt": "2025-04-25T18:46:12.434Z",
          "updatedAt": "2025-04-25T18:46:12.434Z",
          "id": "5c8bc46c-2d6b-4731-baf3-2f40aec1465c",
          "order": 1,
          "name": "The Swim Shop",
          "showTitle": false,
          "type": "PRODUCT",
          "items": [
            "…"
          ],
          "groupId": "cf97644f-474c-4218-be27-a35f7b3bca4a",
          "deletedAt": null,
          "localizationId": null,
          "visible": false,
          "template": false,
          "localizationName": null
        },
        "… 2 more"
      ],
      "groupId": null,
      "deletedAt": null,
      "localizationId": null,
      "visible": true,
      "template": false,
      "localizationName": null
    },
    {
      "id": "bdc6b59b-2ab2-4151-a7a9-894d84b0daff",
      "type": "LINK",
      "createdAt": "2026-02-24T16:40:52.771Z",
      "updatedAt": "2026-02-24T16:40:52.771Z",
      "order": 1,
      "name": "UPDATE ",
      "showTitle": true,
      "items": [
        {
          "id": "4cb6a1c6-3486-4655-abf0-9ade378d8cef",
          "url": "https://drinkupdate.com/?srsltid=AfmBOooIad8vPZueD_CvcKcyVCG1KbYiz1fU-or88He0HmecDhK35kKL",
          "order": 0,
          "title": "UPDATE ENERGY DRINK ",
          "visible": true,
          "moduleId": "bdc6b59b-2ab2-4151-a7a9-894d84b0daff",
          "thumbnail": "https://komi-production-assets.s3-accelerate.amazonaws.com/photos/P9U67dVgGygBfMw6UyphZ.jp…",
          "versionId": "944094bf-f124-4b13-866a-3498c492736d"
        }
      ],
      "groupId": null,
      "deletedAt": null,
      "localizationId": null,
      "visible": true,
      "template": false,
      "localizationName": null
    },
    "… 5 more"
  ],
  "url": "https://kimkardashian.komi.io"
}

Top-level fields

FieldTypeDescription
talentKomiTalent–
modulesKomiModule[]–
urlstring–

Parameters

NameInTypeDescription
url (required)querystringA Komi page link (<username>.komi.io or komi.io/<username>) or the username. Example: https://kimkardashian.komi.io.

Errors and retries

Every error is JSON with error.code (stable: branch on it), message, hint (what to do next), docs_url and retryable. A failed call is never charged. Retry only when retryable is true, after the Retry-After header.

Errors
try {
  const data = await call<Page>('/v1/komi/pages', { url: 'https://kimkardashian.komi.io' })
} catch (err) {
  if (!(err instanceof ApiError)) throw err
  if (err.code === 'insufficient_credits') console.error('Top up:', err.hint)
  else if (err.code === 'target_not_found') console.error('Nothing there (not charged).')
  else if (err.retryable) console.error('Try again after Retry-After:', err.hint)
  else throw err
}
StatusMeaning
200The page.
400Invalid input. Nothing was charged.
401Missing or invalid API key.
402Not enough credits, a spend cap was reached, or payment is required.
403The target is private, or the account is suspended.
404No public Komi page by that name.
429Too many requests. Wait for Retry-After seconds.
503Komi is temporarily unavailable. Retryable; nothing was charged.

Every error code and what to do about it.

Pricing

Cost
Per call1 credit per call
1,000 calls$1.00 on the starter pack, $0.40 at volume
No key (MPP or x402)$0.01 per call
Failed callRefunded, never charged

Every response has x-credits-charged and x-credits-remaining headers. Credits never expire. Packs and calculator.

From an AI agent (MCP)

The same call is the komi_page_get tool on the hosted MCP server, so Claude, Cursor or any MCP client can make it without code. Add the server once:

bash
claude mcp add --transport http groundsocial https://api.groundsocial.dev/mcp

Then ask for it in words (“A Komi creator page: profile, social links and every module”), or call the tool directly:

json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "komi_page_get",
    "arguments": {
      "url": "https://kimkardashian.komi.io"
    }
  }
}

MCP setup for Claude Desktop, Cursor, VS Code and ChatGPT.

List what a creator sells

Read the modules of type PRODUCT for items with prices.

Questions

Both <username>.komi.io and komi.io/<username>.

Keep going

Run it on your own data

One key for Komi and 76 more platforms, over REST or MCP. Free credits on signup, no card.

Komi is a trademark of Komi. We are not affiliated with or endorsed by Komi.