{
  "openapi": "3.0.1",
  "info": {
    "title": "Keyword Demand, Search Volume & CPC Valuation Engine",
    "description": "Calculate Google search volumes, Google Ads CPC (low/high/avg), search intent classification, and long-tail metro expansion across US/CA. Calculates total market volume and monthly traffic value ($/mo) with instant DEMANDE FORTE / MOYENNE / FAIBLE verdict.",
    "version": "0.1",
    "x-build-id": "JOKLztXt5S95ufr6Z"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/vesper_studio~demand-check/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-vesper_studio-demand-check",
        "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/vesper_studio~demand-check/runs": {
      "post": {
        "operationId": "runs-sync-vesper_studio-demand-check",
        "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/vesper_studio~demand-check/run-sync": {
      "post": {
        "operationId": "run-sync-vesper_studio-demand-check",
        "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": [
          "seeds"
        ],
        "properties": {
          "seeds": {
            "title": "Keyword Seeds",
            "type": "array",
            "description": "Initial root keyword seeds to expand and evaluate (e.g. ['septic tank pumping'] or ['mobile home movers', 'mobile home transport']).",
            "default": [
              "septic tank pumping"
            ],
            "items": {
              "type": "string"
            }
          },
          "niche_name": {
            "title": "Niche Label (Optional)",
            "type": "string",
            "description": "Custom display name for the niche report. Defaults to the first seed keyword."
          },
          "country": {
            "title": "Target Country",
            "enum": [
              "us",
              "ca",
              "gb",
              "fr",
              "de",
              "au"
            ],
            "type": "string",
            "description": "Two-letter ISO country code for Google search and Google Ads metrics.",
            "default": "us"
          },
          "lang": {
            "title": "Language",
            "type": "string",
            "description": "Search and autocompletion language code (e.g. 'en', 'fr').",
            "default": "en"
          },
          "places": {
            "title": "Metro Areas / Cities",
            "type": "string",
            "description": "City expansion preset or custom pipe-separated list. Options: 'top50' (50 largest US metros), 'top25' (Canada top metros with Montreal/Quebec), 'top10', or custom 'Houston TX|Phoenix AZ'.",
            "default": "top50"
          },
          "include_letters": {
            "title": "Expand Alphabet a-z",
            "type": "boolean",
            "description": "Query Google Suggest with alphabetical suffixes ('seed a', 'seed b'...) to uncover deep long-tail searches.",
            "default": false
          },
          "ctr": {
            "title": "Click-Through Rate (CTR) Hypothesis",
            "minimum": 0.01,
            "maximum": 1,
            "type": "number",
            "description": "Estimated click-through rate to calculate monthly traffic commercial value (default 0.30 = 30%). Formula: Σ volume × CPC × CTR.",
            "default": 0.3
          },
          "max_usd": {
            "title": "Budget Limit ($ USD)",
            "minimum": 0.25,
            "maximum": 50,
            "type": "number",
            "description": "Maximum paid API spending allowed before automatic clean stop (default $2.00).",
            "default": 2
          },
          "skip_serp": {
            "title": "Skip Google SERP Sample Check",
            "type": "boolean",
            "description": "Skip checking Google Ads and Local Pack Maps on the 10-query sample (faster run).",
            "default": false
          },
          "apify_token": {
            "title": "Apify Personal API Token (Optional)",
            "type": "string",
            "description": "Optional: Override Apify token for keyword metrics API calls. If empty, uses container environment variable APIFY_TOKEN."
          },
          "brightdata_api_token": {
            "title": "Bright Data API Token (Optional)",
            "type": "string",
            "description": "Optional: Bright Data API token for SERP API and Web Unlocker fallback. If empty, uses container environment variables."
          },
          "brightdata_serp_zone": {
            "title": "Bright Data SERP Zone",
            "type": "string",
            "description": "Zone name for Bright Data SERP API.",
            "default": "serp"
          },
          "brightdata_unlocker_zone": {
            "title": "Bright Data Web Unlocker Zone",
            "type": "string",
            "description": "Zone name for Bright Data Web Unlocker.",
            "default": "unlocker"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}