GET api/circuits/search

Try it

This endpoint retrieves details about all the circuits in the database that match the search query. The query can be the circuit name, country or city.

Example Response

{
  "api": "https://f1api.dev",
  "url": "http://f1api.dev/api/circuits/search?q=japan",
  "limit": 30,
  "offset": 0,
  "query": "japan",
  "total": 3,
  "circuits": [
    {
      "circuitId": "suzuka",
      "circuitName": "Suzuka International Circuit",
      "country": "Japan",
      "city": "Suzuka",
      "circuitLength": 5807,
      "lapRecord": "1:30:983",
      "firstParticipationYear": 1987,
      "numberOfCorners": 18,
      "fastestLapDriverId": "hamilton",
      "fastestLapTeamId": "mercedes",
      "fastestLapYear": 2019,
      "url": "https://en.wikipedia.org/wiki/Suzuka_International_Racing_Course"
    },
    {
      "circuitId": "fuji",
      "circuitName": "Fuji Speedway",
      "country": "Japan",
      "city": "Oyama",
      "circuitLength": null,
      "lapRecord": null,
      "firstParticipationYear": null,
      "numberOfCorners": null,
      "fastestLapDriverId": null,
      "fastestLapTeamId": null,
      "fastestLapYear": null,
      "url": "http://en.wikipedia.org/wiki/Fuji_Speedway"
    },
    {
      "circuitId": "okayama",
      "circuitName": "Okayama International Circuit",
      "country": "Japan",
      "city": "Okayama",
      "circuitLength": null,
      "lapRecord": null,
      "firstParticipationYear": null,
      "numberOfCorners": null,
      "fastestLapDriverId": null,
      "fastestLapTeamId": null,
      "fastestLapYear": null,
      "url": "http://en.wikipedia.org/wiki/TI_Circuit"
    }
  ]
}

Response Types

FieldTypeDescription
apistringThe base API URL for the F1 Connect service.
urlstringThe URL used to fetch the drivers data with query parameters for limit and offset.
limitnumberThe number of results returned per request.
offsetnumberThe offset used for pagination, i.e., the starting point for the result set.
totalnumberThe total number of drivers available in the dataset.
querystringThe search query used to filter the circuits.
circuitsarrayA list of circuit objects returned from the API.
circuitIdstringA unique identifier for the circuit.
circuitNamestringThe circuit's name.
countrystringThe circuit's country.
citystringThe circuit's city.
circuitLengthnumberThe circuit's length in kilometers.
lapRecordstringThe lap record for the circuit.
firstParticipationYearnumberThe year the circuit first hosted a Grand Prix.
numberOfCornersnumberThe number of corners on the circuit.
fastestLapDriverIdstringThe driverId of the fastest lap driver.
fastestLapTeamIdstringThe teamId of the fastest lap team.
fastestLapYearnumberThe year the fastest lap was set.
urlstringA URL to the Wikipedia page of the circuit.

Response Params

ParamDefaultData
limit30Number of records returned per request.
offset0Number of records skipped before starting to fetch.
q-Search query, can be a circuit name, country or city.

Response Status

StatusDescription
200Successful request
404Resource not found
500Internal server error