{
  "openapi": "3.0.1",
  "info": {
    "title": "Brightdata API",
    "description": "将 Bright Data API 集成到您的数据管道中，确保高精度爬取",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://api.brightdata.com"
    }
  ],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "paths": {
    "/api/{PARTNER_NAME}/ips": {
      "put": {
        "description": "",
        "parameters": [
          {
            "in": "path",
            "name": "PARTNER_NAME",
            "description": "将处理您请求的代理区域名称。",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "id",
            "description": "有效的客户 `id`",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "count",
            "description": "要分配的 IP 数量",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "zone",
            "description": "现有的区域名称",
            "required": false,
            "schema": {
              "type": "string",
              "default": "hq_static_res"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "country": {
                    "type": "string",
                    "description": "分配 IP 的国家（例如 `us`）"
                  },
                  "country_city": {
                    "type": "string",
                    "description": "分配 IP 的国家中的城市（例如 `us-newyork`）"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ip": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        }
                      ],
                      "example": [
                        "1.1.1.1",
                        "2.2.2.2"
                      ]
                    }
                  }
                }
              }
            }
          }
        }
      },
      "get": {
        "description": "",
        "parameters": [
          {
            "in": "path",
            "name": "PARTNER_NAME",
            "description": "将处理您请求的代理区域名称。",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "id",
            "description": "有效的客户 `id`",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ips": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  },
                  "example": {
                    "ips": [
                      "1.1.1.1",
                      "2.2.2.2"
                    ]
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "description": "",
        "parameters": [
          {
            "in": "path",
            "name": "PARTNER_NAME",
            "description": "将处理您请求的代理区域名称。",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "id",
            "description": "有效的客户 `id`",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "zone",
            "description": "现有的区域名称",
            "required": false,
            "schema": {
              "type": "string",
              "default": "hq_static_res"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "ips"
                ],
                "properties": {
                  "ips": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "example": [
                      "1.1.1.1"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "成功"
          }
        }
      }
    },
    "/api/{PARTNER_NAME}/usage_limit": {
      "put": {
        "description": "",
        "parameters": [
          {
            "in": "path",
            "name": "PARTNER_NAME",
            "description": "将处理您请求的代理区域名称。",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "id",
            "description": "有效的客户 `id`",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "zone",
            "description": "现有区域的名称",
            "required": false,
            "schema": {
              "type": "string",
              "default": "residential"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Limit"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "unit": {
                      "type": "string",
                      "description": "限制单位",
                      "example": "bw"
                    },
                    "until": {
                      "type": "string",
                      "example": "2023-02-14T00:00:00.000Z"
                    },
                    "start": {
                      "type": "string",
                      "example": "2022-11-15T00:00:00.000Z"
                    },
                    "bust_action": {
                      "type": "string",
                      "example": "disable"
                    },
                    "limit": {
                      "type": "integer",
                      "description": "新限制的字节数量",
                      "example": 5242880000
                    }
                  }
                }
              }
            }
          }
        }
      },
      "get": {
        "description": "",
        "parameters": [
          {
            "in": "path",
            "name": "PARTNER_NAME",
            "description": "将处理您请求的代理区域名称。",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "zone",
            "description": "现有的区域名称",
            "required": false,
            "schema": {
              "type": "string",
              "default": "hq_static_res"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "unit": {
                      "type": "string",
                      "description": "限制单位",
                      "example": "bw"
                    },
                    "until": {
                      "type": "string",
                      "example": "2023-02-14T00:00:00.000Z"
                    },
                    "start": {
                      "type": "string",
                      "example": "2022-11-15T00:00:00.000Z"
                    },
                    "bust_action": {
                      "type": "string",
                      "example": "disable"
                    },
                    "limit": {
                      "type": "integer",
                      "description": "新限制的字节数量",
                      "example": 5242880000
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/{PARTNER_NAME}/usage_webhook": {
      "post": {
        "description": "",
        "parameters": [
          {
            "in": "path",
            "name": "PARTNER_NAME",
            "description": "将处理您请求的代理区域名称。",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "id",
            "description": "有效的客户 `id`",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "zone",
            "description": "现有区域的名称",
            "required": false,
            "schema": {
              "type": "string",
              "default": "residential"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Webhook"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "成功"
          }
        }
      },
      "get": {
        "description": "",
        "parameters": [
          {
            "in": "path",
            "name": "PARTNER_NAME",
            "description": "将处理您请求的代理区域名称。",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "id",
            "description": "有效的客户 `id`",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "zone",
            "description": "现有的区域名称",
            "required": false,
            "schema": {
              "type": "string",
              "default": "hq_static_res"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "webhook": {
                      "trigger": 80
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/{PARTNER_NAME}/disable_customer": {
      "put": {
        "description": "",
        "parameters": [
          {
            "in": "path",
            "name": "PARTNER_NAME",
            "description": "将处理您请求的代理区域名称。",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "id",
            "description": "有效的客户 `id`",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功"
          }
        }
      }
    },
    "/api/{PARTNER_NAME}/enable_customer": {
      "put": {
        "description": "",
        "parameters": [
          {
            "in": "path",
            "name": "PARTNER_NAME",
            "description": "将处理您请求的代理区域名称。",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "id",
            "description": "有效的客户 `id`",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功"
          }
        }
      }
    },
    "/api/{PARTNER_NAME}/proxies": {
      "get": {
        "description": "",
        "parameters": [
          {
            "in": "path",
            "name": "PARTNER_NAME",
            "description": "将处理您请求的代理区域名称。",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "id",
            "description": "有效的客户 `id`",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "zone",
            "description": "现有的区域名称",
            "required": false,
            "schema": {
              "type": "string",
              "default": "hq_static_res"
            }
          },
          {
            "in": "query",
            "name": "country",
            "description": "国家名称（例如 `us`）",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "state",
            "description": "美国州名（例如 `ca`）",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "session",
            "description": "要生成的会话数量",
            "required": false,
            "schema": {
              "type": "number"
            }
          },
          {
            "in": "query",
            "name": "asn",
            "description": "ASN 名称。可通过 `/api/{PARTNER_NAME}/get_asn` API 获取所有可用 ASN",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "carrier",
            "description": "运营商名称。可通过 `/api/{PARTNER_NAME}/carriers` API 获取所有可用运营商",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "const",
            "description": "使用常量",
            "required": false,
            "schema": {
              "type": "number",
              "default": 1
            }
          },
          {
            "in": "query",
            "name": "split",
            "description": "如果提供，则仅编码用户名中的 `brd-customer-{CUST_ID}-zone-{ZONE}` 部分",
            "required": false,
            "schema": {
              "type": "number",
              "default": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "example": [
                    "{PARTNER_NAME_PROXY_HOST}:{PORT}:{ENCRYPTED}:{ZONE_PASSWORD}"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/{PARTNER_NAME}/socks5_proxies": {
      "get": {
        "description": "",
        "parameters": [
          {
            "in": "path",
            "name": "PARTNER_NAME",
            "description": "将处理您请求的代理区域名称。",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "id",
            "description": "有效的客户 `id`",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "zone",
            "description": "现有的区域名称",
            "required": false,
            "schema": {
              "type": "string",
              "default": "hq_static_res"
            }
          },
          {
            "in": "query",
            "name": "country",
            "description": "国家名称（例如 `us`）",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "state",
            "description": "美国州名（例如 `ca`）",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "session",
            "description": "要生成的会话数量",
            "required": false,
            "schema": {
              "type": "number"
            }
          },
          {
            "in": "query",
            "name": "asn",
            "description": "ASN 名称。可通过 `/api/{PARTNER_NAME}/get_asn` API 获取所有可用 ASN",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "carrier",
            "description": "运营商名称。可通过 `/api/{PARTNER_NAME}/carriers` API 获取所有可用运营商",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "const",
            "description": "使用常量",
            "required": false,
            "schema": {
              "type": "number",
              "default": 1
            }
          },
          {
            "in": "query",
            "name": "split",
            "description": "如果提供，则仅编码用户名中的 `brd-customer-{CUST_ID}-zone-{ZONE}` 部分",
            "required": false,
            "schema": {
              "type": "number",
              "default": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "example": [
                    "{PARTNER_NAME_PROXY_HOST}:{PORT}:{ENCRYPTED}:{ZONE_PASSWORD}"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/{PARTNER_NAME}/get_asn": {
      "get": {
        "description": "",
        "parameters": [
          {
            "in": "path",
            "name": "PARTNER_NAME",
            "description": "将处理您请求的代理区域名称。",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object"
                  },
                  "example": [
                    {
                      "asn": "1",
                      "title": "ASN 1"
                    },
                    {
                      "asn": "2",
                      "title": "ASN 2"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/{PARTNER_NAME}/shared_isp": {
      "get": {
        "description": "",
        "parameters": [
          {
            "in": "path",
            "name": "PARTNER_NAME",
            "description": "将处理您请求的代理区域名称。",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "de": 1447,
                    "gb": 1460,
                    "us": 15597
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/{PARTNER_NAME}/carriers": {
      "get": {
        "description": "",
        "parameters": [
          {
            "in": "path",
            "name": "PARTNER_NAME",
            "description": "将处理您请求的代理区域名称。",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "example": [
                    "carrier_1",
                    "carrier_2"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/{PARTNER_NAME}/countries": {
      "get": {
        "description": "",
        "parameters": [
          {
            "in": "path",
            "name": "PARTNER_NAME",
            "description": "将处理您请求的代理区域名称。",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "type",
            "description": "必填注册类型 (`residential`|`shared_dc`|`dedicated_dc`|`shared_isp`|`smart_resi`)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "more_than",
            "description": "该类型下最少可用 IP 数量",
            "required": false,
            "schema": {
              "type": "number",
              "default": 1000
            }
          },
          {
            "in": "query",
            "name": "mode",
            "description": "标记以更改输出格式。如果设置为 `raw`，API 将返回每个国家的确切 IP 数量，且忽略 `more_than`。",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "title": "mode!=raw",
                      "type": "array",
                      "example": [
                        "ae",
                        "ar",
                        "at",
                        "au"
                      ],
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "title": "mode=raw",
                      "type": "object",
                      "example": {
                        "ae": 1,
                        "ar": 2,
                        "at": 3,
                        "au": 4
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/{PARTNER_NAME}/customers": {
      "get": {
        "description": "",
        "parameters": [
          {
            "in": "path",
            "name": "PARTNER_NAME",
            "description": "将处理您请求的代理区域名称。",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "active",
            "description": "可为 `0`、`1` 或留空。\n\n如果为 `0` - 仅返回非活跃客户。\n\n如果为 `1` - 仅返回活跃客户。\n\n如果为空 - 返回全部。",
            "required": false,
            "schema": {
              "type": "number",
              "enum": [
                0,
                1,
                null
              ]
            }
          },
          {
            "in": "query",
            "name": "limit",
            "description": "每页返回的最大账户数量",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 1000
            }
          },
          {
            "in": "query",
            "name": "page",
            "description": "返回的页码",
            "required": false,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "total": 1,
                    "page": 1,
                    "pages": 1,
                    "per_page": 1,
                    "customers": [
                      {
                        "id": "ex_7f531897",
                        "start": "2024-05-02T00:00:00.000Z",
                        "active": true,
                        "zone": "dedicated_dc"
                      }
                    ]
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/{PARTNER_NAME}/carrier_ips_count": {
      "get": {
        "description": "",
        "parameters": [
          {
            "in": "path",
            "name": "PARTNER_NAME",
            "description": "将处理您请求的代理区域名称。",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "carrier",
            "description": "运营商名称（默认返回所有运营商）",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "att": 94328
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/{PARTNER_NAME}/usage_limit_stats": {
      "get": {
        "description": "",
        "parameters": [
          {
            "in": "path",
            "name": "PARTNER_NAME",
            "description": "将处理您请求的代理区域名称。",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "ids",
            "description": "有效客户的 ID 列表",
            "required": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "in": "query",
            "name": "zone",
            "description": "现有区域名称",
            "required": false,
            "schema": {
              "type": "string",
              "default": "residential"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "oc_1": {
                      "status": "已达到",
                      "usage": {
                        "used": 0,
                        "period": {
                          "start": "2022-03-05T00:00:00.000Z",
                          "until": "2022-06-04T00:00:00.000Z"
                        },
                        "limit": 5242880000
                      }
                    },
                    "oc_unlimited": {
                      "status": "无限制"
                    },
                    "oc_2": {
                      "error": "未找到客户"
                    },
                    "bad_id": {
                      "error": "ID 错误"
                    },
                    "oc_inactive": {
                      "error": "客户状态无效"
                    },
                    "oc_zone": {
                      "error": "未找到区域"
                    },
                    "oc_invalid_limit": {
                      "error": "限制无效"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/{PARTNER_NAME}/refresh_ips": {
      "put": {
        "description": "",
        "parameters": [
          {
            "in": "path",
            "name": "PARTNER_NAME",
            "description": "将处理您请求的代理区域名称。",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "id",
            "description": "有效客户 `id`",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "zone",
            "description": "现有区域名称",
            "required": false,
            "schema": {
              "type": "string",
              "default": "dedicated_dc"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "ips"
                ],
                "properties": {
                  "ips": {
                    "oneOf": [
                      {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      {
                        "type": "string"
                      }
                    ]
                  },
                  "country": {
                    "type": "string",
                    "description": "分配新 IP 的国家 (例如 `us`)",
                    "example": "us"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "ips": [
                      "1.1.1.1",
                      "2.2.2.2"
                    ],
                    "new_ips": [
                      "3.3.3.3"
                    ]
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/{PARTNER_NAME}/signup_residential": {
      "post": {
        "description": "",
        "parameters": [
          {
            "in": "path",
            "name": "PARTNER_NAME",
            "description": "将处理您请求的代理区域名称。",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "zone": {
                    "type": "string",
                    "description": "区域名称",
                    "default": "residential",
                    "example": "residential"
                  },
                  "vertical": {
                    "type": "string",
                    "description": "区域垂直类型。可以是 `sneakers_release` 或 `product_release_goods`",
                    "default": "sneakers_release|product_release_goods",
                    "example": "sneakers_release|product_release_goods"
                  },
                  "ext_cust_email": {
                    "type": "string",
                    "description": "现有可信客户的邮箱。使用 `product_release_goods` 垂直类型时需指定此参数",
                    "example": "johndoe@example.com"
                  },
                  "asn_targeting": {
                    "type": "number",
                    "description": "启用城市定向权限",
                    "default": 1,
                    "example": 1
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "id": "CUSTOMER_ID",
                    "zone": "ZONE",
                    "password": "PASSWORD",
                    "api_token": "API_KEY"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/{PARTNER_NAME}/signup_dedicated_dc": {
      "post": {
        "description": "",
        "parameters": [
          {
            "in": "path",
            "name": "PARTNER_NAME",
            "description": "将处理您请求的代理区域名称。",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "zone",
            "description": "区域名称",
            "required": false,
            "schema": {
              "type": "string",
              "default": "dedicated_dc"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "ips_amount"
                ],
                "properties": {
                  "ips_amount": {
                    "type": "number",
                    "description": "要分配的 IP 数量"
                  },
                  "country": {
                    "description": "IP 的国家代码",
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "id": "CUSTOMER_ID",
                    "zone": "ZONE",
                    "password": "PASSWORD",
                    "api_token": "API_KEY"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/{PARTNER_NAME}/signup_dedicated_isp": {
      "post": {
        "description": "",
        "parameters": [
          {
            "in": "path",
            "name": "PARTNER_NAME",
            "description": "将处理您请求的代理区域名称。",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "zone",
            "description": "区域名称",
            "required": false,
            "schema": {
              "type": "string",
              "default": "dedicated_ips"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "ips_amount"
                ],
                "properties": {
                  "ips_amount": {
                    "type": "number",
                    "description": "要分配的 IP 数量"
                  },
                  "country": {
                    "description": "IP 的国家代码",
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "id": "CUSTOMER_ID",
                    "zone": "ZONE",
                    "password": "PASSWORD",
                    "api_token": "API_KEY"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/{PARTNER_NAME}/signup_smart_resi": {
      "post": {
        "description": "",
        "parameters": [
          {
            "in": "path",
            "name": "PARTNER_NAME",
            "description": "将处理您请求的代理区域名称。",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "zone",
            "description": "区域名称",
            "required": false,
            "schema": {
              "type": "string",
              "default": "smart_resi"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "id": "CUSTOMER_ID",
                    "zone": "ZONE",
                    "password": "PASSWORD",
                    "api_token": "API_KEY"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/{PARTNER_NAME}/signup_shared_isp": {
      "post": {
        "description": "",
        "parameters": [
          {
            "in": "path",
            "name": "PARTNER_NAME",
            "description": "将处理您请求的代理区域名称。",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "zone",
            "description": "区域名称",
            "required": false,
            "schema": {
              "type": "string",
              "default": "shared_static_res"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "id": "CUSTOMER_ID",
                    "zone": "ZONE",
                    "password": "PASSWORD",
                    "api_token": "API_KEY"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/{PARTNER_NAME}/signup_shared_dc": {
      "post": {
        "description": "",
        "parameters": [
          {
            "in": "path",
            "name": "PARTNER_NAME",
            "description": "将处理您请求的代理区域名称。",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "zone",
            "description": "区域名称",
            "required": false,
            "schema": {
              "type": "string",
              "default": "shared_static_dc"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "id": "CUSTOMER_ID",
                    "zone": "ZONE",
                    "password": "PASSWORD",
                    "api_token": "API_KEY"
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Limit": {
        "required": [
          "limit",
          "unit",
          "period",
          "period_mult"
        ],
        "type": "object",
        "properties": {
          "limit": {
            "type": "integer",
            "description": "新限制的字节数",
            "example": 5242880000
          },
          "unit": {
            "type": "string",
            "description": "限制单位",
            "example": "bw"
          },
          "period": {
            "type": "string",
            "description": "单位时间（仅支持 d）",
            "example": "d"
          },
          "period_mult": {
            "type": "number",
            "description": "限制周期的天数",
            "example": 10
          }
        }
      },
      "Webhook": {
        "required": [
          "webhook"
        ],
        "type": "object",
        "properties": {
          "webhook": {
            "type": "object",
            "required": [
              "trigger"
            ],
            "properties": {
              "trigger": {
                "type": "number",
                "description": "发送 webhook 的百分比阈值"
              },
              "id": {
                "type": "string",
                "description": "自定义 webhook ID"
              }
            }
          }
        }
      },
      "PostBody": {
        "required": [
          "zone",
          "url",
          "format"
        ],
        "type": "object",
        "properties": {
          "zone": {
            "description": "将处理您请求的代理区域名称。",
            "type": "string"
          },
          "url": {
            "description": "请求的目标 URL。",
            "type": "string"
          },
          "format": {
            "description": "通过代理请求原始 HTML 的格式为 `raw`。\n\n请求 JSON 响应的格式为 `json`。",
            "type": "string",
            "enum": [
              "raw",
              "json"
            ]
          },
          "method": {
            "description": "通过代理请求 HTML 的方法为 `GET`。",
            "type": "string",
            "default": "GET"
          },
          "country": {
            "description": "请求所经过的代理的国家代码。",
            "type": "string"
          },
          "city": {
            "description": "请求所经过的代理所在城市，必须定义国家。\n\n在数据中心 & ISP 区域中支持预配置城市，在住宅和移动网络中默认支持。",
            "type": "string"
          },
          "zip": {
            "description": "请求所经过的代理的邮政编码，必须定义国家。\n\n仅支持住宅网络。",
            "type": "string"
          },
          "ASN": {
            "description": "请求所经过的代理的 ASN 代码，必须定义国家。\n\n仅支持住宅网络。",
            "type": "string"
          },
          "carrier": {
            "description": "仅移动网络：请求所经过的运营商代码。\n\n仅支持移动网络。",
            "type": "string"
          },
          "os": {
            "description": "设置在代理上的客户端操作系统。\n\n仅支持移动网络。",
            "type": "string"
          },
          "dns": {
            "description": "使用 `local` 或 `remote` 设置域名映射是在客户端本地执行还是在远程代理端执行。",
            "type": "string",
            "enum": [
              "local",
              "remote"
            ]
          },
          "session": {
            "description": "客户端用来标记会话的字符串，所有使用相同 session 参数的请求将转发到同一代理。",
            "type": "string"
          },
          "ip": {
            "description": "在数据中心和 ISP 区域：将请求转发到指定 `ip` 的代理。",
            "type": "string"
          },
          "gip": {
            "description": "在 `Residential` 和 `Mobile` 区域：将请求转发到指定 `gip` 的代理组。",
            "type": "string"
          },
          "c_tag": {
            "description": "在请求中包含唯一 `c_tag` 标识。在响应中，服务端将相同标签回传到 header。这种无缝交换确保每个响应与对应请求绑定，简化数据管理。",
            "type": "string"
          },
          "direct": {
            "description": "将参数设置为 `true` 将指示使用 Bright Data 超级代理（数据中心代理）处理请求，而非代理节点本身。",
            "type": "boolean"
          }
        }
      },
      "HTTP200": {
        "type": "string",
        "example": "OK"
      },
      "HTTP401": {
        "type": "string",
        "example": "需要用户认证"
      },
      "HTTP400": {
        "type": "string",
        "example": "错误请求"
      }
    },
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "在 Authorization 头中使用您的 Bright Data API Key 作为 Bearer token。\n\n**认证方法:**\n1. 从 Bright Data 账户设置获取您的 API Key: https://brightdata.com/cp/setting/users\n2. 在请求的 Authorization 头中包含 API Key\n3. 格式: `Authorization: Bearer YOUR_API_KEY`\n\n**示例:**\n```\nAuthorization: Bearer b5648e1096c6442f60a6c4bbbe73f8d2234d3d8324554bd6a7ec8f3f251f07df\n```\n\n了解如何获取 Bright Data API Key: https://docs.brightdata.com/cn/api-reference/authentication#如何生成新的-api-key？",
        "bearerFormat": "API Key"
      }
    }
  }
}