{
  "openapi": "3.0.1",
  "info": {
    "title": "Naver Finance Scraper",
    "description": "Scrape Korean stock data from Naver Finance: KOSPI and KOSDAQ prices, PER, PBR, ROE, analyst price targets, foreign and institutional flows. Export CSV, JSON, Excel, XML.",
    "version": "0.1",
    "x-build-id": "XSsccDv0ll7oQ26TR"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/parseforge~naver-finance-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-parseforge-naver-finance-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/parseforge~naver-finance-scraper/runs": {
      "post": {
        "operationId": "runs-sync-parseforge-naver-finance-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/parseforge~naver-finance-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-parseforge-naver-finance-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": {
          "startUrls": {
            "title": "Naver Finance Stock URLs",
            "type": "array",
            "description": "Paste Naver Finance stock pages, for example https://m.stock.naver.com/domestic/stock/005930 or https://finance.naver.com/item/main.naver?code=005930. Leave empty to browse a whole market or industry instead.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "stockCodes": {
            "title": "Stock Codes (ticker)",
            "uniqueItems": true,
            "type": "array",
            "description": "Six-digit Korean tickers, one per line. Example: 005930 (Samsung Electronics), 000660 (SK Hynix), 035720 (Kakao).",
            "items": {
              "type": "string"
            }
          },
          "searchTerms": {
            "title": "Company Name or Ticker Search",
            "type": "array",
            "description": "Company names in Korean or romanized English, one per line. Example: 카카오, samsung, hynix. Each term is resolved against Naver Finance and only Korean-listed matches are kept.",
            "items": {
              "type": "string"
            }
          },
          "market": {
            "title": "Browse a Market",
            "enum": [
              "",
              "KOSPI",
              "KOSDAQ"
            ],
            "type": "string",
            "description": "Scrape a whole market ranked by market capitalization. KOSPI has 2,482 listings and KOSDAQ has 1,823, both including ETFs and ETNs.",
            "default": ""
          },
          "industry": {
            "title": "Browse an Industry",
            "enum": [
              "",
              "310",
              "284",
              "326",
              "305",
              "270",
              "273",
              "301",
              "309",
              "286",
              "285",
              "320",
              "272",
              "324",
              "294",
              "293",
              "279",
              "289",
              "266",
              "337",
              "264",
              "269",
              "327",
              "265",
              "339",
              "336",
              "290",
              "325",
              "306",
              "283",
              "282",
              "307",
              "295",
              "302",
              "268",
              "303",
              "263",
              "312",
              "292",
              "281",
              "316",
              "288",
              "317",
              "298",
              "297",
              "276",
              "300",
              "308",
              "267",
              "271",
              "330",
              "262",
              "299",
              "323",
              "331",
              "322",
              "338",
              "313",
              "25",
              "319",
              "311",
              "318",
              "261",
              "315",
              "314",
              "280",
              "329",
              "321",
              "278",
              "291",
              "287",
              "328",
              "332",
              "304",
              "274",
              "275",
              "334",
              "296",
              "277",
              "333"
            ],
            "type": "string",
            "description": "Scrape every listed company in one of Naver Finance's 79 industry sectors, ranked by market capitalization.",
            "default": ""
          },
          "maxItems": {
            "title": "Max Items",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "Free users: Limited to 10 items (preview). Paid users: Optional, max 1,000,000"
          },
          "securityTypes": {
            "title": "Security Types",
            "uniqueItems": true,
            "type": "array",
            "description": "Which listing types to keep when browsing a market or industry. Naver mixes common stocks with ETFs and ETNs in the same ranking.",
            "items": {
              "type": "string",
              "enum": [
                "stock",
                "etf",
                "etn"
              ],
              "enumTitles": [
                "Common stock",
                "ETF",
                "ETN"
              ]
            },
            "default": [
              "stock",
              "etf",
              "etn"
            ]
          },
          "minMarketCapKrw": {
            "title": "Minimum Market Cap (KRW)",
            "minimum": 0,
            "type": "integer",
            "description": "Skip listings whose market capitalization is below this value in Korean won. Example: 1000000000000 keeps only companies above 1 trillion KRW (about 700 million USD)."
          },
          "includeFinancials": {
            "title": "Include Financial Statements",
            "type": "boolean",
            "description": "Add four years of annual income-statement and ratio data (16 rows including revenue, operating profit, ROE and debt ratio), with the final year flagged as an analyst forecast. Costs one extra request per stock.",
            "default": true
          },
          "includeQuarterlyFinancials": {
            "title": "Include Quarterly Financials",
            "type": "boolean",
            "description": "Add the last four reported quarters alongside the annual statements.",
            "default": false
          },
          "includePeers": {
            "title": "Include Industry Peers",
            "type": "boolean",
            "description": "Add up to six same-industry competitors with their price, change and market cap, straight from Naver's own peer comparison.",
            "default": true
          },
          "includeResearchReports": {
            "title": "Include Broker Research Reports",
            "type": "boolean",
            "description": "Add the most recent Korean brokerage reports for the stock (title, brokerage house, publication date and read count). Naver publishes at most 5 per stock.",
            "default": true
          },
          "includeInvestorTrend": {
            "title": "Include Investor Flow History",
            "type": "boolean",
            "description": "Add the daily net buy and sell volume for foreign investors, institutions and retail investors.",
            "default": false
          },
          "investorTrendDays": {
            "title": "Investor Flow Days",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "How many trading days of investor flow history to return.",
            "default": 20
          },
          "includePriceHistory": {
            "title": "Include Price History",
            "type": "boolean",
            "description": "Add daily open, high, low, close and volume history for the stock.",
            "default": false
          },
          "priceHistoryDays": {
            "title": "Price History Days",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "How many trading days of price history to return.",
            "default": 30
          },
          "proxyConfiguration": {
            "title": "Proxy Configuration",
            "type": "object",
            "description": "Naver Finance serves this data without blocking, so a proxy is off by default. Enable it if you are running very large jobs or need a specific egress country.",
            "default": {
              "useApifyProxy": false
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}