{
  "openapi": "3.0.1",
  "info": {
    "title": "Chinese AI Visibility Dataset Analyzer",
    "description": "Normalize existing Kimi, GLM, DeepSeek, Qwen, ChatGPT, Gemini, Perplexity and Google AI Overview datasets; score brand mentions, rank and evidence quality without calling an AI model.",
    "version": "0.1",
    "x-build-id": "dXzU57zkdug7NZPCA"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/zinin~chinese-ai-visibility-dataset-analyzer/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-zinin-chinese-ai-visibility-dataset-analyzer",
        "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/zinin~chinese-ai-visibility-dataset-analyzer/runs": {
      "post": {
        "operationId": "runs-sync-zinin-chinese-ai-visibility-dataset-analyzer",
        "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/zinin~chinese-ai-visibility-dataset-analyzer/run-sync": {
      "post": {
        "operationId": "run-sync-zinin-chinese-ai-visibility-dataset-analyzer",
        "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",
        "required": [
          "brand"
        ],
        "properties": {
          "brand": {
            "title": "Brand to track",
            "pattern": "^[^\\u0000-\\u001F\\u007F-\\u009F]+$",
            "minLength": 1,
            "maxLength": 100,
            "type": "string",
            "description": "Canonical brand name used for deterministic mention and position scoring."
          },
          "brandAliases": {
            "title": "Brand aliases",
            "maxItems": 20,
            "uniqueItems": true,
            "type": "array",
            "description": "Alternative spellings, transliterations or local-language names. Ambiguous aliases shared with competitors are flagged and not double-counted.",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100,
              "pattern": "^[^\\u0000-\\u001F\\u007F-\\u009F]+$"
            }
          },
          "competitors": {
            "title": "Competitors and aliases",
            "maxItems": 20,
            "type": "array",
            "description": "JSON array such as [{\"name\":\"Adidas\",\"aliases\":[\"Adidas AG\"]}]. Position is computed only among the tracked brand and these competitors.",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "name"
              ],
              "properties": {
                "name": {
                  "title": "Competitor name",
                  "description": "Canonical competitor name.",
                  "type": "string",
                  "editor": "textfield",
                  "minLength": 1,
                  "maxLength": 100,
                  "pattern": "^[^\\u0000-\\u001F\\u007F-\\u009F]+$"
                },
                "aliases": {
                  "title": "Competitor aliases",
                  "description": "Alternative spellings and local-language names.",
                  "type": "array",
                  "editor": "stringList",
                  "maxItems": 20,
                  "uniqueItems": true,
                  "items": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100
                  }
                }
              }
            }
          },
          "inlineRows": {
            "title": "Inline JSON rows",
            "maxItems": 1000,
            "type": "array",
            "description": "Rows from a supported collector or aiObservation 1.0. Per-row sourceActorId overrides Source actor hint.",
            "items": {
              "type": "object"
            }
          },
          "inlineCsv": {
            "title": "Inline CSV (optional)",
            "maxLength": 500000,
            "type": "string",
            "description": "Header row plus up to 1,000 records. JSON-looking cells such as sources arrays are decoded."
          },
          "sourceDatasetIds": {
            "title": "Source Dataset IDs",
            "maxItems": 10,
            "uniqueItems": true,
            "type": "array",
            "description": "Select buyer-accessible Apify Datasets. READ scope is granted only for these selected resources; source Run provenance is read from Dataset metadata when available."
          },
          "sourceDatasetHints": {
            "title": "Dataset adapter hints",
            "maxItems": 10,
            "type": "array",
            "description": "Required when Datasets are selected: one source adapter per Dataset in the same order. This keeps similar ChatGPT and Gemini row shapes mapped to the correct model family.",
            "items": {
              "type": "string"
            }
          },
          "sourceActorHint": {
            "title": "Source actor hint",
            "enum": [
              "auto",
              "fayoussef/bulk-llm-runner",
              "apify/chatgpt-search-scraper",
              "apify/google-ai-overviews-scraper",
              "apify/perplexity-search-scraper",
              "apify/gemini-search-scraper",
              "zinin/llm-brand-visibility",
              "zinin/ai-overview-tracker",
              "ai-observation-1.0"
            ],
            "type": "string",
            "description": "Optional global adapter hint for inline JSON or CSV rows. Dataset adapters are supplied positionally above. Auto-detection remains the inline default.",
            "default": "auto"
          },
          "market": {
            "title": "Fallback market",
            "minLength": 2,
            "maxLength": 80,
            "type": "string",
            "description": "Used only when a source row has no market value.",
            "default": "United States"
          },
          "language": {
            "title": "Fallback language",
            "minLength": 2,
            "maxLength": 40,
            "type": "string",
            "description": "Used only when a source row has no language value.",
            "default": "English"
          },
          "maxRows": {
            "title": "Maximum source rows",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Hard cap across every source before normalization and deduplication.",
            "default": 100
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}