{
  "openapi": "3.1.0",
  "info": {
    "title": "百度指数每日关键词搜索指数 API (V1)",
    "version": "v0",
    "description": "检索一个关键词、日历日、地区和设备范围的百度搜索指数。请使用单独请求来比较关键词、地区或日期。"
  },
  "servers": [
    {
      "url": "https://api.justoneapi.com",
      "description": "全球生产 API（默认）"
    }
  ],
  "tags": [
    {
      "name": "百度指数",
      "description": "按关键词、日期、地区和设备划分的每日百度搜索指数，用于搜索兴趣研究。",
      "x-platform-id": "baidu-index",
      "x-platform-aliases": [
        "Baidu Index",
        "百度指数",
        "百度搜索指数"
      ],
      "x-platform-detection-aliases": [
        "Baidu Index",
        "百度指数",
        "百度搜索指数"
      ]
    }
  ],
  "paths": {
    "/api/baidu-index/get-keyword-index/v1": {
      "get": {
        "tags": [
          "百度指数"
        ],
        "summary": "每日关键词搜索指数",
        "description": "检索一个关键词、日历日、地区和设备范围的百度搜索指数。请使用单独请求来比较关键词、地区或日期。",
        "operationId": "getApiBaiduIndexGetKeywordIndexV1",
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "description": "此API服务的鉴权令牌。",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "keyword",
            "in": "query",
            "description": "一个不超过 20 个字符的关键词。",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 20,
              "minLength": 1
            }
          },
          {
            "name": "date",
            "in": "query",
            "description": "中国时间（UTC+8）的一个过去日历日期，格式为 YYYY-MM-DD。",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "regionScope",
            "in": "query",
            "description": "一个地理范围。",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "NATIONAL",
                "PROVINCE",
                "CITY"
              ]
            }
          },
          {
            "name": "regionName",
            "in": "query",
            "description": "一个省或市的中文名称。PROVINCE 或 CITY 必填。NATIONAL 则省略。",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "device",
            "in": "query",
            "description": "一个设备范围。ALL 选择 PC 和移动端综合指数。",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "ALL",
                "PC",
                "MOBILE"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "好的",
            "content": {
              "application/json": {
                "schema": {
                  "if": {
                    "properties": {
                      "code": {
                        "const": 0
                      }
                    },
                    "required": [
                      "code"
                    ]
                  },
                  "then": {
                    "properties": {
                      "data": {
                        "type": "object",
                        "properties": {
                          "keyword": {
                            "type": "string",
                            "description": "与此每日搜索指数关联的关键词。"
                          },
                          "date": {
                            "type": "string",
                            "format": "date",
                            "description": "搜索指数的中国时间（UTC+8）日历日期。"
                          },
                          "regionScope": {
                            "type": "string",
                            "description": "搜索指数的地理范围。",
                            "enum": [
                              "NATIONAL",
                              "PROVINCE",
                              "CITY"
                            ]
                          },
                          "regionName": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "中国省份或城市名称，全国数据则为 null。"
                          },
                          "device": {
                            "type": "string",
                            "description": "搜索指数的设备范围。",
                            "enum": [
                              "ALL",
                              "PC",
                              "MOBILE"
                            ]
                          },
                          "searchIndex": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "format": "int64",
                            "description": "每日百度搜索指数，无可用指数值时为 null。",
                            "minimum": 0
                          }
                        },
                        "required": [
                          "date",
                          "device",
                          "keyword",
                          "regionName",
                          "regionScope",
                          "searchIndex"
                        ]
                      }
                    }
                  },
                  "allOf": [
                    {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "integer",
                          "format": "int32",
                          "enum": [
                            0,
                            100,
                            101,
                            202,
                            300,
                            301,
                            302,
                            303,
                            400,
                            404,
                            500,
                            503,
                            600,
                            601,
                            602
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "data": {},
                        "recordTime": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "requestId": {
                          "type": "string"
                        },
                        "reason": {
                          "type": "string"
                        },
                        "requestParams": {
                          "type": "object",
                          "properties": {
                            "query": {
                              "type": "object",
                              "additionalProperties": {
                                "type": "object"
                              }
                            },
                            "body": {
                              "type": "object",
                              "properties": {
                                "empty": {
                                  "type": "boolean"
                                },
                                "array": {
                                  "type": "boolean"
                                },
                                "null": {
                                  "type": "boolean"
                                },
                                "object": {
                                  "type": "boolean"
                                },
                                "float": {
                                  "type": "boolean"
                                },
                                "missingNode": {
                                  "type": "boolean"
                                },
                                "valueNode": {
                                  "type": "boolean"
                                },
                                "container": {
                                  "type": "boolean"
                                },
                                "integralNumber": {
                                  "type": "boolean"
                                },
                                "floatingPointNumber": {
                                  "type": "boolean"
                                },
                                "nodeType": {
                                  "type": "string",
                                  "enum": [
                                    "ARRAY",
                                    "BINARY",
                                    "BOOLEAN",
                                    "MISSING",
                                    "NULL",
                                    "NUMBER",
                                    "OBJECT",
                                    "POJO",
                                    "STRING"
                                  ]
                                },
                                "string": {
                                  "type": "boolean"
                                },
                                "pojo": {
                                  "type": "boolean"
                                },
                                "short": {
                                  "type": "boolean"
                                },
                                "int": {
                                  "type": "boolean"
                                },
                                "long": {
                                  "type": "boolean"
                                },
                                "double": {
                                  "type": "boolean"
                                },
                                "bigDecimal": {
                                  "type": "boolean"
                                },
                                "bigInteger": {
                                  "type": "boolean"
                                },
                                "textual": {
                                  "type": "boolean",
                                  "deprecated": true
                                },
                                "boolean": {
                                  "type": "boolean"
                                },
                                "binary": {
                                  "type": "boolean"
                                },
                                "number": {
                                  "type": "boolean"
                                },
                                "embeddedValue": {
                                  "type": "boolean"
                                }
                              }
                            }
                          }
                        }
                      },
                      "required": [
                        "code",
                        "data",
                        "message",
                        "recordTime"
                      ]
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "请求参数或请求体无效",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "format": "int32",
                      "enum": [
                        0,
                        100,
                        101,
                        202,
                        300,
                        301,
                        302,
                        303,
                        400,
                        404,
                        500,
                        503,
                        600,
                        601,
                        602
                      ]
                    },
                    "message": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "data": {},
                    "recordTime": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "requestId": {
                      "type": "string"
                    },
                    "reason": {
                      "type": "string"
                    },
                    "requestParams": {
                      "type": "object",
                      "properties": {
                        "query": {
                          "type": "object",
                          "additionalProperties": {
                            "type": "object"
                          }
                        },
                        "body": {
                          "type": "object",
                          "properties": {
                            "empty": {
                              "type": "boolean"
                            },
                            "array": {
                              "type": "boolean"
                            },
                            "null": {
                              "type": "boolean"
                            },
                            "object": {
                              "type": "boolean"
                            },
                            "float": {
                              "type": "boolean"
                            },
                            "missingNode": {
                              "type": "boolean"
                            },
                            "valueNode": {
                              "type": "boolean"
                            },
                            "container": {
                              "type": "boolean"
                            },
                            "integralNumber": {
                              "type": "boolean"
                            },
                            "floatingPointNumber": {
                              "type": "boolean"
                            },
                            "nodeType": {
                              "type": "string",
                              "enum": [
                                "ARRAY",
                                "BINARY",
                                "BOOLEAN",
                                "MISSING",
                                "NULL",
                                "NUMBER",
                                "OBJECT",
                                "POJO",
                                "STRING"
                              ]
                            },
                            "string": {
                              "type": "boolean"
                            },
                            "pojo": {
                              "type": "boolean"
                            },
                            "short": {
                              "type": "boolean"
                            },
                            "int": {
                              "type": "boolean"
                            },
                            "long": {
                              "type": "boolean"
                            },
                            "double": {
                              "type": "boolean"
                            },
                            "bigDecimal": {
                              "type": "boolean"
                            },
                            "bigInteger": {
                              "type": "boolean"
                            },
                            "textual": {
                              "type": "boolean",
                              "deprecated": true
                            },
                            "boolean": {
                              "type": "boolean"
                            },
                            "binary": {
                              "type": "boolean"
                            },
                            "number": {
                              "type": "boolean"
                            },
                            "embeddedValue": {
                              "type": "boolean"
                            }
                          }
                        }
                      }
                    }
                  },
                  "required": [
                    "code",
                    "data",
                    "message",
                    "recordTime"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "访问令牌无效或未激活",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "format": "int32",
                      "enum": [
                        0,
                        100,
                        101,
                        202,
                        300,
                        301,
                        302,
                        303,
                        400,
                        404,
                        500,
                        503,
                        600,
                        601,
                        602
                      ]
                    },
                    "message": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "data": {},
                    "recordTime": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "requestId": {
                      "type": "string"
                    },
                    "reason": {
                      "type": "string"
                    },
                    "requestParams": {
                      "type": "object",
                      "properties": {
                        "query": {
                          "type": "object",
                          "additionalProperties": {
                            "type": "object"
                          }
                        },
                        "body": {
                          "type": "object",
                          "properties": {
                            "empty": {
                              "type": "boolean"
                            },
                            "array": {
                              "type": "boolean"
                            },
                            "null": {
                              "type": "boolean"
                            },
                            "object": {
                              "type": "boolean"
                            },
                            "float": {
                              "type": "boolean"
                            },
                            "missingNode": {
                              "type": "boolean"
                            },
                            "valueNode": {
                              "type": "boolean"
                            },
                            "container": {
                              "type": "boolean"
                            },
                            "integralNumber": {
                              "type": "boolean"
                            },
                            "floatingPointNumber": {
                              "type": "boolean"
                            },
                            "nodeType": {
                              "type": "string",
                              "enum": [
                                "ARRAY",
                                "BINARY",
                                "BOOLEAN",
                                "MISSING",
                                "NULL",
                                "NUMBER",
                                "OBJECT",
                                "POJO",
                                "STRING"
                              ]
                            },
                            "string": {
                              "type": "boolean"
                            },
                            "pojo": {
                              "type": "boolean"
                            },
                            "short": {
                              "type": "boolean"
                            },
                            "int": {
                              "type": "boolean"
                            },
                            "long": {
                              "type": "boolean"
                            },
                            "double": {
                              "type": "boolean"
                            },
                            "bigDecimal": {
                              "type": "boolean"
                            },
                            "bigInteger": {
                              "type": "boolean"
                            },
                            "textual": {
                              "type": "boolean",
                              "deprecated": true
                            },
                            "boolean": {
                              "type": "boolean"
                            },
                            "binary": {
                              "type": "boolean"
                            },
                            "number": {
                              "type": "boolean"
                            },
                            "embeddedValue": {
                              "type": "boolean"
                            }
                          }
                        }
                      }
                    }
                  },
                  "required": [
                    "code",
                    "data",
                    "message",
                    "recordTime"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "权限不足",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "format": "int32",
                      "enum": [
                        0,
                        100,
                        101,
                        202,
                        300,
                        301,
                        302,
                        303,
                        400,
                        404,
                        500,
                        503,
                        600,
                        601,
                        602
                      ]
                    },
                    "message": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "data": {},
                    "recordTime": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "requestId": {
                      "type": "string"
                    },
                    "reason": {
                      "type": "string"
                    },
                    "requestParams": {
                      "type": "object",
                      "properties": {
                        "query": {
                          "type": "object",
                          "additionalProperties": {
                            "type": "object"
                          }
                        },
                        "body": {
                          "type": "object",
                          "properties": {
                            "empty": {
                              "type": "boolean"
                            },
                            "array": {
                              "type": "boolean"
                            },
                            "null": {
                              "type": "boolean"
                            },
                            "object": {
                              "type": "boolean"
                            },
                            "float": {
                              "type": "boolean"
                            },
                            "missingNode": {
                              "type": "boolean"
                            },
                            "valueNode": {
                              "type": "boolean"
                            },
                            "container": {
                              "type": "boolean"
                            },
                            "integralNumber": {
                              "type": "boolean"
                            },
                            "floatingPointNumber": {
                              "type": "boolean"
                            },
                            "nodeType": {
                              "type": "string",
                              "enum": [
                                "ARRAY",
                                "BINARY",
                                "BOOLEAN",
                                "MISSING",
                                "NULL",
                                "NUMBER",
                                "OBJECT",
                                "POJO",
                                "STRING"
                              ]
                            },
                            "string": {
                              "type": "boolean"
                            },
                            "pojo": {
                              "type": "boolean"
                            },
                            "short": {
                              "type": "boolean"
                            },
                            "int": {
                              "type": "boolean"
                            },
                            "long": {
                              "type": "boolean"
                            },
                            "double": {
                              "type": "boolean"
                            },
                            "bigDecimal": {
                              "type": "boolean"
                            },
                            "bigInteger": {
                              "type": "boolean"
                            },
                            "textual": {
                              "type": "boolean",
                              "deprecated": true
                            },
                            "boolean": {
                              "type": "boolean"
                            },
                            "binary": {
                              "type": "boolean"
                            },
                            "number": {
                              "type": "boolean"
                            },
                            "embeddedValue": {
                              "type": "boolean"
                            }
                          }
                        }
                      }
                    }
                  },
                  "required": [
                    "code",
                    "data",
                    "message",
                    "recordTime"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "请求速率或每日配额已超限",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "format": "int32",
                      "enum": [
                        0,
                        100,
                        101,
                        202,
                        300,
                        301,
                        302,
                        303,
                        400,
                        404,
                        500,
                        503,
                        600,
                        601,
                        602
                      ]
                    },
                    "message": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "data": {},
                    "recordTime": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "requestId": {
                      "type": "string"
                    },
                    "reason": {
                      "type": "string"
                    },
                    "requestParams": {
                      "type": "object",
                      "properties": {
                        "query": {
                          "type": "object",
                          "additionalProperties": {
                            "type": "object"
                          }
                        },
                        "body": {
                          "type": "object",
                          "properties": {
                            "empty": {
                              "type": "boolean"
                            },
                            "array": {
                              "type": "boolean"
                            },
                            "null": {
                              "type": "boolean"
                            },
                            "object": {
                              "type": "boolean"
                            },
                            "float": {
                              "type": "boolean"
                            },
                            "missingNode": {
                              "type": "boolean"
                            },
                            "valueNode": {
                              "type": "boolean"
                            },
                            "container": {
                              "type": "boolean"
                            },
                            "integralNumber": {
                              "type": "boolean"
                            },
                            "floatingPointNumber": {
                              "type": "boolean"
                            },
                            "nodeType": {
                              "type": "string",
                              "enum": [
                                "ARRAY",
                                "BINARY",
                                "BOOLEAN",
                                "MISSING",
                                "NULL",
                                "NUMBER",
                                "OBJECT",
                                "POJO",
                                "STRING"
                              ]
                            },
                            "string": {
                              "type": "boolean"
                            },
                            "pojo": {
                              "type": "boolean"
                            },
                            "short": {
                              "type": "boolean"
                            },
                            "int": {
                              "type": "boolean"
                            },
                            "long": {
                              "type": "boolean"
                            },
                            "double": {
                              "type": "boolean"
                            },
                            "bigDecimal": {
                              "type": "boolean"
                            },
                            "bigInteger": {
                              "type": "boolean"
                            },
                            "textual": {
                              "type": "boolean",
                              "deprecated": true
                            },
                            "boolean": {
                              "type": "boolean"
                            },
                            "binary": {
                              "type": "boolean"
                            },
                            "number": {
                              "type": "boolean"
                            },
                            "embeddedValue": {
                              "type": "boolean"
                            }
                          }
                        }
                      }
                    }
                  },
                  "required": [
                    "code",
                    "data",
                    "message",
                    "recordTime"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "服务器内部错误",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "format": "int32",
                      "enum": [
                        0,
                        100,
                        101,
                        202,
                        300,
                        301,
                        302,
                        303,
                        400,
                        404,
                        500,
                        503,
                        600,
                        601,
                        602
                      ]
                    },
                    "message": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "data": {},
                    "recordTime": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "requestId": {
                      "type": "string"
                    },
                    "reason": {
                      "type": "string"
                    },
                    "requestParams": {
                      "type": "object",
                      "properties": {
                        "query": {
                          "type": "object",
                          "additionalProperties": {
                            "type": "object"
                          }
                        },
                        "body": {
                          "type": "object",
                          "properties": {
                            "empty": {
                              "type": "boolean"
                            },
                            "array": {
                              "type": "boolean"
                            },
                            "null": {
                              "type": "boolean"
                            },
                            "object": {
                              "type": "boolean"
                            },
                            "float": {
                              "type": "boolean"
                            },
                            "missingNode": {
                              "type": "boolean"
                            },
                            "valueNode": {
                              "type": "boolean"
                            },
                            "container": {
                              "type": "boolean"
                            },
                            "integralNumber": {
                              "type": "boolean"
                            },
                            "floatingPointNumber": {
                              "type": "boolean"
                            },
                            "nodeType": {
                              "type": "string",
                              "enum": [
                                "ARRAY",
                                "BINARY",
                                "BOOLEAN",
                                "MISSING",
                                "NULL",
                                "NUMBER",
                                "OBJECT",
                                "POJO",
                                "STRING"
                              ]
                            },
                            "string": {
                              "type": "boolean"
                            },
                            "pojo": {
                              "type": "boolean"
                            },
                            "short": {
                              "type": "boolean"
                            },
                            "int": {
                              "type": "boolean"
                            },
                            "long": {
                              "type": "boolean"
                            },
                            "double": {
                              "type": "boolean"
                            },
                            "bigDecimal": {
                              "type": "boolean"
                            },
                            "bigInteger": {
                              "type": "boolean"
                            },
                            "textual": {
                              "type": "boolean",
                              "deprecated": true
                            },
                            "boolean": {
                              "type": "boolean"
                            },
                            "binary": {
                              "type": "boolean"
                            },
                            "number": {
                              "type": "boolean"
                            },
                            "embeddedValue": {
                              "type": "boolean"
                            }
                          }
                        }
                      }
                    }
                  },
                  "required": [
                    "code",
                    "data",
                    "message",
                    "recordTime"
                  ]
                }
              }
            }
          },
          "503": {
            "description": "服务暂时不可用",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "format": "int32",
                      "enum": [
                        0,
                        100,
                        101,
                        202,
                        300,
                        301,
                        302,
                        303,
                        400,
                        404,
                        500,
                        503,
                        600,
                        601,
                        602
                      ]
                    },
                    "message": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "data": {},
                    "recordTime": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "requestId": {
                      "type": "string"
                    },
                    "reason": {
                      "type": "string"
                    },
                    "requestParams": {
                      "type": "object",
                      "properties": {
                        "query": {
                          "type": "object",
                          "additionalProperties": {
                            "type": "object"
                          }
                        },
                        "body": {
                          "type": "object",
                          "properties": {
                            "empty": {
                              "type": "boolean"
                            },
                            "array": {
                              "type": "boolean"
                            },
                            "null": {
                              "type": "boolean"
                            },
                            "object": {
                              "type": "boolean"
                            },
                            "float": {
                              "type": "boolean"
                            },
                            "missingNode": {
                              "type": "boolean"
                            },
                            "valueNode": {
                              "type": "boolean"
                            },
                            "container": {
                              "type": "boolean"
                            },
                            "integralNumber": {
                              "type": "boolean"
                            },
                            "floatingPointNumber": {
                              "type": "boolean"
                            },
                            "nodeType": {
                              "type": "string",
                              "enum": [
                                "ARRAY",
                                "BINARY",
                                "BOOLEAN",
                                "MISSING",
                                "NULL",
                                "NUMBER",
                                "OBJECT",
                                "POJO",
                                "STRING"
                              ]
                            },
                            "string": {
                              "type": "boolean"
                            },
                            "pojo": {
                              "type": "boolean"
                            },
                            "short": {
                              "type": "boolean"
                            },
                            "int": {
                              "type": "boolean"
                            },
                            "long": {
                              "type": "boolean"
                            },
                            "double": {
                              "type": "boolean"
                            },
                            "bigDecimal": {
                              "type": "boolean"
                            },
                            "bigInteger": {
                              "type": "boolean"
                            },
                            "textual": {
                              "type": "boolean",
                              "deprecated": true
                            },
                            "boolean": {
                              "type": "boolean"
                            },
                            "binary": {
                              "type": "boolean"
                            },
                            "number": {
                              "type": "boolean"
                            },
                            "embeddedValue": {
                              "type": "boolean"
                            }
                          }
                        }
                      }
                    }
                  },
                  "required": [
                    "code",
                    "data",
                    "message",
                    "recordTime"
                  ]
                }
              }
            }
          }
        },
        "x-order": "14801000",
        "x-api-version": "v1",
        "x-docs-slug": "keyword-index-v1",
        "x-search-aliases": [
          "百度指数",
          "百度搜索指数"
        ],
        "x-highlights": [],
        "x-endpoint-family": "baidu_index_get_keyword_index"
      }
    }
  }
}