Bring a Trailer API endpoint
Returns Bring a Trailer's search-box completions for a term: make pages, model and generation pages, decades and categories. Era rows carry the decade id and category rows the category id that bringatrailer_results accepts as era and category; make rows can be passed by title as make. Use bringatrailer_makes for a model's numeric model_id.
/bringatrailer/suggestReturns Bring a Trailer's search-box completions for a term: make pages, model and generation pages, decades and categories. It reads the site's autocomplete route, not the /search/ page that robots.txt disallows.
term is required, 1 to 100 characters (for example porsche 911, mustang or 1970s).
Notable response behavior:
type is make, model, era or category. A model row covers both model pages and generation pages (a two-part path such as porsche/911-turbo).era rows carry id, the decade id that the era parameter of bringatrailer-results and bringatrailer-live accepts. category rows carry id, the category id for category. Both were confirmed against the filter endpoints.make rows have no id; pass the row's title as the make parameter of bringatrailer-results. model rows have no id either: the autocomplete id of a model or generation page is not reliably the numeric model_id (a generation page returned zero results when used as one), so look the model up in bringatrailer-makes instead.total: 0 and suggestions: []. The upstream returns at most about 10 rows.| Field | Filled in, of 10 checked | Values in the sample |
|---|---|---|
| type | 10 | model (8), make (2) |
| title | 10 | “Porsche” and 9 other values |
| url | 10 | bringatrailer.com |
| path | 10 | “porsche” and 9 other values |
| Parameter | Type | Required | Default | Description | Example |
|---|---|---|---|---|---|
| term | string | Yes | Text to complete | porsche 911 | |
| x-api-key (header) | string | Yes | API key required |
curl -X GET "https://api.crawlora.net/api/v1/bringatrailer/suggest?term=porsche+911" \ -H "x-api-key: $CRAWLORA_API_KEY"
{
"code": 200,
"data": {
"term": "19",
"total": 10,
"suggestions": [
{
"type": "era",
"title": "1960s",
"url": "https://bringatrailer.com/1960s/",
"path": "1960s",
"id": "1960"
},
{
"type": "era",
"title": "1970s",
"url": "https://bringatrailer.com/1970s/",
"path": "1970s",
"id": "1970"
},
{
"type": "era",
"title": "1980s",
"url": "https://bringatrailer.com/1980s/",
"path": "1980s",
"id": "1980"
}
]
},
"msg": "OK"
}Request schema
No body schema
Response schema
#/definitions/bringatrailer.suggestResponseDoc
| Field | Type | Required | Enum | Bounds | Example | Description |
|---|---|---|---|---|---|---|
| code | integer | No | 200 | |||
| data | bringatrailer.SuggestResponse | No | ||||
| data.suggestions | array | No | ||||
| data.suggestions[].id | string | No | ID is the decade id for an era row and the category id for a category row, the values the era and category parameters accept. Make and model rows have none: use Title as the make parameter or look the model up in makes. | |||
| data.suggestions[].path | string | No | ||||
| data.suggestions[].title | string | No | ||||
| data.suggestions[].type | string | No | ||||
| data.suggestions[].url | string | No | ||||
| data.term | string | No | ||||
| data.total | integer | No | ||||
| msg | string | No | OK |
| Status | Description | Schema |
|---|---|---|
| 400 | Bad Request | #/definitions/app.Response |
| 429 | Too Many Requests | #/definitions/app.Response |
| 503 | Service Unavailable | #/definitions/app.Response |
Use environment variables for secrets and keep Crawlora API keys server-side.
curl -X GET "https://api.crawlora.net/api/v1/bringatrailer/suggest?term=porsche+911" \
-H "x-api-key: $CRAWLORA_API_KEY"