{
  "openapi": "3.0.1",
  "info": {
    "title": "Bring a Trailer Sold Prices & Comps API",
    "description": "Bring a Trailer sold prices: one row per sold lot (title, year, make, model, final price, end date, no-reserve) for any search, plus an optional comps summary with median, quartiles, low, high and 90-day trend. New-result alerts to Slack, Discord or Telegram. Searches that find nothing are free.",
    "version": "1.0",
    "x-build-id": "sNqiDgUNYhENIPLrs"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/accountable_eel~bring-a-trailer-sold-lookup/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-accountable_eel-bring-a-trailer-sold-lookup",
        "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/accountable_eel~bring-a-trailer-sold-lookup/runs": {
      "post": {
        "operationId": "runs-sync-accountable_eel-bring-a-trailer-sold-lookup",
        "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/accountable_eel~bring-a-trailer-sold-lookup/run-sync": {
      "post": {
        "operationId": "run-sync-accountable_eel-bring-a-trailer-sold-lookup",
        "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",
        "required": [
          "searches"
        ],
        "properties": {
          "searches": {
            "title": "Searches",
            "type": "array",
            "description": "One search per line: a make and model, or any words you would type into the Bring a Trailer search box, for example porsche 911 or land rover defender 90. Accepted formats: porsche 911, land rover defender 90, bmw e30 m3. You're only charged for the ones we actually find — a miss costs nothing.",
            "items": {
              "type": "string"
            }
          },
          "includeCompsSummary": {
            "title": "Add a comps summary row per search",
            "type": "boolean",
            "description": "Adds one row per search with the median, 25th and 75th percentile, low, high, the last-90-day against the 91-to-180-day median and the trend. Worked out from the sold lots this run read, no extra requests. Billed as its own event.",
            "default": false
          },
          "maxLots": {
            "title": "Lots to read per search",
            "type": "integer",
            "description": "Newest first (or highest first), 36 per page and one page per second. Up to 2,000. The summary is computed from these lots, so a trend needs a long enough read: about 300 lots for a car with a few sales a week.",
            "default": 36
          },
          "soldOnly": {
            "title": "Sold lots only",
            "type": "boolean",
            "description": "On: only lots that sold. Off: also lots where bidding stopped below the reserve (result bid-to) and withdrawn lots. Asked of Bring a Trailer itself. The comps summary only ever uses sold lots.",
            "default": true
          },
          "yearFrom": {
            "title": "Model year from",
            "type": "integer",
            "description": "Earliest model year. Asked of Bring a Trailer itself."
          },
          "yearTo": {
            "title": "Model year to",
            "type": "integer",
            "description": "Latest model year. Asked of Bring a Trailer itself."
          },
          "period": {
            "title": "Ended within",
            "enum": [
              "any",
              "7D",
              "30D",
              "1Y",
              "2Y",
              "5Y"
            ],
            "type": "string",
            "description": "Only auctions that ended within this period. Asked of Bring a Trailer itself.",
            "default": "any"
          },
          "endedAfter": {
            "title": "Ended on or after (date)",
            "type": "string",
            "description": "YYYY-MM-DD. Applied after the fetch, on the end date Bring a Trailer prints, so it can be any date. Combine with Ended within to read less.",
            "default": ""
          },
          "sortBy": {
            "title": "Order",
            "enum": [
              "recent",
              "highest-price"
            ],
            "type": "string",
            "description": "Recently closed first reads the newest comps. Highest price first reads the top of the market (a cut-off date then cannot end the read early).",
            "default": "recent"
          },
          "vehiclesOnly": {
            "title": "Vehicles only",
            "type": "boolean",
            "description": "Bring a Trailer also sells parts, manuals and memorabilia. On: keeps lots whose title carries a model year, which drops them. Turn off to keep every lot. Applied after the fetch.",
            "default": true
          },
          "deltaMode": {
            "title": "Track new results across runs",
            "type": "boolean",
            "description": "Turns the actor into an alert feed. Each run compares every lot of a search with the lots that search returned before and marks it new or seen. Schedule it daily and combine with 'Only return new alerts' and 'Send alerts to'.",
            "default": false
          },
          "deltaName": {
            "title": "Watchlist name (optional)",
            "type": "string",
            "description": "Leave empty and one is derived from the sold / year / period settings. Type your own name to keep one memory across changes, or to run several independent watchlists.",
            "default": ""
          },
          "alertOn": {
            "title": "Alert on",
            "enum": [
              "new-result",
              "price-above",
              "price-below"
            ],
            "type": "string",
            "description": "new-result alerts on every lot not seen before. The price rules alert on a new sold lot at or above, or at or below, the price below.",
            "default": "new-result"
          },
          "alertPriceUsd": {
            "title": "Alert price (USD)",
            "type": "integer",
            "description": "Needed for the two price rules: the level in US dollars."
          },
          "skipFirstRun": {
            "title": "Seed silently (no rows on the first run)",
            "type": "boolean",
            "description": "The first run of a search has nothing to compare with. Turn this on to remember its lots without returning or billing them, so alerts start from the second run.",
            "default": false
          },
          "alertOnChangeOnly": {
            "title": "Only return new alerts",
            "type": "boolean",
            "description": "With monitoring on, a run returns only the new lots that match your alert rule. Lots seen before write no row and are not billed.",
            "default": false
          },
          "notifyUrl": {
            "title": "Send alerts to (Discord or Slack webhook, Telegram bot link, or any URL)",
            "type": "string",
            "description": "Optional. After a lot is billed, each new lot that matches your alert rule is posted here as one message with the title, price, end date and a link. Discord or Slack: paste the channel's webhook URL. Telegram: https://api.telegram.org/bot<token>/sendMessage?chat_id=<chat id>. Any other URL receives JSON. Messages are free, and a failed message never fails the run (the row's notifyErrors says why). Stored encrypted, never logged or written to the results."
          },
          "notifyFormat": {
            "title": "Message format",
            "enum": [
              "auto",
              "discord",
              "slack",
              "telegram",
              "json"
            ],
            "type": "string",
            "description": "Leave on 'Detect from the link': discord.com links get Discord messages, hooks.slack.com Slack, api.telegram.org Telegram, anything else JSON. Pick one only to override that.",
            "default": "auto"
          },
          "maxNotificationsPerRun": {
            "title": "Most alert messages per run",
            "type": "integer",
            "description": "Up to 100. After this, one 'more alerts' message says the rest are in the run's dataset. 0 sends only that one message.",
            "default": 20
          },
          "testRun": {
            "title": "Try it first — only process the first 5",
            "type": "boolean",
            "description": "Turn this on to test your input on a small sample before running the full list. Turn it off to process everything.",
            "default": false
          },
          "onlyFound": {
            "title": "Hide rows with no result",
            "type": "boolean",
            "description": "Only keep rows where something was actually found. Misses are always free, whether or not you show them here.",
            "default": false
          },
          "includeKeywords": {
            "title": "Only keep lots whose title contains",
            "type": "array",
            "description": "Optional. Keep a lot only if its title contains at least one of these words. Applied after the fetch; not billed for the lots it drops.",
            "items": {
              "type": "string"
            }
          },
          "excludeKeywords": {
            "title": "Skip lots whose title contains",
            "type": "array",
            "description": "Optional. Drop any lot whose title contains one of these words. Applied after the fetch.",
            "items": {
              "type": "string"
            }
          },
          "maxResults": {
            "title": "Stop after this many results",
            "minimum": 1,
            "type": "integer",
            "description": "Optional. Stop the run once this many results have been found — useful for a quick, cheap sample. Leave blank for no limit."
          },
          "columns": {
            "title": "Which columns do you want?",
            "type": "array",
            "description": "Choose which pieces of information to include in each result row. All are included by default.",
            "items": {
              "type": "string",
              "enum": [
                "rowType",
                "search",
                "title",
                "year",
                "make",
                "model",
                "result",
                "currency",
                "finalPrice",
                "finalPriceUsd",
                "highBidUsd",
                "endDate",
                "endedAt",
                "noReserve",
                "location",
                "lotUrl",
                "lotId",
                "checkedAt",
                "changeType",
                "alertMatch",
                "matchesOnSite",
                "count",
                "soldCount",
                "medianUsd",
                "p25Usd",
                "p75Usd",
                "lowUsd",
                "highUsd",
                "last90dCount",
                "last90dMedianUsd",
                "prior90dCount",
                "prior90dMedianUsd",
                "trendPct",
                "newestEndDate",
                "oldestEndDate"
              ],
              "enumTitles": [
                "Row type",
                "Search",
                "Lot title",
                "Year",
                "Make",
                "Model",
                "Result",
                "Currency",
                "Final price",
                "Final price (USD)",
                "High bid (USD)",
                "Auction end date",
                "Auction ended at",
                "No reserve",
                "Location",
                "Lot link",
                "Lot id",
                "Checked at",
                "New or seen",
                "Matches your alert",
                "Matches on the site",
                "Lots in the summary",
                "Priced sold lots",
                "Median price (USD)",
                "25th percentile (USD)",
                "75th percentile (USD)",
                "Lowest price (USD)",
                "Highest price (USD)",
                "Sold in the last 90 days",
                "Median, last 90 days (USD)",
                "Sold 91 to 180 days ago",
                "Median, 91 to 180 days ago (USD)",
                "Trend (%)",
                "Newest end date",
                "Oldest end date"
              ]
            },
            "default": [
              "rowType",
              "search",
              "title",
              "year",
              "make",
              "model",
              "result",
              "currency",
              "finalPrice",
              "finalPriceUsd",
              "highBidUsd",
              "endDate",
              "endedAt",
              "noReserve",
              "location",
              "lotUrl",
              "lotId",
              "checkedAt",
              "changeType",
              "alertMatch",
              "matchesOnSite",
              "count",
              "soldCount",
              "medianUsd",
              "p25Usd",
              "p75Usd",
              "lowUsd",
              "highUsd",
              "last90dCount",
              "last90dMedianUsd",
              "prior90dCount",
              "prior90dMedianUsd",
              "trendPct",
              "newestEndDate",
              "oldestEndDate"
            ]
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 1,
            "type": "integer",
            "description": "Parallel requests. Keep conservative — this target has no browser fallback, so getting blocked costs more than slow-and-steady.",
            "default": 1
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Apify Proxy config. Residential recommended for anti-bot-sensitive targets.",
            "default": {
              "useApifyProxy": true
            }
          }
        }
      },
      "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}