{
  "openapi": "3.0.1",
  "info": {
    "title": "AMap (Gaode / 高德地图) Directions API - China Routing",
    "description": "Get driving, transit, walking, cycling & e-bike directions across China from AMap (Gaode / 高德地图): distance, travel time, tolls, live traffic, turn-by-turn steps & transit segments as JSON. No AMap key or login.",
    "version": "0.0",
    "x-build-id": "VD1gzN8Zg3tD8qKo4"
  },
  "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>Where the route starts. Any of:<br>• A place name, e.g. <code>北京西站</code><br>• A full address, e.g. <code>望京SOHO, Beijing</code><br>• Coordinates in <b>longitude,latitude</b> order (GCJ-02), e.g. <code>116.397,39.909</code>",
            "default": "北京西站"
          },
          "destination": {
            "title": "终点 / Destination",
            "type": "string",
            "description": "路线终点，写法与起点相同。<br><br>Where the route ends. Same formats as Origin.",
            "default": "首都国际机场T3"
          },
          "waypoints": {
            "title": "途经点 / Waypoints",
            "type": "array",
            "description": "途经点，按顺序经过，每行一个。仅<b>驾车</b>模式支持，最多 16 个。<br><br>Intermediate stops, visited in order, one per line. <b>Driving</b> mode 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. Chinese or English. Not needed when you use coordinates.",
            "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>Prefer routes that avoid toll roads. Driving mode only.",
            "default": false
          },
          "avoidHighways": {
            "title": "不走高速 / Avoid highways",
            "type": "boolean",
            "description": "尽量不走高速公路。仅驾车模式生效。<br><br>Prefer routes that avoid motorways. Driving mode only.",
            "default": false
          },
          "nightBus": {
            "title": "夜班车 / Include night buses",
            "type": "boolean",
            "description": "公交模式下优先返回夜班线路。仅公交模式生效。<br><br>Prefer night-bus lines. Transit mode only.",
            "default": false
          },
          "routeDetail": {
            "title": "输出详细程度 / Output detail",
            "enum": [
              "full",
              "overview",
              "summary"
            ],
            "type": "string",
            "description": "控制每条路线返回多少细节。路线几何（polyline）约占驾车结果的一半以上。<br><br>• <b>完整</b> — 逐步导航 + 实时路况 + 完整路线坐标（可绘制地图）<br>• <b>概览</b> — 保留逐步导航与路况状态，去掉所有坐标几何（体积约减一半）<br>• <b>摘要</b> — 仅路线汇总（距离、时间、过路费、途经城市、票价），不含逐步导航<br><br>How much detail each route carries. Route geometry (polylines) is over half of a driving result.<br>• <b>Full</b> — turn-by-turn steps + live traffic + full route coordinates (draw it on a map)<br>• <b>Overview</b> — keeps steps and traffic status, drops all coordinate geometry (about half the size)<br>• <b>Summary</b> — trip summary only (distance, time, tolls, cities crossed, fares); no turn-by-turn",
            "default": "full"
          },
          "includeAlternatives": {
            "title": "返回备选路线 / Include alternative routes",
            "type": "boolean",
            "description": "驾车最多返回 3 条备选路线，公交最多 5 种方案。关闭后只返回最优的一条，体积约为原来的三分之一。<br><br>Driving returns up to 3 route options and transit up to 5 plans. Turn this off to keep only the best one, roughly a third of the size.",
            "default": true
          },
          "routePairs": {
            "title": "批量路线 / Batch routes",
            "maxItems": 10,
            "type": "array",
            "description": "一次运行最多 10 条路线，并行计算。填写后将忽略上方的起点/终点。每项为一个对象：<code>origin</code>、<code>destination</code>，可选 <code>waypoints</code>（数组）。上方的出行方式与偏好适用于所有路线。<br><br>Compute up to 10 routes in one run, in parallel. When filled, the single Origin/Destination above is ignored. Each item is an object with <code>origin</code>, <code>destination</code>, and optional <code>waypoints</code> (array). The travel mode and preferences above apply to every route.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}