{
  "openapi": "3.0.1",
  "info": {
    "title": "Tianyancha Company Scraper 天眼查: China Company Owners & Status",
    "description": "Look up Chinese companies on Tianyancha by name, credit code, link, or keyword. Get registry details, status, capital, contacts, and risk counts, plus optional shareholders, investments, and executives. Track a watch list to see what changed.",
    "version": "0.0",
    "x-build-id": "hm0lAqe2mCaMNvEe2"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/maximedupre~tianyancha/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-maximedupre-tianyancha",
        "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/maximedupre~tianyancha/runs": {
      "post": {
        "operationId": "runs-sync-maximedupre-tianyancha",
        "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/maximedupre~tianyancha/run-sync": {
      "post": {
        "operationId": "run-sync-maximedupre-tianyancha",
        "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": [
          "findBy"
        ],
        "properties": {
          "maxItems": {
            "title": "Max companies",
            "minimum": 0,
            "type": "integer",
            "description": "The most companies to return. Leave empty or set 0 to get all companies found."
          },
          "findBy": {
            "title": "Find companies by",
            "enum": [
              "companyList",
              "keywordSearch"
            ],
            "type": "string",
            "description": "Company list looks up the exact companies you enter. Keyword search finds companies on Tianyancha that match your keywords."
          },
          "companies": {
            "title": "Companies",
            "type": "array",
            "description": "Enter one company per line. Use a full company name, a unified social credit code, a registration number, a Tianyancha company link, or a Tianyancha company id. Each value must match one company exactly. Values with no exact match are reported and skipped.",
            "items": {
              "type": "string"
            }
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Enter one search keyword per line. Each keyword is searched on Tianyancha, and companies come back in search order.",
            "items": {
              "type": "string"
            }
          },
          "searchArea": {
            "title": "Search each keyword by area",
            "enum": [
              "country",
              "province",
              "city"
            ],
            "type": "string",
            "description": "One search returns a limited number of companies. Search each keyword once per province or once per city to find more. A company found twice is returned only once. Leave empty to search the whole country once."
          },
          "watchListName": {
            "title": "Watch list name",
            "type": "string",
            "description": "Give your watch list a name to track its companies across runs. Use the same name each time. Each company then shows if it is new, changed, closed, or reopened since the last run with that name, plus the registry fields that changed. A company counts as closed only when the registry shows it as cancelled. Works with both Company list and Keyword search. Leave empty to skip tracking."
          },
          "includeShareholders": {
            "title": "Include shareholders",
            "type": "boolean",
            "description": "Add each company's shareholders, with holder type, direct and indirect ownership percent, and controller or beneficial owner roles.",
            "default": false
          },
          "maxShareholdersPerCompany": {
            "title": "Max shareholders per company",
            "minimum": 0,
            "type": "integer",
            "description": "The most shareholders to add for each company, where available. Set 0 to get all of them. Used only when Include shareholders is on.",
            "default": 20
          },
          "includeInvestments": {
            "title": "Include investments",
            "type": "boolean",
            "description": "Add the companies each company invests in, with stake percent, invested capital, and status.",
            "default": false
          },
          "maxInvestmentsPerCompany": {
            "title": "Max investments per company",
            "minimum": 0,
            "type": "integer",
            "description": "The most investments to add for each company, where available. Set 0 to get all of them. Used only when Include investments is on.",
            "default": 20
          },
          "includeExecutives": {
            "title": "Include executives",
            "type": "boolean",
            "description": "Add each company's executives and directors with their positions. For listed companies, term dates and education are added where available.",
            "default": false
          },
          "maxExecutivesPerCompany": {
            "title": "Max executives per company",
            "minimum": 0,
            "type": "integer",
            "description": "The most executives to add for each company, where available. Set 0 to get all of them. Used only when Include executives is on.",
            "default": 20
          }
        }
      },
      "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}