{
  "openapi": "3.0.1",
  "info": {
    "title": "Brave Search API",
    "description": "The fastest, cheapest, and most privacy-focused way to scrape search engine results (SERPs). A robust alternative to Google Search API. Brave Search Scraper allows you to extract real-time search results from the Brave Search engine without worrying about CAPTCHA's or complex anti-bot systems.",
    "version": "0.0",
    "x-build-id": "VUHt9nPi6yudcLbRX"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/visita~brave-search-api/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-visita-brave-search-api",
        "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/visita~brave-search-api/runs": {
      "post": {
        "operationId": "runs-sync-visita-brave-search-api",
        "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/visita~brave-search-api/run-sync": {
      "post": {
        "operationId": "run-sync-visita-brave-search-api",
        "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",
          "mode"
        ],
        "properties": {
          "apiKey": {
            "title": "🔑 Brave Search API Key",
            "type": "string",
            "description": "Primary key for Web, News, Video, and Image search."
          },
          "apiKeySuggest": {
            "title": "💡 Suggest API Key (Optional)",
            "type": "string",
            "description": "Specific key for Autocomplete/Suggest. If left empty, the Search Key will be used."
          },
          "apiKeySpellcheck": {
            "title": "✍️ Spellcheck API Key (Optional)",
            "type": "string",
            "description": "Specific key for Spellcheck. If left empty, the Search Key will be used."
          },
          "mode": {
            "title": "🛠️ Task Mode",
            "enum": [
              "search",
              "suggest",
              "spellcheck"
            ],
            "type": "string",
            "description": "Select the operation mode.",
            "default": "search"
          },
          "queries": {
            "title": "🔎 Search Queries",
            "type": "array",
            "description": "Enter one or more queries to process.",
            "items": {
              "type": "string"
            }
          },
          "country": {
            "title": "📍 Country",
            "enum": [
              "ALL",
              "ZA",
              "US",
              "GB",
              "AR",
              "AU",
              "AT",
              "BE",
              "BR",
              "CA",
              "CL",
              "CN",
              "DK",
              "FI",
              "FR",
              "DE",
              "GR",
              "HK",
              "IN",
              "ID",
              "IT",
              "JP",
              "KR",
              "MY",
              "MX",
              "NL",
              "NZ",
              "NO",
              "PH",
              "PL",
              "PT",
              "RU",
              "SA",
              "ES",
              "SE",
              "CH",
              "TW",
              "TR"
            ],
            "type": "string",
            "description": "The country context.",
            "default": "ALL"
          },
          "maxResults": {
            "title": "🔢 Max Results (Per Query)",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Limit results per query.",
            "default": 20
          },
          "resultFilter": {
            "title": "📂 Result Content",
            "type": "array",
            "description": "Select the type of content to scrape.",
            "items": {
              "type": "string",
              "enum": [
                "web",
                "news",
                "videos",
                "images",
                "goggles"
              ],
              "enumTitles": [
                "🌐 Web Pages",
                "📰 News Articles",
                "🎥 Videos",
                "🖼️ Images",
                "🥽 Goggles (Re-ranking)"
              ]
            },
            "default": [
              "web"
            ]
          },
          "searchLang": {
            "title": "🗣️ Language",
            "enum": [
              "en",
              "en-gb",
              "af",
              "zu",
              "xh",
              "ar",
              "es",
              "fr",
              "de",
              "it",
              "pt-br",
              "ru",
              "zh-hans"
            ],
            "type": "string",
            "description": "The language of the results.",
            "default": "en"
          },
          "freshness": {
            "title": "⏰ Time Range",
            "enum": [
              "",
              "pd",
              "pw",
              "pm",
              "py"
            ],
            "type": "string",
            "description": "Filter results by time.",
            "default": ""
          },
          "autoCorrect": {
            "title": "✍️ Auto-Correct Queries",
            "type": "boolean",
            "description": "If enabled, Brave will automatically correct spelling mistakes (e.g., 'appple' -> 'apple'). Uncheck to search exactly what you typed.",
            "default": true
          },
          "safeSearch": {
            "title": "🛡️ Safe Search",
            "enum": [
              "off",
              "moderate",
              "strict"
            ],
            "type": "string",
            "description": "Filter adult content.",
            "default": "moderate"
          },
          "extraSnippets": {
            "title": "📝 Extra Snippets",
            "type": "boolean",
            "description": "Fetch up to 5 additional text excerpts per result.",
            "default": false
          },
          "goggles": {
            "title": "🥽 Goggles URL",
            "type": "string",
            "description": "URL for a custom Brave Goggle."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}