{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/shapelessai/json-schema/shapelessai-identity-expand-input-schema.json",
  "title": "IdentityExpandInput",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/shapelessai-openapi.json#/components/schemas/IdentityExpandInput",
  "type": "object",
  "properties": {
    "node": {
      "type": "string",
      "description": "A node id: person:<uuid>, account:<uuid>, organization:<uuid> or asset:<platform>:<postId>. Find one with GET /api/identity/search, or take the anchor a resolve's done event names."
    },
    "expansion": {
      "type": "string",
      "enum": [
        "profile",
        "posts",
        "sponsors",
        "ads",
        "creators",
        "metrics",
        "labels"
      ],
      "description": "What to pull. profile: account: its profile fields and avatar. person: every owned account's profile. organization: its website (name, description, the accounts it links), its own accounts' profiles, its LinkedIn company id and logo. posts: account: everything it published, newest first, with metrics. Takes since/until (or sinceMonths) and maxItems. sponsors: account: the brands that paid it (paid-partnership labels, the branded-content library, vendor sponsor data). ads: organization: its ads from the ad libraries (Meta, Google, LinkedIn; TikTok where open). creators: organization: the creators around it, cheapest evidence first: held bios that name it and held posts of its own accounts (free), one posts page of its creator-feature accounts (cents), then a vendor's index of paid creators. Lands paid, partners_with and features edges. metrics: asset: a fresh metric snapshot of one post. labels: person or organization: what it is (category, niches, organizations), read by a language model from what the graph already holds; for a person also the embedding /api/identity/similar ranks by."
    },
    "budgetUsd": {
      "type": "number",
      "minimum": 0.01,
      "maximum": 2,
      "default": 0.5,
      "description": "The most this pull may spend at engine cost, in USD (0.01 to 2, default 0.5; outside it is clamped). A key holds it on the credit wallet at its plan's rate before the pull starts and is charged only what the done event's costUsd says."
    },
    "since": {
      "type": "string",
      "format": "date",
      "description": "posts only: the oldest publish date to read (ISO day or instant, at most 10 years back). Default now minus sinceMonths."
    },
    "until": {
      "type": "string",
      "format": "date",
      "description": "posts only: the newest publish date to read. Default now."
    },
    "sinceMonths": {
      "type": "integer",
      "minimum": 1,
      "maximum": 36,
      "default": 12,
      "description": "posts only: sugar for since = now minus this many months."
    },
    "maxItems": {
      "type": "integer",
      "minimum": 25,
      "maximum": 1000,
      "default": 300,
      "description": "posts only: the most posts one pull lands."
    },
    "force": {
      "type": "boolean",
      "default": false,
      "description": "Pull again even when fresh or already held. Without it a fresh expansion answers done with costUsd 0, and a posts pull reads only the gaps in what is held."
    }
  },
  "required": [
    "node",
    "expansion"
  ],
  "additionalProperties": false
}