{
  "openapi": "3.0.1",
  "info": {
    "title": "TikTok Shop Affiliate Intelligence",
    "description": "Find which creators are promoting any TikTok Shop product. Verified affiliate data with creator names, follower counts, and sales intelligence. Used by agencies and sellers for competitor research.",
    "version": "2.0",
    "x-build-id": "BpSEEl08b9FTPFOVO"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/george.the.developer~tiktok-shop-affiliate-sales-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-george.the.developer-tiktok-shop-affiliate-sales-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/george.the.developer~tiktok-shop-affiliate-sales-scraper/runs": {
      "post": {
        "operationId": "runs-sync-george.the.developer-tiktok-shop-affiliate-sales-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/george.the.developer~tiktok-shop-affiliate-sales-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-george.the.developer-tiktok-shop-affiliate-sales-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "productUrl": {
            "title": "TikTok Shop Product URL",
            "type": "string",
            "description": "Primary launch wedge. Provide a TikTok Shop product URL to run the VPS-first verified pipeline. Supports shop.tiktok.com, tiktok.com/shop, and @shop/product routes."
          },
          "searchQuery": {
            "title": "Search Query (Beta)",
            "type": "string",
            "description": "Beta discovery lane. The actor will try to discover TikTok Shop product URLs from TikTok Shop search and Google SERP before running the same product pipeline. Lower confidence than a direct productUrl."
          },
          "market": {
            "title": "Market Routing",
            "type": "object",
            "description": "Optional market identity forwarded to the VPS and Playwright lanes. These values also shape Apify residential/mobile proxy routing. Defaults to US/en-US/America/New_York/USD.",
            "properties": {
              "countryCode": {
                "title": "Country Code",
                "type": "string",
                "description": "Two-letter country code used for Apify proxy routing.",
                "default": "US"
              },
              "locale": {
                "title": "Locale",
                "type": "string",
                "description": "Locale forwarded into the VPS request and Playwright context.",
                "default": "en-US"
              },
              "timezoneId": {
                "title": "Timezone ID",
                "type": "string",
                "description": "IANA timezone used by the Playwright fallback context.",
                "default": "America/New_York"
              },
              "currency": {
                "title": "Currency",
                "type": "string",
                "description": "Expected shopper currency for the selected market.",
                "default": "USD"
              }
            },
            "default": {
              "countryCode": "US",
              "locale": "en-US",
              "timezoneId": "America/New_York",
              "currency": "USD"
            }
          },
          "maxProducts": {
            "title": "Max Products (Search Beta)",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Only used with searchQuery beta. Caps how many discovered product URLs are expanded into full product runs. Kept conservative to fit the current runtime budget.",
            "default": 5
          },
          "maxAffiliatesPerProduct": {
            "title": "Max Affiliates Per Product",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Maximum number of affiliate creators to retain per product output after normalization.",
            "default": 20
          },
          "debug": {
            "title": "Debug Capture",
            "type": "boolean",
            "description": "Save raw lane outputs and extraction artifacts to the key-value store for rollout checks and incident debugging.",
            "default": false
          },
          "escalationMode": {
            "title": "Affiliate Lane Override",
            "enum": [
              "auto",
              "force_primary",
              "force_escalated"
            ],
            "type": "string",
            "description": "Advanced operator override for affiliate coverage lane selection. Use auto for normal gate-driven behavior, force_primary to keep the current stack active, or force_escalated to trial a configured provider lane on a single run.",
            "default": "auto"
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}