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.
{
"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"
}
]
}| Field | Type | Description |
|---|---|---|
| api | string | The base API URL for the F1 Connect service. |
| url | string | The URL used to fetch the drivers data with query parameters for limit and offset. |
| limit | number | The number of results returned per request. |
| offset | number | The offset used for pagination, i.e., the starting point for the result set. |
| total | number | The total number of drivers available in the dataset. |
| query | string | The search query used to filter the circuits. |
| circuits | array | A list of circuit objects returned from the API. |
| circuitId | string | A unique identifier for the circuit. |
| circuitName | string | The circuit's name. |
| country | string | The circuit's country. |
| city | string | The circuit's city. |
| circuitLength | number | The circuit's length in kilometers. |
| lapRecord | string | The lap record for the circuit. |
| firstParticipationYear | number | The year the circuit first hosted a Grand Prix. |
| numberOfCorners | number | The number of corners on the circuit. |
| fastestLapDriverId | string | The driverId of the fastest lap driver. |
| fastestLapTeamId | string | The teamId of the fastest lap team. |
| fastestLapYear | number | The year the fastest lap was set. |
| url | string | A URL to the Wikipedia page of the circuit. |
| Param | Default | Data |
|---|---|---|
| limit | 30 | Number of records returned per request. |
| offset | 0 | Number of records skipped before starting to fetch. |
| q | - | Search query, can be a circuit name, country or city. |
| Status | Description |
|---|---|
| 200 | Successful request |
| 404 | Resource not found |
| 500 | Internal server error |