{
  "openapi": "3.0.1",
  "info": {
    "title": "AMap (Gaode / 高德) Directions API - China Driving & Transit",
    "description": "Get driving, transit, walking and cycling routes anywhere in China from AMap (Gaode). Distance, travel time, tolls, live traffic, turn-by-turn steps. No AMap key or login. Also plate-restriction flags, transit service alerts, scheduled departures and intercity rail fares as JSON, CSV or Excel.",
    "version": "0.0",
    "x-build-id": "eOYuSfrEcTYFKxTac"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/zen-studio~amap-directions-api/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-zen-studio-amap-directions-api",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/zen-studio~amap-directions-api/runs": {
      "post": {
        "operationId": "runs-sync-zen-studio-amap-directions-api",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/zen-studio~amap-directions-api/run-sync": {
      "post": {
        "operationId": "run-sync-zen-studio-amap-directions-api",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "origin": {
            "title": "起点 / Origin",
            "type": "string",
            "description": "路线起点。三种写法均可：<br>• 地点名称，如 <code>北京西站</code><br>• 详细地址，如 <code>北京市朝阳区望京SOHO</code><br>• 坐标（<b>经度,纬度</b> 顺序，GCJ-02），如 <code>116.397,39.909</code><br><br>Place name, full address, or <b>longitude,latitude</b> coordinates."
          },
          "destination": {
            "title": "终点 / Destination",
            "type": "string",
            "description": "路线终点，写法与起点相同。<br><br>Same formats as Origin."
          },
          "waypoints": {
            "title": "途经点 / Waypoints",
            "type": "array",
            "description": "途经点，按顺序经过，每行一个。仅<b>驾车</b>模式支持，最多 16 个。<br><br>Intermediate stops, in order. Driving only, up to 16.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "city": {
            "title": "地区 / Region hint",
            "type": "string",
            "description": "当起点或终点是同名地点时，用来指定所在城市，中英文均可。填写坐标时无需填此项。<br><br>Disambiguates a place name shared by several cities.",
            "default": ""
          },
          "travelMode": {
            "title": "出行方式 / Travel mode",
            "enum": [
              "driving",
              "walking",
              "bicycling",
              "electrobike",
              "transit"
            ],
            "type": "string",
            "description": "路线类型。<br><br>• <b>驾车</b>, 含收费、红绿灯、实时路况，返回多条备选路线<br>• <b>步行</b>, 步行路线<br>• <b>骑行</b>, 自行车路线<br>• <b>电动车</b>, 电动自行车路线<br>• <b>公交</b>, 公共交通，含地铁、公交、城际铁路换乘",
            "default": "driving"
          },
          "avoidTolls": {
            "title": "避免收费 / Avoid tolls",
            "type": "boolean",
            "description": "尽量避开收费路段。仅驾车模式生效。<br><br>Driving only.",
            "default": false
          },
          "avoidHighways": {
            "title": "不走高速 / Avoid highways",
            "type": "boolean",
            "description": "尽量不走高速公路。仅驾车模式生效。<br><br>Driving only.",
            "default": false
          },
          "licensePlate": {
            "title": "车牌号（限行判断）/ Licence plate",
            "type": "string",
            "description": "填写车牌后，每条路线会标注该车牌当天是否受限行影响（<code>plateRestricted</code>）。北京、成都等城市按尾号限行，外地车牌另有规定。<br>格式如 <code>京A12345</code>，新能源号牌 <code>京AD12345</code> 亦可。<b>不填则不判断限行</b>，路线仍会正常返回。仅驾车模式生效。<br><br>Adds a per-route <code>plateRestricted</code> flag for tail-number driving restrictions. Driving only.",
            "default": ""
          },
          "avoidAreas": {
            "title": "避让区域 / Areas to avoid",
            "type": "array",
            "description": "规划时绕开指定区域，每行一个封闭区域，至少 3 个坐标点，点之间用分号隔开：<br><code>116.46,39.97;116.50,39.97;116.50,39.94;116.46,39.94</code><br>最多 32 个区域，每个区域最多 16 个点。仅驾车模式生效。<br><br>One closed ring per line, at least 3 <code>longitude,latitude</code> points, semicolon-separated. Driving only.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "nightBus": {
            "title": "夜班车 / Include night buses",
            "type": "boolean",
            "description": "优先返回夜班线路。仅公交模式生效。<br><br>Transit only.",
            "default": false
          },
          "transitPreference": {
            "title": "公交偏好 / Transit preference",
            "enum": [
              "fastest",
              "fewestTransfers",
              "leastWalking",
              "avoidSubway"
            ],
            "type": "string",
            "description": "公交方案的排序偏好，不同偏好会返回明显不同的换乘方案。仅公交模式生效。<br><br>• <b>最快到达</b>, 综合用时最短（默认）<br>• <b>最少换乘</b>, 尽量减少换乘次数<br>• <b>最少步行</b>, 尽量减少步行距离<br>• <b>不乘地铁</b>, 只用公交、不走地铁<br><br>Ranking preference for transit plans. Transit only."
          },
          "departureTime": {
            "title": "出发时间 / Departure time",
            "type": "string",
            "description": "按指定出发时间规划公交方案，会影响首末班车、换乘等待和可行线路。格式 <code>YYYY-MM-DD HH:MM</code>，如 <code>2026-08-29 07:30</code>。<b>不填则按当前时间</b>。仅公交模式生效。<br><br>Plans transit for a scheduled departure, e.g. <code>2026-08-29 07:30</code>. Transit only.",
            "default": ""
          },
          "routeDetail": {
            "title": "输出详细程度 / Output detail",
            "enum": [
              "full",
              "overview",
              "summary"
            ],
            "type": "string",
            "description": "控制每条路线返回多少细节。路线几何（坐标串）约占驾车结果的一半以上。<br><br>• <b>完整</b>, 逐步导航 + 实时路况 + 完整路线坐标（可直接绘制地图）<br>• <b>概览</b>, 保留逐步导航与路况状态，去掉所有坐标几何（体积约减一半）<br>• <b>摘要</b>, 仅路线汇总：距离、时间、过路费、途经城市、票价，不含逐步导航<br><br>Full keeps geometry, Overview drops it, Summary keeps trip totals only.",
            "default": "full"
          },
          "maxRoutes": {
            "title": "最多返回几条路线 / Max route options",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "每次查询最多返回几条备选路线。驾车最多 3 条，公交最多 5 种方案，步行、骑行、电动车按此数量返回。<b>不填则全部返回</b>；填 <code>1</code> 只返回最优的一条，体积约为原来的三分之一。<br><br>Caps the route options returned. Leave empty for all; <code>1</code> keeps only the best."
          },
          "routePairs": {
            "title": "批量路线 / Batch routes",
            "maxItems": 10,
            "type": "array",
            "description": "一次运行最多 10 条路线，并行计算。<b>填写后将忽略上方的起点/终点</b>。每项为一个对象：<code>origin</code>、<code>destination</code>，可选 <code>waypoints</code>（数组）。上方的出行方式与偏好适用于所有路线。<br><br>Up to 10 routes per run. Overrides the single Origin/Destination above.",
            "default": []
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}