{
  "openapi": "3.0.1",
  "info": {
    "title": "CN/HK Financial Report Facts Index",
    "description": "CN/HK financial report facts index for A-share and HK; supports scan and section retrieval with 2023-2025 historical reports and 2026+ daily incremental updates.",
    "version": "0.1",
    "x-build-id": "aFoTSwvBEyU9rAZHh"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/huhoo~cn-hk-financial-facts-index/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-huhoo-cn-hk-financial-facts-index",
        "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/huhoo~cn-hk-financial-facts-index/runs": {
      "post": {
        "operationId": "runs-sync-huhoo-cn-hk-financial-facts-index",
        "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/huhoo~cn-hk-financial-facts-index/run-sync": {
      "post": {
        "operationId": "run-sync-huhoo-cn-hk-financial-facts-index",
        "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": {
          "mcpBaseUrl": {
            "title": "MCP Base URL",
            "type": "string",
            "description": "Base URL of the MCP service, e.g. https://mcp.cuecue.cn. Full endpoint is combined as {base}{path}.",
            "default": "https://mcp.cuecue.cn"
          },
          "mcpPath": {
            "title": "MCP Path",
            "type": "string",
            "description": "MCP route path for the financial facts index. Recommended: /api/fr_fact_index/mcp or /api/fr_fact_index/mcp/",
            "default": "/api/fr_fact_index/mcp"
          },
          "mode": {
            "title": "Run mode",
            "enum": [
              "scan",
              "section"
            ],
            "type": "string",
            "description": "scan = semantic search by query or anchor; section = full section by stockCode + sectionKey.",
            "default": "scan"
          },
          "market": {
            "title": "Market",
            "enum": [
              "cn",
              "hk",
              "both"
            ],
            "type": "string",
            "description": "cn = A-shares, hk = HK stocks, both = run both markets and merge outputs.",
            "default": "cn"
          },
          "query": {
            "title": "Query (scan)",
            "type": "string",
            "description": "Natural language query for scan mode. Provide at least one of query or anchor."
          },
          "defaultSectionKey": {
            "title": "Default sectionKey",
            "type": "string",
            "description": "Used when scan result has no anchors for quick section jump.",
            "default": "financial_report"
          },
          "autoSection": {
            "title": "Auto fetch section",
            "type": "boolean",
            "description": "If enabled in scan mode, the actor will fetch section detail for top results automatically.",
            "default": false
          },
          "autoSectionLimit": {
            "title": "Auto section limit",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "How many scan rows to auto-fetch section details for (scan mode only).",
            "default": 1
          },
          "summaryMode": {
            "title": "Summary output only",
            "type": "boolean",
            "description": "If enabled, Actor outputs only concise summary fields per row and hides raw large response objects.",
            "default": true
          },
          "outputLanguage": {
            "title": "Output language",
            "enum": [
              "zh",
              "en"
            ],
            "type": "string",
            "description": "Default `en` for Agent-friendly English-adapted fields; Chinese originals are kept in suffix Zh fields.",
            "default": "en"
          },
          "focus": {
            "title": "Focus mode",
            "enum": [
              "default",
              "investment"
            ],
            "type": "string",
            "description": "default = current behavior; investment = prioritize finance/valuation-oriented facts.",
            "default": "default"
          },
          "focusKeywords": {
            "title": "Focus keywords",
            "type": "string",
            "description": "Optional custom focus keywords, comma/semicolon/newline separated. Empty + investment focus uses built-in default keywords."
          },
          "focusKeywordMinMatch": {
            "title": "Min keyword matches for focus",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "When focus is investment, rows below this keyword match threshold are filtered out.",
            "default": 1
          },
          "anchor": {
            "title": "Section anchor (scan)",
            "type": "string",
            "description": "Optional anchor for scan mode, for example: mda, financial_report, audit_opinion, material_matters."
          },
          "period": {
            "title": "Report period",
            "type": "string",
            "description": "Report year/period (supports 2023-2025 backfill and 2026+ daily incremental updates). If empty, defaults to 2025.",
            "default": "2025"
          },
          "limit": {
            "title": "Result limit",
            "minimum": 1,
            "maximum": 30,
            "type": "integer",
            "description": "Number of rows returned in scan mode (clamped by server to 1..30).",
            "default": 15
          },
          "stockCode": {
            "title": "Stock code (section)",
            "type": "string",
            "description": "Required for section mode. Example: A-share 000630, HK stock 00388."
          },
          "sectionKey": {
            "title": "Section key (section)",
            "type": "string",
            "description": "Required for section mode. Example: mda, financial_report, audit_opinion, material_matters."
          },
          "docKey": {
            "title": "docKey (optional)",
            "type": "string",
            "description": "Optional in section mode. If provided with nodeId, actor uses docKey+nodeId directly."
          },
          "nodeId": {
            "title": "nodeId (optional)",
            "type": "string",
            "description": "Used with docKey in section mode to fetch one node in full text."
          },
          "userId": {
            "title": "X-User-Id (optional)",
            "type": "string",
            "description": "Optional billing/identity header for some environments."
          },
          "tenantId": {
            "title": "X-Tenant-Id (optional)",
            "type": "string",
            "description": "Optional tenant header for some environments."
          },
          "xInternalToken": {
            "title": "X-Internal-Token (optional)",
            "type": "string",
            "description": "Optional internal gateway token."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}