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

How to scrape Komi with PHP

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 use PHP’s curl extension and json_decode(..., true), so the response is a plain associative array. No Composer packages needed.

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 PHPphp -m | grep curl # the curl extension ships with most PHP builds

Call Komi API from PHP

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

main.php
<?php

function groundsocial(string $path, array $params = []): array
{
    $url = 'https://api.groundsocial.dev' . $path . ($params ? '?' . http_build_query($params) : '');
    $ch = curl_init($url);
    curl_setopt_array($ch, [
        CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . getenv('GROUNDSOCIAL_API_KEY')],
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_TIMEOUT => 60,
    ]);
    $raw = curl_exec($ch);
    $status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
    curl_close($ch);
    $data = json_decode($raw, true);
    if ($status !== 200) {
        $e = $data['error'];
        throw new RuntimeException($e['code'] . ': ' . ($e['hint'] ?? $e['message']));
    }
    return $data;
}

$data = groundsocial('/v1/komi/pages', ['url' => 'https://kimkardashian.komi.io']);

foreach ($data['modules'] as $item) {
    echo $item['name'] ?? '', PHP_EOL;
}

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 {
    $data = groundsocial('/v1/komi/pages', ['url' => 'https://kimkardashian.komi.io']);
} catch (RuntimeException $e) {
    // "code: hint", e.g. "target_not_found: ..." (never charged).
    fwrite(STDERR, $e->getMessage() . PHP_EOL);
    exit(1);
}
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.