{
  "openapi": "3.0.1",
  "info": {
    "title": "Naver Search Scraper (통합검색)",
    "description": "Scrape Naver integrated search (통합검색) results as ranked blocks — 파워링크 ads, 블로그, 카페, 지식iN, 뉴스, 플레이스, 쇼핑, 웹사이트 and more — for any keyword. One dataset item per SERP page.",
    "version": "0.1",
    "x-build-id": "u9OV7AGYcsVm5c25G"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/hgservices~naver-search-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-hgservices-naver-search-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/hgservices~naver-search-scraper/runs": {
      "post": {
        "operationId": "runs-sync-hgservices-naver-search-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/hgservices~naver-search-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-hgservices-naver-search-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",
        "required": [
          "queries"
        ],
        "properties": {
          "queries": {
            "title": "🔍 Search terms",
            "type": "array",
            "description": "What you'd type into the Naver search bar. One term per line — e.g. 삼겹살, 강남 맛집, 아이폰 15. Korean terms match best. Each term is searched separately.",
            "items": {
              "type": "string"
            }
          },
          "searchType": {
            "title": "Search surface",
            "enum": [
              "integrated",
              "web",
              "blog",
              "cafe",
              "kin",
              "news",
              "shopping",
              "image",
              "video",
              "influencer"
            ],
            "type": "string",
            "description": "Which Naver search to scrape. '통합검색 (integrated)' is the blended results page most users see and is the default. The others scrape a single vertical's ranked list.",
            "default": "integrated"
          },
          "maxPagesPerQuery": {
            "title": "📄 Max pages per query",
            "minimum": 1,
            "type": "integer",
            "description": "How many result pages to scrape for each term (~10 results/page for most verticals). You are billed per SERP page scraped.",
            "default": 1
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "relevance",
              "date_desc",
              "date_asc"
            ],
            "type": "string",
            "description": "Result ordering. Naver's default is relevance; date sorting applies where Naver supports it (blog, café, news).",
            "default": "relevance"
          },
          "dateRange": {
            "title": "📅 Date range",
            "enum": [
              "",
              "1d",
              "1w",
              "1m",
              "6m",
              "1y"
            ],
            "type": "string",
            "description": "Restrict results to a recent time window (where Naver supports it). Leave as 'Any time' for no filter.",
            "default": ""
          },
          "includeAds": {
            "title": "Include ads (파워링크)",
            "type": "boolean",
            "description": "Capture paid 파워링크 / 비즈사이트 ad blocks alongside organic results. Turn off to keep only organic blocks.",
            "default": true
          },
          "blocks": {
            "title": "Keep only these blocks",
            "type": "array",
            "description": "For 통합검색, restrict output to specific block types (leave empty to keep every block in ranked order). Values: powerlink, influencer, blog, cafe, kin, news, place, shopping, image, video, web.",
            "items": {
              "type": "string"
            }
          },
          "mobileResults": {
            "title": "Mobile results",
            "type": "boolean",
            "description": "Scrape the mobile layout (m.search.naver.com) instead of desktop. Mobile and desktop SERPs differ in blocks and ordering.",
            "default": false
          },
          "saveHtml": {
            "title": "Save raw HTML",
            "type": "boolean",
            "description": "Store each SERP page's raw HTML in the key-value store (referenced by 'htmlSnapshotKey' in the output). Useful for debugging or tuning extraction.",
            "default": false
          },
          "useOpenApi": {
            "title": "Enrich via Naver Open API",
            "type": "boolean",
            "description": "Additionally query Naver's official Search Open API (clean per-vertical JSON) and attach it as 'openApiResults'. Requires your own Naver developer credentials below. This is optional enrichment — the scraped SERP is always the primary output.",
            "default": false
          },
          "naverClientId": {
            "title": "Naver Client ID",
            "type": "string",
            "description": "Your Naver Open API Client ID (X-Naver-Client-Id). Only used when 'Enrich via Naver Open API' is on."
          },
          "naverClientSecret": {
            "title": "Naver Client Secret",
            "type": "string",
            "description": "Your Naver Open API Client Secret (X-Naver-Client-Secret). Only used when 'Enrich via Naver Open API' is on."
          },
          "language": {
            "title": "🌍 Language",
            "enum": [
              "ko",
              "en"
            ],
            "type": "string",
            "description": "Accept-Language hint sent to Naver. Korean is strongly recommended — Naver serves Korean results regardless, and non-Korean hints can trigger stricter bot checks.",
            "default": "ko"
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Maximum SERP pages fetched in parallel. Naver rate-limits aggressively; the Actor also self-throttles, so keep this modest.",
            "default": 5
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}