{
    "openapi": "3.0.0",
    "info": {
        "title": "Alexa排名 - API文档",
        "version": "1.0.0",
        "description": "全国网站Alexa全球网站排名信息，Alexa官方已于2022年5月1日宣布停止服务，本接口不再提供。"
    },
    "servers": [
        {
            "url": "https:\/\/apis.tianapi.com"
        }
    ],
    "paths": {
        "\/alexa\/index": {
            "get": {
                "summary": "Alexa排名",
                "tags": [
                    "Alexa排名"
                ],
                "description": "查询网站Alexa流量排名",
                "parameters": [
                    {
                        "name": "key",
                        "in": "query",
                        "description": "API密钥",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "description": "API密钥"
                        }
                    },
                    {
                        "name": "domain",
                        "in": "query",
                        "description": "顶级域名",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "example": "baidu.com",
                            "description": "顶级域名"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "成功响应",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "site": {
                                            "type": "string",
                                            "example": "baidu.com",
                                            "description": "网站"
                                        },
                                        "pv_rank": {
                                            "type": "string",
                                            "example": "4",
                                            "description": "全球pv排名"
                                        },
                                        "uv_rank": {
                                            "type": "string",
                                            "example": "4",
                                            "description": "全球uv排名"
                                        },
                                        "local_code": {
                                            "type": "string",
                                            "example": "CN",
                                            "description": "地区国际代码"
                                        },
                                        "local_name": {
                                            "type": "string",
                                            "example": "China",
                                            "description": "排名参考地区"
                                        },
                                        "local_rank": {
                                            "type": "string",
                                            "example": "2",
                                            "description": "地区参考排名"
                                        },
                                        "rank_delta": {
                                            "type": "string",
                                            "example": "+0",
                                            "description": "排名变化参考值"
                                        }
                                    }
                                },
                                "example": {
                                    "msg": "success",
                                    "code": 200,
                                    "result": {
                                        "site": "baidu.com",
                                        "pv_rank": "4",
                                        "uv_rank": "4",
                                        "local_code": "CN",
                                        "local_name": "China",
                                        "local_rank": "2",
                                        "rank_delta": "+0"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "summary": "Alexa排名",
                "tags": [
                    "Alexa排名"
                ],
                "description": "查询网站Alexa流量排名",
                "requestBody": {
                    "content": {
                        "application\/x-www-form-urlencoded": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "key": {
                                        "type": "string",
                                        "description": "API密钥"
                                    },
                                    "domain": {
                                        "type": "string",
                                        "example": "baidu.com",
                                        "description": "顶级域名"
                                    }
                                },
                                "required": [
                                    "key",
                                    "domain"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "成功响应",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "site": {
                                            "type": "string",
                                            "example": "baidu.com",
                                            "description": "网站"
                                        },
                                        "pv_rank": {
                                            "type": "string",
                                            "example": "4",
                                            "description": "全球pv排名"
                                        },
                                        "uv_rank": {
                                            "type": "string",
                                            "example": "4",
                                            "description": "全球uv排名"
                                        },
                                        "local_code": {
                                            "type": "string",
                                            "example": "CN",
                                            "description": "地区国际代码"
                                        },
                                        "local_name": {
                                            "type": "string",
                                            "example": "China",
                                            "description": "排名参考地区"
                                        },
                                        "local_rank": {
                                            "type": "string",
                                            "example": "2",
                                            "description": "地区参考排名"
                                        },
                                        "rank_delta": {
                                            "type": "string",
                                            "example": "+0",
                                            "description": "排名变化参考值"
                                        }
                                    }
                                },
                                "example": {
                                    "msg": "success",
                                    "code": 200,
                                    "result": {
                                        "site": "baidu.com",
                                        "pv_rank": "4",
                                        "uv_rank": "4",
                                        "local_code": "CN",
                                        "local_name": "China",
                                        "local_rank": "2",
                                        "rank_delta": "+0"
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}