Skip to content
ToolsOnDuty - free online tools
Browse documentation

Reference / Transportation

Transportation API

3 endpoints for transportation workflows. Every call requires bearer authentication and uses the standard ToolsOnDuty response envelope.

Try it

Runs a real request from your browser to your own ToolsOnDuty account. Your key is only kept in this page and is never stored.

POST/v1/transportation/airports2 credits / call

Airport lookup

Search the versioned OurAirports dataset by code, name or municipality.

ParameterTypeRequiredDescription
querystringYesIATA/ICAO code, airport name or municipality.
limitnumberNoMaximum results (1-25). Default: 10.

Request

curl -X POST https://toolsonduty.com/api/v1/transportation/airports \
  -H "Authorization: ******" \
  -H "Content-Type: application/json" \
  -d '{"query":"Delhi","limit":5}'

Response

{
  "ok": true,
  "data": {
    "airports": [
      {
        "name": "Indira Gandhi International Airport",
        "codes": {
          "iata": "DEL"
        }
      }
    ],
    "dataset": {
      "license": "Public Domain"
    }
  }
}
POST/v1/transportation/airport-code2 credits / call

Airport code converter

Resolve an IATA, ICAO or OurAirports identifier to all recorded airport codes and details.

ParameterTypeRequiredDescription
codestringYesIATA, ICAO or airport identifier.

Request

curl -X POST https://toolsonduty.com/api/v1/transportation/airport-code \
  -H "Authorization: ******" \
  -H "Content-Type: application/json" \
  -d '{"code":"DEL"}'

Response

{
  "ok": true,
  "data": {
    "airport": {
      "codes": {
        "iata": "DEL",
        "icao": "VIDP"
      }
    },
    "dataset": {
      "version": "..."
    }
  }
}
POST/v1/transportation/airport-distance2 credits / call

Airport distance

Calculate great-circle distance between two airports from versioned coordinates.

ParameterTypeRequiredDescription
fromstringYesOrigin IATA, ICAO or airport identifier.
tostringYesDestination IATA, ICAO or airport identifier.

Request

curl -X POST https://toolsonduty.com/api/v1/transportation/airport-distance \
  -H "Authorization: ******" \
  -H "Content-Type: application/json" \
  -d '{"from":"DEL","to":"LHR"}'

Response

{
  "ok": true,
  "data": {
    "distance": {
      "kilometers": 6730,
      "miles": 4182,
      "method": "great-circle distance"
    },
    "dataset": {
      "version": "..."
    }
  }
}