{
  "openapi": "3.1.0",
  "info": {
    "title": "Crawlbench Deals API",
    "version": "v1",
    "description": "One API for the Crawlbench app, team plans that connect searches to their own systems, and data customers.\n\nSend your key as `Authorization: Bearer <key>`. Session keys (`cb_sess_`) come from signing in on the app. Team keys (`cb_live_`, `cb_test_`) come from Developers on the Pro and Scale plans. Data keys (`cb_data_`) come with a data contract. A chatbot's token (`cb_chat_`) comes from connecting a chatbot by signing in, on every plan, and works on `/mcp` only. A test key (`cb_test_`) reads the team's real data and never writes: every route but GET answers 403 `forbidden`, so it sends no alert, email or webhook. A team key belongs to one product, and another product's routes answer it 403 `forbidden`.\n\nJSON in and out. Times are in UTC, ISO 8601 with `Z`.\n\nLists answer `{ \"data\": [...], \"pagination\": { \"has_more\", \"after\" } }`. Pass `after` back until `has_more` is false; `limit` goes up to 100, or 500 on `/data/listings`. A list that takes `updated_since` returns only what changed since that time.\n\nEvery POST takes an `Idempotency-Key` header, except the MCP servers (`/mcp` and `/data/mcp`). A retry with the same key and the same body gets the first answer back, with `Idempotent-Replayed: true`, and does nothing twice. Keys are kept for 24 hours. The same key with a different body answers 409 `conflict`.\n\nEach key can make 600 calls a minute, and all keys on one plan share 600 a minute (1,200 on Scale). Markets keys count apart from Deals keys: all Markets keys of one account share 120 calls a minute on Team and 300 calls a minute on Scale. Every answer to a keyed call carries `X-RateLimit-Limit`, `X-RateLimit-Remaining` and `X-RateLimit-Reset`; over the limit, the answer is 429 `rate_limited` with `Retry-After`.\n"
  },
  "servers": [
    {
      "url": "https://api.crawlbench.com/v1"
    }
  ],
  "security": [
    {
      "key": []
    }
  ],
  "paths": {
    "/categories": {
      "get": {
        "operationId": "getCategories",
        "summary": "Categories, countries, cities and makes",
        "description": "The categories, the countries with their currency and distance unit, the cities of each country, and vehicle makes and models.",
        "responses": {
          "200": {
            "description": "Categories, countries, cities and makes",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "categories",
                    "countries",
                    "cities",
                    "vehicles"
                  ],
                  "properties": {
                    "categories": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "slug": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "note": {
                            "type": "string"
                          },
                          "lede": {
                            "type": "string"
                          }
                        }
                      }
                    },
                    "countries": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "code": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "currency": {
                            "type": "string"
                          },
                          "currency_symbol": {
                            "type": "string"
                          },
                          "distance": {
                            "type": "string",
                            "enum": [
                              "mi",
                              "km"
                            ]
                          }
                        }
                      }
                    },
                    "cities": {
                      "type": "object",
                      "description": "Each country code's cities.",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "slug": {
                              "type": "string"
                            },
                            "name": {
                              "type": "string"
                            }
                          }
                        }
                      }
                    },
                    "vehicles": {
                      "type": "object",
                      "description": "Each vehicle kind's makes, each make's models.",
                      "additionalProperties": {
                        "type": "object",
                        "additionalProperties": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        }
                      }
                    },
                    "radius_miles": {
                      "type": "array",
                      "items": {
                        "type": "integer"
                      }
                    }
                  }
                },
                "example": {
                  "categories": [
                    {
                      "slug": "vehicles",
                      "name": "Vehicles",
                      "note": "Cars, trucks, motorcycles, boats and RVs",
                      "lede": "Every new vehicle listing, with its usual price."
                    }
                  ],
                  "countries": [
                    {
                      "code": "US",
                      "name": "United States",
                      "currency": "USD",
                      "currency_symbol": "$",
                      "distance": "mi"
                    }
                  ],
                  "cities": {
                    "US": [
                      {
                        "slug": "dallas",
                        "name": "Dallas"
                      },
                      {
                        "slug": "houston",
                        "name": "Houston"
                      }
                    ]
                  },
                  "vehicles": {
                    "car": {
                      "Toyota": [
                        "Camry",
                        "Corolla",
                        "Tacoma"
                      ]
                    }
                  },
                  "radius_miles": [
                    10,
                    25,
                    50,
                    100
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    },
    "/searches": {
      "get": {
        "operationId": "listSearches",
        "summary": "Every search, newest first",
        "parameters": [
          {
            "$ref": "#/components/parameters/After"
          },
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/UpdatedSince"
          }
        ],
        "responses": {
          "200": {
            "description": "One page of searches",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "pagination"
                  ],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Search"
                      }
                    },
                    "pagination": {
                      "$ref": "#/components/schemas/Pagination"
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "Tc7vQ2mX",
                      "name": "Toyota Camry",
                      "sentence": "2019 Toyota Camry under $16,000, anywhere in Texas",
                      "category": "vehicles",
                      "on": true,
                      "new_today": 4,
                      "last_check_at": "2026-11-28T09:10:00Z",
                      "problem": null,
                      "goal": null,
                      "currency": "USD",
                      "distance": "mi",
                      "cities": [
                        {
                          "slug": "dallas",
                          "name": "Dallas"
                        },
                        {
                          "slug": "houston",
                          "name": "Houston"
                        }
                      ],
                      "text_rules": [],
                      "filters": {
                        "category": "vehicles",
                        "country": "US",
                        "price_max_dollars": 16000,
                        "vehicle_make": "Toyota",
                        "vehicle_model": "Camry",
                        "vehicle_year_min": 2019,
                        "vehicle_year_max": 2019
                      },
                      "created_at": "2026-11-20T15:02:00Z",
                      "updated_at": "2026-11-28T09:10:00Z"
                    }
                  ],
                  "pagination": {
                    "has_more": false,
                    "after": null
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "422": {
            "$ref": "#/components/responses/InvalidRequest"
          }
        }
      },
      "post": {
        "operationId": "createSearch",
        "summary": "Make a search from a sentence, from a goal or from fields",
        "description": "`{ \"sentence\": \"...\" }` and the assistant fills the fields (a `name` may go with it), or the fields of GET /categories for the search's category; never both. A sentence answers the same search as the fields its preview showed. The search starts on. When all the plan's searches are on, the answer is 422 `search_limit_reached` (\"All 20 searches are on. Turn one off or change plan.\"). An account keeps at most twice its plan's searches saved, on or off, and a deleted search counts for 24 hours; past that, any new search, an off goal included, answers 422 `search_limit_reached` with a message that gives the counts; a sentence that names no place we cover answers 422 `needs_place` (for a country we do not cover the message says so), and words that name nothing to look for (a question, a command, a form label) answer 422 `not_a_search` with a message that says what to write. `{ \"goal\": \"...\" }` has the assistant plan the search instead: it stays off with its `goal` card, to turn on with PATCH `{ \"on\": true }`, and `\"on\": true` in the same call starts it. When planning fails, the search is a plain one with `goal.plain` true. Each key makes up to 30 searches a minute that start off, goals and copies together.",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/SearchSentence"
                  },
                  {
                    "$ref": "#/components/schemas/SearchGoalPlan"
                  },
                  {
                    "$ref": "#/components/schemas/SearchFields"
                  }
                ]
              },
              "example": {
                "sentence": "2019 Toyota Camry under $16,000, anywhere in Texas"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The search",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Search"
                },
                "example": {
                  "id": "Tc7vQ2mX",
                  "name": "Toyota Camry",
                  "sentence": "2019 Toyota Camry under $16,000, anywhere in Texas",
                  "category": "vehicles",
                  "on": true,
                  "new_today": 4,
                  "last_check_at": "2026-11-28T09:10:00Z",
                  "problem": null,
                  "goal": null,
                  "currency": "USD",
                  "distance": "mi",
                  "cities": [
                    {
                      "slug": "dallas",
                      "name": "Dallas"
                    },
                    {
                      "slug": "houston",
                      "name": "Houston"
                    }
                  ],
                  "text_rules": [],
                  "filters": {
                    "category": "vehicles",
                    "country": "US",
                    "price_max_dollars": 16000,
                    "vehicle_make": "Toyota",
                    "vehicle_model": "Camry",
                    "vehicle_year_min": 2019,
                    "vehicle_year_max": 2019
                  },
                  "created_at": "2026-11-20T15:02:00Z",
                  "updated_at": "2026-11-28T09:10:00Z"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/InvalidRequest"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/searches/preview": {
      "post": {
        "operationId": "previewSearch",
        "summary": "What a search would find, before it is made",
        "description": "From a sentence or from fields, as POST /searches takes them; makes nothing. `listed_now` are listings on Marketplace now from a live sample, never saved and never alerted, `this_week` how many of the sample would have reached you and `per_day` that as listings a day, over the days the search looks back (`days_since_listed`). `warning` is null unless the search is `quiet` (under about 1 a day), brings `too_many` or is `off_target`; its `change` holds the fields that fix it, as POST /searches takes them, and is null when no one change would help. All of these are null when the team has used today's live samples or Marketplace does not answer. `check_minutes` is how often the plan checks it, and `searches` the plan's searches it would use (`uses` of `of`; `of` is null on a plan without a limit).",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/SearchSentence"
                  },
                  {
                    "$ref": "#/components/schemas/SearchFields"
                  }
                ]
              },
              "example": {
                "sentence": "2019 Toyota Camry under $16,000, anywhere in Texas"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The preview",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SearchPreview"
                },
                "example": {
                  "fields": {
                    "name": "Toyota Camry",
                    "category": "vehicles",
                    "country": "US",
                    "cities": [
                      "dallas",
                      "houston"
                    ],
                    "vehicle_make": "Toyota",
                    "vehicle_model": "Camry",
                    "vehicle_year_min": 2019,
                    "vehicle_year_max": 2019,
                    "price_max_dollars": 16000
                  },
                  "listed_now": [
                    {
                      "title": "2019 Toyota Camry SE",
                      "price": 15400,
                      "currency": "USD",
                      "city": "Dallas",
                      "url": "https://www.facebook.com/marketplace/item/1234567890123456",
                      "image_url": null,
                      "posted_at": "2026-11-28T08:40:00Z"
                    }
                  ],
                  "this_week": 18,
                  "per_day": 2.6,
                  "warning": null,
                  "check_minutes": 5,
                  "searches": {
                    "uses": 3,
                    "of": 20
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/InvalidRequest"
          }
        }
      }
    },
    "/searches/{id}": {
      "get": {
        "operationId": "getSearch",
        "summary": "One search and what it looks for",
        "parameters": [
          {
            "$ref": "#/components/parameters/SearchId"
          }
        ],
        "responses": {
          "200": {
            "description": "The search",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Search"
                },
                "example": {
                  "id": "Tc7vQ2mX",
                  "name": "Toyota Camry",
                  "sentence": "2019 Toyota Camry under $16,000, anywhere in Texas",
                  "category": "vehicles",
                  "on": true,
                  "new_today": 4,
                  "last_check_at": "2026-11-28T09:10:00Z",
                  "problem": null,
                  "goal": null,
                  "currency": "USD",
                  "distance": "mi",
                  "cities": [
                    {
                      "slug": "dallas",
                      "name": "Dallas"
                    },
                    {
                      "slug": "houston",
                      "name": "Houston"
                    }
                  ],
                  "text_rules": [],
                  "filters": {
                    "category": "vehicles",
                    "country": "US",
                    "price_max_dollars": 16000,
                    "vehicle_make": "Toyota",
                    "vehicle_model": "Camry",
                    "vehicle_year_min": 2019,
                    "vehicle_year_max": 2019
                  },
                  "created_at": "2026-11-20T15:02:00Z",
                  "updated_at": "2026-11-28T09:10:00Z"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      },
      "patch": {
        "operationId": "updateSearch",
        "summary": "Change what it looks for, or turn it on or off",
        "description": "Send only what changes. `on: false` turns it off; `on: true` turns it on, and answers 422 `search_limit_reached` when all the plan's searches are on (the message says how many, and to turn one off or change plan), or 403 `plan_required` when no plan can turn one on (the message says to start the 3-day trial). On a goal, `{ \"goal\": \"...\" }` plans it again as a new version (a fifth change in a day answers 429 `goal_changes_reached`).",
        "parameters": [
          {
            "$ref": "#/components/parameters/SearchId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/SearchFields"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "on": {
                        "description": "Send true to turn the search on, false to turn it off.",
                        "type": "boolean"
                      }
                    }
                  }
                ]
              },
              "example": {
                "text_rules": [
                  {
                    "mode": "none",
                    "look_in": "title_description",
                    "terms": [
                      {
                        "text": "salvage"
                      },
                      {
                        "text": "rebuilt title",
                        "exact": true
                      }
                    ]
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The search",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Search"
                },
                "example": {
                  "id": "Tc7vQ2mX",
                  "name": "Toyota Camry",
                  "sentence": "2019 Toyota Camry under $16,000, anywhere in Texas",
                  "category": "vehicles",
                  "on": true,
                  "new_today": 4,
                  "last_check_at": "2026-11-28T09:10:00Z",
                  "problem": null,
                  "goal": null,
                  "currency": "USD",
                  "distance": "mi",
                  "cities": [
                    {
                      "slug": "dallas",
                      "name": "Dallas"
                    },
                    {
                      "slug": "houston",
                      "name": "Houston"
                    }
                  ],
                  "text_rules": [
                    {
                      "mode": "none",
                      "look_in": "title_description",
                      "terms": [
                        {
                          "text": "salvage",
                          "exact": false
                        },
                        {
                          "text": "rebuilt title",
                          "exact": true
                        }
                      ]
                    }
                  ],
                  "filters": {
                    "category": "vehicles",
                    "country": "US",
                    "price_max_dollars": 16000,
                    "vehicle_make": "Toyota",
                    "vehicle_model": "Camry",
                    "vehicle_year_min": 2019,
                    "vehicle_year_max": 2019
                  },
                  "created_at": "2026-11-20T15:02:00Z",
                  "updated_at": "2026-11-28T09:10:00Z"
                }
              }
            }
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/InvalidRequest"
          }
        }
      },
      "delete": {
        "operationId": "deleteSearch",
        "summary": "Delete a search",
        "description": "Its listings stay in Saved and Handled.",
        "parameters": [
          {
            "$ref": "#/components/parameters/SearchId"
          }
        ],
        "responses": {
          "204": {
            "description": "The search is deleted"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          }
        }
      }
    },
    "/searches/{id}/duplicate": {
      "post": {
        "operationId": "duplicateSearch",
        "summary": "A copy of the search, off",
        "description": "The copy never goes over the plan's searches until it is turned on. A body with text_rules gives the copy those words; the rest of a body is ignored. Each key makes up to 30 searches a minute that start off, copies and goals together. At twice the plan's searches saved, counting those deleted in the last 24 hours, it answers 422 `search_limit_reached` with a message that gives the counts.",
        "parameters": [
          {
            "$ref": "#/components/parameters/SearchId"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SearchFields"
              },
              "example": {
                "text_rules": [
                  {
                    "mode": "any",
                    "look_in": "title_description",
                    "terms": [
                      {
                        "text": "camry"
                      }
                    ]
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The copy",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Search"
                },
                "example": {
                  "id": "Vb3nK8pQ",
                  "name": "Toyota Camry (copy)",
                  "sentence": "2019 Toyota Camry under $16,000, anywhere in Texas",
                  "category": "vehicles",
                  "on": false,
                  "new_today": 0,
                  "last_check_at": null,
                  "problem": null,
                  "goal": null,
                  "currency": "USD",
                  "distance": "mi",
                  "cities": [
                    {
                      "slug": "dallas",
                      "name": "Dallas"
                    },
                    {
                      "slug": "houston",
                      "name": "Houston"
                    }
                  ],
                  "text_rules": [],
                  "filters": {
                    "category": "vehicles",
                    "country": "US",
                    "price_max_dollars": 16000,
                    "vehicle_make": "Toyota",
                    "vehicle_model": "Camry",
                    "vehicle_year_min": 2019,
                    "vehicle_year_max": 2019
                  },
                  "created_at": "2026-11-20T15:02:00Z",
                  "updated_at": "2026-11-28T09:10:00Z"
                }
              }
            }
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/listings": {
      "get": {
        "operationId": "listListings",
        "summary": "Your feed, one row for each listing",
        "description": "`tab`: new (the default), handled or hidden, and on team plans to_review or mine. `updated_since` returns the listings whose state or content changed since then.",
        "parameters": [
          {
            "name": "tab",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "new",
                "handled",
                "hidden",
                "to_review",
                "mine"
              ]
            }
          },
          {
            "name": "sort",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "newest",
                "best_deal",
                "price"
              ]
            }
          },
          {
            "$ref": "#/components/parameters/ListingSearch"
          },
          {
            "$ref": "#/components/parameters/ListingVerdict"
          },
          {
            "$ref": "#/components/parameters/ListingCategory"
          },
          {
            "$ref": "#/components/parameters/ListingArea"
          },
          {
            "$ref": "#/components/parameters/ListingAssigned"
          },
          {
            "$ref": "#/components/parameters/After"
          },
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/UpdatedSince"
          }
        ],
        "responses": {
          "200": {
            "description": "One page of listings",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "pagination"
                  ],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Listing"
                      }
                    },
                    "pagination": {
                      "$ref": "#/components/schemas/Pagination"
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "1129384756102938",
                      "title": "2019 Toyota Camry SE",
                      "price": 15400,
                      "currency": "USD",
                      "url": "https://www.facebook.com/marketplace/item/1234567890123456",
                      "location": "Dallas, TX",
                      "posted_at": "2026-11-28T08:40:00Z",
                      "first_seen_at": "2026-11-28T08:44:00Z",
                      "image_url": null,
                      "photo_urls": [],
                      "description": "One owner, clean title, new tires.",
                      "facts": {
                        "make": "Toyota",
                        "model": "Camry",
                        "year": 2019,
                        "trim": "SE",
                        "mileage_mi": 61000,
                        "transmission": "automatic"
                      },
                      "previous_price": 16200,
                      "price_changed_at": "2026-11-28T10:05:00Z",
                      "price_history": [
                        {
                          "amount": 16200,
                          "currency": "USD",
                          "previous": null,
                          "kind": "first",
                          "observed_at": "2026-11-28T08:44:00Z"
                        },
                        {
                          "amount": 15400,
                          "currency": "USD",
                          "previous": 16200,
                          "kind": "cut",
                          "observed_at": "2026-11-28T10:05:00Z"
                        }
                      ],
                      "price_check": {
                        "rating": "super_price",
                        "rating_label": "Great price",
                        "expected": 17900,
                        "low": 15800,
                        "high": 19900,
                        "sample_size": 40,
                        "delta_pct": -14.0
                      },
                      "verdict": "worth_a_look",
                      "searches": [
                        {
                          "id": "Tc7vQ2mX",
                          "name": "Toyota Camry"
                        }
                      ],
                      "found_at": "2026-11-28T08:44:00Z",
                      "saved": false,
                      "saved_id": null,
                      "handled": false,
                      "hidden": false,
                      "assigned_to": null
                    }
                  ],
                  "pagination": {
                    "has_more": true,
                    "after": "1129384756102938"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "422": {
            "$ref": "#/components/responses/InvalidRequest"
          }
        }
      }
    },
    "/listings/bulk": {
      "post": {
        "operationId": "bulkListings",
        "summary": "Many listings at once",
        "description": "Up to 100 ids. Actions: handled, hide (with an optional `reason`) and save. Each listing answers on its own row, with the listing or the reason it failed.",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "ids",
                  "action"
                ],
                "properties": {
                  "ids": {
                    "description": "The listing ids to change.",
                    "type": "array",
                    "maxItems": 100,
                    "items": {
                      "type": "string"
                    }
                  },
                  "action": {
                    "type": "string",
                    "enum": [
                      "handled",
                      "hide",
                      "save"
                    ]
                  },
                  "reason": {
                    "$ref": "#/components/schemas/HideReason"
                  }
                }
              },
              "example": {
                "ids": [
                  "1129384756102938"
                ],
                "action": "save"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "One row for each id",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id"
                        ],
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "listing": {
                            "oneOf": [
                              {
                                "$ref": "#/components/schemas/Listing"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "error": {
                            "type": "object",
                            "properties": {
                              "code": {
                                "type": "string"
                              },
                              "message": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "1129384756102938",
                      "listing": {
                        "id": "1129384756102938",
                        "title": "2019 Toyota Camry SE",
                        "price": 15400,
                        "currency": "USD",
                        "url": "https://www.facebook.com/marketplace/item/1234567890123456",
                        "location": "Dallas, TX",
                        "posted_at": "2026-11-28T08:40:00Z",
                        "first_seen_at": "2026-11-28T08:44:00Z",
                        "image_url": null,
                        "photo_urls": [],
                        "description": "One owner, clean title, new tires.",
                        "facts": {
                          "make": "Toyota",
                          "model": "Camry",
                          "year": 2019,
                          "trim": "SE",
                          "mileage_mi": 61000,
                          "transmission": "automatic"
                        },
                        "previous_price": 16200,
                        "price_changed_at": "2026-11-28T10:05:00Z",
                        "price_history": [
                          {
                            "amount": 16200,
                            "currency": "USD",
                            "previous": null,
                            "kind": "first",
                            "observed_at": "2026-11-28T08:44:00Z"
                          },
                          {
                            "amount": 15400,
                            "currency": "USD",
                            "previous": 16200,
                            "kind": "cut",
                            "observed_at": "2026-11-28T10:05:00Z"
                          }
                        ],
                        "price_check": {
                          "rating": "super_price",
                          "rating_label": "Great price",
                          "expected": 17900,
                          "low": 15800,
                          "high": 19900,
                          "sample_size": 40,
                          "delta_pct": -14.0
                        },
                        "verdict": "worth_a_look",
                        "searches": [
                          {
                            "id": "Tc7vQ2mX",
                            "name": "Toyota Camry"
                          }
                        ],
                        "found_at": "2026-11-28T08:44:00Z",
                        "saved": true,
                        "saved_id": "1129384756102938",
                        "handled": false,
                        "hidden": false,
                        "assigned_to": null
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/InvalidRequest"
          }
        }
      }
    },
    "/listings/{id}": {
      "get": {
        "operationId": "getListing",
        "summary": "One listing, with the team's notes",
        "parameters": [
          {
            "$ref": "#/components/parameters/ListingId"
          }
        ],
        "responses": {
          "200": {
            "description": "The listing",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Listing"
                    },
                    {
                      "type": "object",
                      "required": [
                        "notes"
                      ],
                      "properties": {
                        "notes": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "body": {
                                "type": "string"
                              },
                              "author": {
                                "type": "string"
                              },
                              "created_at": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "edited_at": {
                                "type": "string",
                                "format": "date-time",
                                "nullable": true
                              }
                            }
                          }
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "id": "1129384756102938",
                  "title": "2019 Toyota Camry SE",
                  "price": 15400,
                  "currency": "USD",
                  "url": "https://www.facebook.com/marketplace/item/1234567890123456",
                  "location": "Dallas, TX",
                  "posted_at": "2026-11-28T08:40:00Z",
                  "first_seen_at": "2026-11-28T08:44:00Z",
                  "image_url": null,
                  "photo_urls": [],
                  "description": "One owner, clean title, new tires.",
                  "facts": {
                    "make": "Toyota",
                    "model": "Camry",
                    "year": 2019,
                    "trim": "SE",
                    "mileage_mi": 61000,
                    "transmission": "automatic"
                  },
                  "previous_price": 16200,
                  "price_changed_at": "2026-11-28T10:05:00Z",
                  "price_history": [
                    {
                      "amount": 16200,
                      "currency": "USD",
                      "previous": null,
                      "kind": "first",
                      "observed_at": "2026-11-28T08:44:00Z"
                    },
                    {
                      "amount": 15400,
                      "currency": "USD",
                      "previous": 16200,
                      "kind": "cut",
                      "observed_at": "2026-11-28T10:05:00Z"
                    }
                  ],
                  "price_check": {
                    "rating": "super_price",
                    "rating_label": "Great price",
                    "expected": 17900,
                    "low": 15800,
                    "high": 19900,
                    "sample_size": 40,
                    "delta_pct": -14.0
                  },
                  "verdict": "worth_a_look",
                  "searches": [
                    {
                      "id": "Tc7vQ2mX",
                      "name": "Toyota Camry"
                    }
                  ],
                  "found_at": "2026-11-28T08:44:00Z",
                  "saved": false,
                  "saved_id": null,
                  "handled": false,
                  "hidden": false,
                  "assigned_to": null,
                  "notes": [
                    {
                      "id": "Nt2rY6hB9p",
                      "body": "Seller can show it Saturday morning.",
                      "author": "Alex Sample",
                      "created_at": "2026-11-28T10:20:00Z",
                      "edited_at": "2026-11-28T10:20:00Z"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/listings/{id}/state": {
      "put": {
        "operationId": "setListingState",
        "summary": "Save, handle or hide a listing, or undo it",
        "description": "Send one of `saved`, `handled` or `hidden`, as true or false. `false` undoes it. Hide takes an optional `reason`. A listing no search found can be saved but not handled or hidden.",
        "parameters": [
          {
            "$ref": "#/components/parameters/ListingId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "saved": {
                    "description": "Send true to save the listing, false to undo it.",
                    "type": "boolean"
                  },
                  "handled": {
                    "description": "Send true to mark the listing handled, false to undo it.",
                    "type": "boolean"
                  },
                  "hidden": {
                    "description": "Send true to hide the listing, false to undo it.",
                    "type": "boolean"
                  },
                  "reason": {
                    "$ref": "#/components/schemas/HideReason"
                  },
                  "outcome": {
                    "type": "object",
                    "description": "With `handled: true`. An `offered` or `agreed` under 20% or over 300% of the ask answers 422 `needs_confirmation` with the question in `message`; send the same call with `confirmed: true` to save it. Handled is already saved when the question comes back.",
                    "properties": {
                      "offered": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "result": {
                        "type": "string",
                        "enum": [
                          "talking",
                          "bought",
                          "not_bought"
                        ]
                      },
                      "agreed": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "confirmed": {
                        "type": "boolean"
                      }
                    }
                  }
                }
              },
              "example": {
                "saved": true
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The listing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Listing"
                },
                "example": {
                  "id": "1129384756102938",
                  "title": "2019 Toyota Camry SE",
                  "price": 15400,
                  "currency": "USD",
                  "url": "https://www.facebook.com/marketplace/item/1234567890123456",
                  "location": "Dallas, TX",
                  "posted_at": "2026-11-28T08:40:00Z",
                  "first_seen_at": "2026-11-28T08:44:00Z",
                  "image_url": null,
                  "photo_urls": [],
                  "description": "One owner, clean title, new tires.",
                  "facts": {
                    "make": "Toyota",
                    "model": "Camry",
                    "year": 2019,
                    "trim": "SE",
                    "mileage_mi": 61000,
                    "transmission": "automatic"
                  },
                  "previous_price": 16200,
                  "price_changed_at": "2026-11-28T10:05:00Z",
                  "price_history": [
                    {
                      "amount": 16200,
                      "currency": "USD",
                      "previous": null,
                      "kind": "first",
                      "observed_at": "2026-11-28T08:44:00Z"
                    },
                    {
                      "amount": 15400,
                      "currency": "USD",
                      "previous": 16200,
                      "kind": "cut",
                      "observed_at": "2026-11-28T10:05:00Z"
                    }
                  ],
                  "price_check": {
                    "rating": "super_price",
                    "rating_label": "Great price",
                    "expected": 17900,
                    "low": 15800,
                    "high": 19900,
                    "sample_size": 40,
                    "delta_pct": -14.0
                  },
                  "verdict": "worth_a_look",
                  "searches": [
                    {
                      "id": "Tc7vQ2mX",
                      "name": "Toyota Camry"
                    }
                  ],
                  "found_at": "2026-11-28T08:44:00Z",
                  "saved": true,
                  "saved_id": "1129384756102938",
                  "handled": false,
                  "hidden": false,
                  "assigned_to": null
                }
              }
            }
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/InvalidRequest"
          }
        }
      }
    },
    "/listings/{id}/notes": {
      "post": {
        "operationId": "addListingNote",
        "summary": "Add a note on a listing",
        "description": "Every plan. Up to 2,000 characters. Answers the note as `GET /v1/listings/{id}` lists them.",
        "parameters": [
          {
            "$ref": "#/components/parameters/ListingId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ListingNoteBody"
              },
              "example": {
                "body": "Seller can show it Saturday morning."
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The note",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListingNote"
                },
                "example": {
                  "id": "Nt2rY6hB9p",
                  "body": "Seller can show it Saturday morning.",
                  "author": "Alex Sample",
                  "created_at": "2026-11-28T10:20:00Z",
                  "edited_at": "2026-11-28T10:20:00Z"
                }
              }
            }
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/InvalidRequest"
          }
        }
      }
    },
    "/listings/{id}/notes/{note}": {
      "patch": {
        "operationId": "editListingNote",
        "summary": "Edit your own note",
        "description": "Only the writer. A saved edit sets `edited_at`.",
        "parameters": [
          {
            "$ref": "#/components/parameters/ListingId"
          },
          {
            "name": "note",
            "in": "path",
            "required": true,
            "description": "A note id from the listing's `notes`.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ListingNoteBody"
              },
              "example": {
                "body": "Seller can show it Saturday at 10."
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The note",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListingNote"
                },
                "example": {
                  "id": "Nt2rY6hB9p",
                  "body": "Seller can show it Saturday at 10.",
                  "author": "Alex Sample",
                  "created_at": "2026-11-28T10:20:00Z",
                  "edited_at": "2026-11-28T10:40:00Z"
                }
              }
            }
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/InvalidRequest"
          }
        }
      },
      "delete": {
        "operationId": "deleteListingNote",
        "summary": "Delete your own note",
        "description": "Only the writer. At once; the API has no Undo.",
        "parameters": [
          {
            "$ref": "#/components/parameters/ListingId"
          },
          {
            "name": "note",
            "description": "The note's id.",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/listings/{id}/draft": {
      "post": {
        "operationId": "draftListingMessage",
        "summary": "The assistant's opening message to the seller",
        "description": "On every plan. Only what the listing says. Counts in the same day's fair use as the closer look; at the limit answers 429 `limit`.",
        "parameters": [
          {
            "$ref": "#/components/parameters/ListingId"
          }
        ],
        "responses": {
          "200": {
            "description": "The message to copy",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "message",
                    "uses"
                  ],
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "uses": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                },
                "example": {
                  "message": "Hi, is the 2019 Camry SE still available? I can come see it this week.",
                  "uses": [
                    "title",
                    "price"
                  ]
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "description": "Today's fair use for the closer look and drafts",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/listings/{id}/events": {
      "post": {
        "operationId": "recordListingEvent",
        "summary": "Record what only the phone knows about a listing",
        "description": "Phone app only: one event, `push_opened`, sent when the listing a push alert led to is on screen. `seconds` is the time from the tap to the listing shown, capped at 3600. Any other caller (a web session or a team key) gets the same 204 and nothing is recorded.",
        "parameters": [
          {
            "$ref": "#/components/parameters/ListingId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "event"
                ],
                "properties": {
                  "event": {
                    "type": "string",
                    "enum": [
                      "push_opened"
                    ]
                  },
                  "seconds": {
                    "type": "integer",
                    "minimum": 0,
                    "description": "Seconds from the push tap to the listing shown. Values above 3600 are stored as 3600."
                  }
                }
              },
              "example": {
                "event": "push_opened",
                "seconds": 42
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "Accepted"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "description": "event is not push_opened",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/saved": {
      "get": {
        "operationId": "listSaved",
        "summary": "Saved listings, newest saved first",
        "parameters": [
          {
            "name": "tab",
            "in": "query",
            "description": "all and price_dropped hold live saves, handled or not. A listing that sold or is no longer listed is on sold_or_removed alone.",
            "schema": {
              "type": "string",
              "enum": [
                "all",
                "price_dropped",
                "sold_or_removed"
              ]
            }
          },
          {
            "$ref": "#/components/parameters/After"
          },
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/UpdatedSince"
          }
        ],
        "responses": {
          "200": {
            "description": "One page of saved listings",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "pagination"
                  ],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Saved"
                      }
                    },
                    "pagination": {
                      "$ref": "#/components/schemas/Pagination"
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "1129384756102938",
                      "listing": {
                        "id": "1129384756102938",
                        "title": "2019 Toyota Camry SE",
                        "price": 15400,
                        "currency": "USD",
                        "url": "https://www.facebook.com/marketplace/item/1234567890123456",
                        "location": "Dallas, TX",
                        "posted_at": "2026-11-28T08:40:00Z",
                        "first_seen_at": "2026-11-28T08:44:00Z",
                        "image_url": null,
                        "photo_urls": [],
                        "description": "One owner, clean title, new tires.",
                        "facts": {
                          "make": "Toyota",
                          "model": "Camry",
                          "year": 2019,
                          "trim": "SE",
                          "mileage_mi": 61000,
                          "transmission": "automatic"
                        },
                        "previous_price": 16200,
                        "price_changed_at": "2026-11-28T10:05:00Z",
                        "price_history": [
                          {
                            "amount": 16200,
                            "currency": "USD",
                            "previous": null,
                            "kind": "first",
                            "observed_at": "2026-11-28T08:44:00Z"
                          },
                          {
                            "amount": 15400,
                            "currency": "USD",
                            "previous": 16200,
                            "kind": "cut",
                            "observed_at": "2026-11-28T10:05:00Z"
                          }
                        ],
                        "price_check": {
                          "rating": "super_price",
                          "rating_label": "Great price",
                          "expected": 17900,
                          "low": 15800,
                          "high": 19900,
                          "sample_size": 40,
                          "delta_pct": -14.0
                        },
                        "verdict": "worth_a_look",
                        "searches": [
                          {
                            "id": "Tc7vQ2mX",
                            "name": "Toyota Camry"
                          }
                        ],
                        "found_at": "2026-11-28T08:44:00Z",
                        "saved": true,
                        "saved_id": "1129384756102938",
                        "handled": false,
                        "hidden": false,
                        "assigned_to": null
                      },
                      "saved_at": "2026-11-28T10:12:00Z",
                      "price_at_save": 15400,
                      "alert_below": null,
                      "checked_at": "2026-11-28T11:00:00Z",
                      "checks_ended_at": null
                    }
                  ],
                  "pagination": {
                    "has_more": false,
                    "after": null
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "422": {
            "$ref": "#/components/responses/InvalidRequest"
          }
        }
      },
      "post": {
        "operationId": "createSaved",
        "summary": "Save a listing by its Marketplace link",
        "description": "Each key saves up to 30 links a minute. A team holds at most 2,000 saved listings; past that the answer is 422 `saved_limit_reached`.",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "url"
                ],
                "properties": {
                  "url": {
                    "description": "The link to the listing on Marketplace.",
                    "type": "string"
                  }
                }
              },
              "example": {
                "url": "https://www.facebook.com/marketplace/item/1234567890123456"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The listing was already saved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Saved"
                }
              }
            }
          },
          "201": {
            "description": "The saved listing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Saved"
                },
                "example": {
                  "id": "1129384756102938",
                  "listing": {
                    "id": "1129384756102938",
                    "title": "2019 Toyota Camry SE",
                    "price": 15400,
                    "currency": "USD",
                    "url": "https://www.facebook.com/marketplace/item/1234567890123456",
                    "location": "Dallas, TX",
                    "posted_at": "2026-11-28T08:40:00Z",
                    "first_seen_at": "2026-11-28T08:44:00Z",
                    "image_url": null,
                    "photo_urls": [],
                    "description": "One owner, clean title, new tires.",
                    "facts": {
                      "make": "Toyota",
                      "model": "Camry",
                      "year": 2019,
                      "trim": "SE",
                      "mileage_mi": 61000,
                      "transmission": "automatic"
                    },
                    "previous_price": 16200,
                    "price_changed_at": "2026-11-28T10:05:00Z",
                    "price_history": [
                      {
                        "amount": 16200,
                        "currency": "USD",
                        "previous": null,
                        "kind": "first",
                        "observed_at": "2026-11-28T08:44:00Z"
                      },
                      {
                        "amount": 15400,
                        "currency": "USD",
                        "previous": 16200,
                        "kind": "cut",
                        "observed_at": "2026-11-28T10:05:00Z"
                      }
                    ],
                    "price_check": {
                      "rating": "super_price",
                      "rating_label": "Great price",
                      "expected": 17900,
                      "low": 15800,
                      "high": 19900,
                      "sample_size": 40,
                      "delta_pct": -14.0
                    },
                    "verdict": "worth_a_look",
                    "searches": [
                      {
                        "id": "Tc7vQ2mX",
                        "name": "Toyota Camry"
                      }
                    ],
                    "found_at": "2026-11-28T08:44:00Z",
                    "saved": true,
                    "saved_id": "1129384756102938",
                    "handled": false,
                    "hidden": false,
                    "assigned_to": null
                  },
                  "saved_at": "2026-11-28T10:12:00Z",
                  "price_at_save": 15400,
                  "alert_below": null,
                  "checked_at": "2026-11-28T11:00:00Z",
                  "checks_ended_at": null
                }
              }
            }
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/InvalidRequest"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/saved/{id}": {
      "patch": {
        "operationId": "updateSaved",
        "summary": "Set or clear the alert price",
        "parameters": [
          {
            "$ref": "#/components/parameters/SavedId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "alert_below"
                ],
                "properties": {
                  "alert_below": {
                    "type": [
                      "number",
                      "null"
                    ],
                    "description": "In the listing's currency, below today's price."
                  }
                }
              },
              "example": {
                "alert_below": 15000
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The saved listing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Saved"
                },
                "example": {
                  "id": "1129384756102938",
                  "listing": {
                    "id": "1129384756102938",
                    "title": "2019 Toyota Camry SE",
                    "price": 15400,
                    "currency": "USD",
                    "url": "https://www.facebook.com/marketplace/item/1234567890123456",
                    "location": "Dallas, TX",
                    "posted_at": "2026-11-28T08:40:00Z",
                    "first_seen_at": "2026-11-28T08:44:00Z",
                    "image_url": null,
                    "photo_urls": [],
                    "description": "One owner, clean title, new tires.",
                    "facts": {
                      "make": "Toyota",
                      "model": "Camry",
                      "year": 2019,
                      "trim": "SE",
                      "mileage_mi": 61000,
                      "transmission": "automatic"
                    },
                    "previous_price": 16200,
                    "price_changed_at": "2026-11-28T10:05:00Z",
                    "price_history": [
                      {
                        "amount": 16200,
                        "currency": "USD",
                        "previous": null,
                        "kind": "first",
                        "observed_at": "2026-11-28T08:44:00Z"
                      },
                      {
                        "amount": 15400,
                        "currency": "USD",
                        "previous": 16200,
                        "kind": "cut",
                        "observed_at": "2026-11-28T10:05:00Z"
                      }
                    ],
                    "price_check": {
                      "rating": "super_price",
                      "rating_label": "Great price",
                      "expected": 17900,
                      "low": 15800,
                      "high": 19900,
                      "sample_size": 40,
                      "delta_pct": -14.0
                    },
                    "verdict": "worth_a_look",
                    "searches": [
                      {
                        "id": "Tc7vQ2mX",
                        "name": "Toyota Camry"
                      }
                    ],
                    "found_at": "2026-11-28T08:44:00Z",
                    "saved": true,
                    "saved_id": "1129384756102938",
                    "handled": false,
                    "hidden": false,
                    "assigned_to": null
                  },
                  "saved_at": "2026-11-28T10:12:00Z",
                  "price_at_save": 15400,
                  "alert_below": 15000,
                  "checked_at": "2026-11-28T11:00:00Z",
                  "checks_ended_at": null
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/InvalidRequest"
          }
        }
      },
      "delete": {
        "operationId": "deleteSaved",
        "summary": "Stop tracking a saved listing",
        "description": "The same as `saved: false` on its listing.",
        "parameters": [
          {
            "$ref": "#/components/parameters/SavedId"
          }
        ],
        "responses": {
          "204": {
            "description": "The listing is no longer saved"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/team": {
      "get": {
        "operationId": "getTeam",
        "summary": "The team's people, roles and open invites",
        "responses": {
          "200": {
            "description": "The team",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Team"
                },
                "example": {
                  "id": "Tm4kR8vQ2z",
                  "name": "Sample Motors",
                  "people": {
                    "used": 1,
                    "limit": 5
                  },
                  "members": [
                    {
                      "id": "Mb9xE3nK6u",
                      "name": "Alex Sample",
                      "email": "alex@example.com",
                      "role": "owner",
                      "joined_at": "2026-10-05T09:00:00Z"
                    }
                  ],
                  "invites": [
                    {
                      "email": "sam@example.com",
                      "role": "member",
                      "expires_at": "2026-12-05T09:00:00Z"
                    }
                  ],
                  "count_in_groups": true
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        }
      },
      "patch": {
        "operationId": "updateTeam",
        "summary": "Rename the team, or leave its results out of group numbers",
        "description": "Send `name` (owners and admins) or `count_in_groups` (the owner), one at a time. `count_in_groups: false` leaves the team's outcomes out of group numbers.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "description": "The new name for the team.",
                    "type": "string"
                  },
                  "count_in_groups": {
                    "description": "Send false to leave the team's results out of group numbers.",
                    "type": "boolean"
                  }
                }
              },
              "example": {
                "name": "Sample Motors"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The team",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Team"
                },
                "example": {
                  "id": "Tm4kR8vQ2z",
                  "name": "Sample Motors",
                  "people": {
                    "used": 1,
                    "limit": 5
                  },
                  "members": [
                    {
                      "id": "Mb9xE3nK6u",
                      "name": "Alex Sample",
                      "email": "alex@example.com",
                      "role": "owner",
                      "joined_at": "2026-10-05T09:00:00Z"
                    }
                  ],
                  "invites": [
                    {
                      "email": "sam@example.com",
                      "role": "member",
                      "expires_at": "2026-12-05T09:00:00Z"
                    }
                  ],
                  "count_in_groups": true
                }
              }
            }
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/InvalidRequest"
          }
        }
      }
    },
    "/team/activity": {
      "get": {
        "operationId": "listTeamActivity",
        "summary": "Who did what on the team desk",
        "description": "Newest first, for team plans. The kinds are the ones Team activity shows: claimed, assigned, handled, outcome_recorded, outcome_changed, hidden, saved, note_added, search_created, search_changed, search_on, search_off, search_deleted, member_joined and member_left. Events are kept for 90 days, and `updated_since` returns the events at or after that time.",
        "parameters": [
          {
            "$ref": "#/components/parameters/After"
          },
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/UpdatedSince"
          },
          {
            "name": "person",
            "in": "query",
            "description": "A member id from `GET /v1/team`. Events the member did, or that name them.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "search",
            "in": "query",
            "description": "A search id.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "kind",
            "description": "Which kind of activity to list.",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A page of events",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "pagination"
                  ],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/TeamEvent"
                      }
                    },
                    "pagination": {
                      "$ref": "#/components/schemas/Pagination"
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "Ev6pT2wM9k",
                      "kind": "saved",
                      "actor": {
                        "id": "Mb9xE3nK6u",
                        "name": "Alex Sample"
                      },
                      "listing": {
                        "id": "1129384756102938",
                        "title": "2019 Toyota Camry SE"
                      },
                      "search": {
                        "id": "Tc7vQ2mX",
                        "name": "Toyota Camry"
                      },
                      "member": null,
                      "hidden_reason": null,
                      "detail": {},
                      "at": "2026-11-28T10:12:00Z"
                    }
                  ],
                  "pagination": {
                    "has_more": false,
                    "after": null
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/InvalidRequest"
          }
        }
      }
    },
    "/team/invites": {
      "post": {
        "operationId": "createTeamInvite",
        "summary": "Invite someone by email",
        "description": "Past the plan's people the answer is 422 `people_limit_reached`. A team sends at most 20 invites an hour, counted with the ones sent from Settings.",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "email"
                ],
                "properties": {
                  "email": {
                    "description": "The email address to invite.",
                    "type": "string"
                  },
                  "role": {
                    "type": "string",
                    "enum": [
                      "member",
                      "admin"
                    ],
                    "default": "member"
                  }
                }
              },
              "example": {
                "email": "sam@example.com",
                "role": "member"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The invite, sent by email",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TeamInvite"
                },
                "example": {
                  "email": "sam@example.com",
                  "role": "member",
                  "expires_at": "2026-12-05T09:00:00Z"
                }
              }
            }
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/InvalidRequest"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/team/members/{id}": {
      "patch": {
        "operationId": "updateTeamMember",
        "summary": "Change a role",
        "description": "`owner` hands the team over, and the old owner becomes a member. Only the owner can do that. A hand-over the new owner's plan cannot hold answers 422 with the code of adding one more past that limit: `search_limit_reached`, `saved_market_limit_reached` or `own_listing_limit_reached`; any other refusal answers `validation_failed`, and nothing changes.",
        "parameters": [
          {
            "$ref": "#/components/parameters/MemberId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "role"
                ],
                "properties": {
                  "role": {
                    "type": "string",
                    "enum": [
                      "owner",
                      "admin",
                      "member"
                    ]
                  }
                }
              },
              "example": {
                "role": "admin"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The member",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TeamMember"
                },
                "example": {
                  "id": "Mb2sQ7vL4n",
                  "name": "Sam Sample",
                  "email": "sam@example.com",
                  "role": "admin",
                  "joined_at": "2026-10-05T09:00:00Z"
                }
              }
            }
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/InvalidRequest"
          }
        }
      },
      "delete": {
        "operationId": "deleteTeamMember",
        "summary": "Remove someone from the team",
        "parameters": [
          {
            "$ref": "#/components/parameters/MemberId"
          }
        ],
        "responses": {
          "204": {
            "description": "Removed"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/InvalidRequest"
          }
        }
      }
    },
    "/webhooks": {
      "get": {
        "operationId": "listWebhooks",
        "summary": "The team's webhook endpoints",
        "description": "Team keys. The URL is masked and the signing secret is never listed.",
        "parameters": [
          {
            "$ref": "#/components/parameters/After"
          },
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/UpdatedSince"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of endpoints",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "pagination"
                  ],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Webhook"
                      }
                    },
                    "pagination": {
                      "$ref": "#/components/schemas/Pagination"
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "Wh5cD7jF1e",
                      "url": "https://example.com/crawlbench-webhook",
                      "events": [
                        "listing.created",
                        "listing.price_cut"
                      ],
                      "enabled": true,
                      "failing_since": null,
                      "last_delivered_at": "2026-11-28T08:45:02Z",
                      "created_at": "2026-11-20T15:10:00Z"
                    }
                  ],
                  "pagination": {
                    "has_more": false,
                    "after": null
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        }
      },
      "post": {
        "operationId": "createWebhook",
        "summary": "Add a webhook endpoint",
        "description": "Team keys, from a person who owns or administers the team. The endpoint gets only the events it picks. A team can have up to 10 endpoints. The answer carries the signing secret once. Messages are signed with `x-crawlbench-signature: t=<unix>,v1=<hex>`, an HMAC-SHA256 of `<t>.<raw body>`.",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "url",
                  "events"
                ],
                "properties": {
                  "url": {
                    "type": "string",
                    "description": "A public HTTPS URL."
                  },
                  "events": {
                    "type": "array",
                    "minItems": 1,
                    "items": {
                      "type": "string",
                      "enum": [
                        "listing.created",
                        "listing.price_cut",
                        "listing.status_change"
                      ]
                    }
                  }
                }
              },
              "example": {
                "url": "https://example.com/crawlbench-webhook",
                "events": [
                  "listing.created",
                  "listing.price_cut"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The endpoint, with its signing secret",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Webhook"
                    },
                    {
                      "type": "object",
                      "required": [
                        "signing_secret"
                      ],
                      "properties": {
                        "signing_secret": {
                          "type": "string"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "id": "Wh5cD7jF1e",
                  "url": "https://example.com/crawlbench-webhook",
                  "events": [
                    "listing.created",
                    "listing.price_cut"
                  ],
                  "enabled": true,
                  "failing_since": null,
                  "last_delivered_at": null,
                  "created_at": "2026-11-20T15:10:00Z",
                  "signing_secret": "shown-once-XXXX"
                }
              }
            }
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/InvalidRequest"
          }
        }
      }
    },
    "/webhooks/{id}": {
      "delete": {
        "operationId": "deleteWebhook",
        "summary": "Remove a webhook endpoint",
        "parameters": [
          {
            "name": "id",
            "description": "The webhook's id.",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "The endpoint is gone"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    }
  },
  "webhooks": {
    "listing.created": {
      "post": {
        "operationId": "receive_listing_created",
        "summary": "listing.created",
        "description": "A search found a new listing. We POST this message to each webhook URL that lists the event, signed as the Developers page says; answer 2xx to take it.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookMessage"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Taken. Any 2xx counts."
          }
        }
      }
    },
    "listing.price_cut": {
      "post": {
        "operationId": "receive_listing_price_cut",
        "summary": "listing.price_cut",
        "description": "The asking price went down, on a listing a search found or one the team saved. `price` is the new price and `previous_price` the one before. We POST this message to each webhook URL that lists the event, signed as the Developers page says; answer 2xx to take it.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookMessage"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Taken. Any 2xx counts."
          }
        }
      }
    },
    "listing.status_change": {
      "post": {
        "operationId": "receive_listing_status_change",
        "summary": "listing.status_change",
        "description": "The listing went pending, sold or no longer listed. `marketplace_status` says which. We POST this message to each webhook URL that lists the event, signed as the Developers page says; answer 2xx to take it.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookMessage"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Taken. Any 2xx counts."
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "key": {
        "type": "http",
        "scheme": "bearer",
        "description": "A session, team or data key."
      },
      "chatbot": {
        "type": "oauth2",
        "description": "A chatbot connected by signing in. Its token works on /mcp only.",
        "flows": {
          "authorizationCode": {
            "authorizationUrl": "https://app.crawlbench.com/connect",
            "tokenUrl": "https://app.crawlbench.com/oauth/token",
            "scopes": {
              "mcp": "The person's searches and listings on one team, through their role."
            }
          }
        }
      }
    },
    "requestBodies": {},
    "parameters": {
      "SearchId": {
        "description": "The search's id.",
        "name": "id",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string"
        }
      },
      "ListingId": {
        "name": "id",
        "in": "path",
        "required": true,
        "description": "The Marketplace item id.",
        "schema": {
          "type": "string"
        }
      },
      "SavedId": {
        "description": "The saved listing's id.",
        "name": "id",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string"
        }
      },
      "ListingSearch": {
        "name": "search",
        "in": "query",
        "description": "One search's id.",
        "schema": {
          "type": "string"
        }
      },
      "ListingVerdict": {
        "name": "verdict",
        "in": "query",
        "schema": {
          "type": "string",
          "enum": [
            "worth_a_look",
            "check_first",
            "skip"
          ]
        }
      },
      "ListingCategory": {
        "description": "Keep the listings in this category, a slug from GET /v1/categories.",
        "name": "category",
        "in": "query",
        "schema": {
          "type": "string"
        }
      },
      "ListingArea": {
        "name": "area",
        "in": "query",
        "description": "A city slug from GET /categories; the listings found in that city.",
        "schema": {
          "type": "string"
        }
      },
      "ListingAssigned": {
        "name": "assigned",
        "in": "query",
        "description": "`me`, or a member's id from GET /team.",
        "schema": {
          "type": "string"
        }
      },
      "MemberId": {
        "name": "id",
        "in": "path",
        "required": true,
        "description": "A member's id from `GET /v1/team`.",
        "schema": {
          "type": "string"
        }
      },
      "After": {
        "name": "after",
        "in": "query",
        "description": "The `after` value of the page before.",
        "schema": {
          "type": "string"
        }
      },
      "Limit": {
        "name": "limit",
        "in": "query",
        "description": "Rows on one page, 1 to 100.",
        "schema": {
          "type": "integer",
          "minimum": 1,
          "maximum": 100,
          "default": 50
        }
      },
      "UpdatedSince": {
        "name": "updated_since",
        "in": "query",
        "description": "Only rows changed at or after this time, ISO 8601 with its zone.",
        "schema": {
          "type": "string",
          "format": "date-time"
        }
      },
      "IdempotencyKey": {
        "name": "Idempotency-Key",
        "in": "header",
        "required": true,
        "description": "Any string of 1 to 255 characters, new for each action.",
        "schema": {
          "type": "string",
          "minLength": 1,
          "maxLength": 255
        }
      }
    },
    "headers": {
      "X-RateLimit-Limit": {
        "description": "Calls allowed each minute for this key.",
        "schema": {
          "type": "integer"
        }
      },
      "X-RateLimit-Remaining": {
        "description": "Calls left in this minute.",
        "schema": {
          "type": "integer"
        }
      },
      "X-RateLimit-Reset": {
        "description": "Seconds until the count starts again.",
        "schema": {
          "type": "integer"
        }
      },
      "Retry-After": {
        "description": "Seconds to wait before the next call.",
        "schema": {
          "type": "integer"
        }
      },
      "Idempotent-Replayed": {
        "description": "`true` when this is the stored answer to an earlier request with the same Idempotency-Key.",
        "schema": {
          "type": "string"
        }
      }
    },
    "schemas": {
      "HideReason": {
        "type": "string",
        "enum": [
          "not_the_item",
          "too_far",
          "price_too_high",
          "seen_before"
        ]
      },
      "ListingNote": {
        "type": "object",
        "required": [
          "id",
          "body",
          "author",
          "created_at",
          "edited_at"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "The note's id, for PATCH and DELETE."
          },
          "body": {
            "type": "string"
          },
          "author": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "edited_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        }
      },
      "ListingNoteBody": {
        "type": "object",
        "required": [
          "body"
        ],
        "properties": {
          "body": {
            "description": "The note's text.",
            "type": "string",
            "maxLength": 2000
          }
        }
      },
      "SearchSentence": {
        "type": "object",
        "required": [
          "sentence"
        ],
        "properties": {
          "sentence": {
            "type": "string",
            "description": "What to look for and where, in the person's words, 12 to 1,000 characters."
          },
          "name": {
            "description": "A name for the search.",
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "SearchGoalPlan": {
        "type": "object",
        "required": [
          "goal"
        ],
        "properties": {
          "goal": {
            "type": "string",
            "description": "What the person wants, in their words, 12 to 1,000 characters."
          },
          "on": {
            "type": "boolean",
            "description": "`true` starts the goal in the same call."
          }
        },
        "additionalProperties": false
      },
      "SearchGoal": {
        "type": "object",
        "required": [
          "sentence",
          "wants",
          "notes",
          "by",
          "version",
          "plain",
          "parts"
        ],
        "properties": {
          "sentence": {
            "type": "string"
          },
          "wants": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "notes": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "by": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "version": {
            "type": "integer"
          },
          "plain": {
            "type": "boolean",
            "description": "`true` when planning failed and the search is a plain one made from the same words."
          },
          "parts": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "label",
                "value",
                "note"
              ],
              "properties": {
                "label": {
                  "type": "string"
                },
                "value": {
                  "type": "string"
                },
                "note": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              }
            }
          }
        }
      },
      "SearchPreview": {
        "type": "object",
        "required": [
          "fields",
          "listed_now",
          "this_week",
          "per_day",
          "warning",
          "check_minutes",
          "searches"
        ],
        "properties": {
          "fields": {
            "$ref": "#/components/schemas/SearchFields"
          },
          "listed_now": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "object",
              "properties": {
                "title": {
                  "type": "string"
                },
                "price": {
                  "type": "number"
                },
                "currency": {
                  "type": "string"
                },
                "city": {
                  "type": "string"
                },
                "url": {
                  "type": "string"
                },
                "image_url": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "posted_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                }
              }
            }
          },
          "this_week": {
            "type": [
              "integer",
              "null"
            ]
          },
          "per_day": {
            "type": [
              "number",
              "null"
            ]
          },
          "warning": {
            "type": [
              "object",
              "null"
            ],
            "required": [
              "reason",
              "text",
              "change"
            ],
            "properties": {
              "reason": {
                "type": "string",
                "enum": [
                  "quiet",
                  "too_many",
                  "off_target"
                ]
              },
              "text": {
                "type": "string"
              },
              "change": {
                "type": [
                  "object",
                  "null"
                ],
                "required": [
                  "label",
                  "fields"
                ],
                "properties": {
                  "label": {
                    "type": "string"
                  },
                  "fields": {
                    "type": "object",
                    "additionalProperties": true
                  }
                }
              }
            }
          },
          "check_minutes": {
            "type": [
              "integer",
              "null"
            ]
          },
          "searches": {
            "type": "object",
            "required": [
              "uses",
              "of"
            ],
            "properties": {
              "uses": {
                "type": "integer"
              },
              "of": {
                "type": [
                  "integer",
                  "null"
                ]
              }
            }
          }
        }
      },
      "SearchFields": {
        "type": "object",
        "description": "`name`, `category`, `country`, `cities` (city slugs from GET /categories), the search's words as `text_rules`, and the category's filters. The old word fields (`search_text`, `must_say_csv`, `excludes_csv`, `words_in_description`) are gone: a request that sends one answers 422 with a message that names `text_rules`.",
        "properties": {
          "text_rules": {
            "description": "The search's words as lines. A listing must fit every line. They replace all of the search's words; an empty list removes them. A search holds at most 5 lines, 10 words in the first line of mode any, 20 in another line that shows, and 50 in a line that hides.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TextRule"
            }
          },
          "name": {
            "description": "A new name for the search.",
            "type": "string"
          },
          "category": {
            "description": "The category to search, a slug from GET /v1/categories.",
            "type": "string"
          },
          "country": {
            "description": "The country to search, like US.",
            "type": "string"
          },
          "cities": {
            "description": "The cities to search, as slugs from GET /v1/categories.",
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "additionalProperties": true
      },
      "TextRule": {
        "type": "object",
        "description": "One line of a search's words: show or hide listings that mention them.",
        "required": [
          "mode",
          "look_in",
          "terms"
        ],
        "properties": {
          "mode": {
            "type": "string",
            "enum": [
              "any",
              "all",
              "none"
            ],
            "description": "any shows listings that mention one of these words, all shows listings that mention all of them, none hides listings that mention one of them. We search Marketplace for the words of the first line of mode any."
          },
          "look_in": {
            "type": "string",
            "enum": [
              "title",
              "title_description"
            ],
            "description": "Where the words are read: in the title, or in the title or description."
          },
          "terms": {
            "type": "array",
            "description": "The line's words, at least one.",
            "items": {
              "type": "object",
              "required": [
                "text"
              ],
              "properties": {
                "text": {
                  "type": "string",
                  "description": "A word or phrase, with no commas or semicolons, at most 80 characters."
                },
                "exact": {
                  "type": "boolean",
                  "description": "Keep together: true reads the words side by side, false in any order. Left out in a request, a phrase is kept together in an all or none line and read in any order in an any line."
                }
              }
            }
          }
        }
      },
      "Search": {
        "type": "object",
        "required": [
          "id",
          "name",
          "sentence",
          "category",
          "on",
          "new_today",
          "last_check_at",
          "problem",
          "text_rules",
          "filters"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "sentence": {
            "type": [
              "string",
              "null"
            ],
            "description": "What it looks for, in one line."
          },
          "category": {
            "type": "string"
          },
          "on": {
            "type": "boolean"
          },
          "new_today": {
            "type": "integer"
          },
          "last_check_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "problem": {
            "type": [
              "string",
              "null"
            ],
            "description": "What needs your action, in one sentence, or null."
          },
          "goal": {
            "description": "Null, or the goal the assistant planned this search from.",
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/SearchGoal"
              }
            ]
          },
          "currency": {
            "type": "string"
          },
          "distance": {
            "type": "string"
          },
          "cities": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "slug": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                }
              }
            }
          },
          "text_rules": {
            "type": "array",
            "description": "The search's words as lines. Empty when it has none.",
            "items": {
              "$ref": "#/components/schemas/TextRule"
            }
          },
          "filters": {
            "type": "object",
            "description": "The filters the search was made with: the ones every category has and the category's own. A filter that was never set is missing.",
            "properties": {
              "category": {
                "type": "string"
              },
              "country": {
                "type": "string",
                "description": "A country code from GET /categories."
              },
              "location_mode": {
                "type": "string"
              },
              "location": {
                "type": "string"
              },
              "radius_miles": {
                "type": "integer",
                "description": "The radius, in miles or kilometres as the country's `distance` says."
              },
              "radius": {
                "type": "integer"
              },
              "price_min_dollars": {
                "type": "number",
                "description": "In the country's own currency, whatever the name says."
              },
              "price_max_dollars": {
                "type": "number",
                "description": "In the country's own currency, whatever the name says."
              },
              "days_since_listed": {
                "type": "integer"
              },
              "item_condition": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "comp_min_rating": {
                "type": "string",
                "deprecated": true,
                "x-reviewed": "Accepted on writes since the first version, so it stays until a new version (ADR 0009). It is read as price_rating_min and never stored. Reads return it too, with the same value as price_rating_min, while the key stays.",
                "description": "Use price_rating_min. The lowest price rating a listing may have to show."
              },
              "price_rating_min": {
                "type": "string",
                "enum": [
                  "super_price",
                  "good_price",
                  "fair_price",
                  "a_bit_pricey",
                  "expensive"
                ],
                "description": "The lowest price rating a listing may have to show and alert (Great, Good, At market, Above market, Overpriced). Left out, any rating shows. When both this and comp_min_rating are sent, this one wins."
              },
              "include_unrated": {
                "type": "boolean",
                "description": "Whether a listing with no price rating yet shows and alerts. Left out, it does."
              },
              "exclude_finance_offers": {
                "type": "boolean"
              },
              "below_usual_price_dollars": {
                "type": "integer",
                "description": "How far under the usual price a listing's price must be, in whole units of the search's currency."
              },
              "below_usual_price_max_dollars": {
                "type": "integer",
                "description": "How far under the usual price a listing's price may be at most, in whole units of the search's currency. Needs below_usual_price_dollars and is not below it."
              },
              "vehicle_kind": {
                "type": "string"
              },
              "vehicle_make": {
                "type": "string"
              },
              "vehicle_model": {
                "type": "string"
              },
              "vehicle_models": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "vehicle_year_min": {
                "type": "integer"
              },
              "vehicle_year_max": {
                "type": "integer"
              },
              "vehicle_max_mileage": {
                "type": "integer"
              },
              "vehicle_transmission": {
                "type": "string"
              },
              "vehicle_seller": {
                "type": "string"
              },
              "vehicle_body": {
                "type": "string"
              },
              "vehicle_exterior_color": {
                "type": "string"
              },
              "vehicle_interior_color": {
                "type": "string"
              },
              "re_property_type": {
                "type": "string"
              },
              "re_listing_type": {
                "type": "string"
              },
              "re_beds_min": {
                "type": "integer"
              },
              "re_beds_max": {
                "type": "integer"
              },
              "re_baths_min": {
                "type": "number"
              },
              "re_baths_max": {
                "type": "number"
              },
              "re_sqft_min": {
                "type": "integer"
              },
              "re_sqft_max": {
                "type": "integer"
              },
              "re_must_have": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "el_device_type": {
                "type": "string"
              },
              "fu_item_type": {
                "type": "string"
              }
            }
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "PriceCheckBlock": {
        "type": "object",
        "description": "The price check, the `vs_market` block of a webhook message: the usual price, the range, the sample size and a rating. Below the comps floor the prices are null and `rating` is `thin_market`, `none` or `held_back`.",
        "properties": {
          "rating": {
            "type": "string",
            "enum": [
              "super_price",
              "good_price",
              "fair_price",
              "a_bit_pricey",
              "expensive",
              "check_first",
              "held_back",
              "thin_market",
              "none"
            ],
            "description": "check_first: the ask is 80% or more under the usual price with nothing else wrong; the listing is shown and alerted, and should be read before buying. held_back: a listing held back as noise (a part, a down payment, a placeholder price). A listing the team marked not noise reads its price band."
          },
          "rating_label": {
            "type": "string",
            "description": "Great price, Good price, Fair price, High price, Check first, Held back or Few similar listings."
          },
          "expected": {
            "type": [
              "number",
              "null"
            ],
            "description": "The usual price."
          },
          "low": {
            "type": [
              "number",
              "null"
            ]
          },
          "high": {
            "type": [
              "number",
              "null"
            ]
          },
          "sample_size": {
            "type": [
              "integer",
              "null"
            ],
            "description": "How many similar listings the usual price rests on."
          },
          "delta_pct": {
            "type": [
              "number",
              "null"
            ],
            "description": "How far the price is from the usual price, in percent."
          },
          "dots_on": {
            "type": "integer",
            "description": "How many of the five dots of the price meter are lit."
          },
          "ask_mark_pct": {
            "type": [
              "number",
              "null"
            ],
            "description": "Where the ask sits on the range bar, in percent from the left."
          },
          "band_left_pct": {
            "type": [
              "number",
              "null"
            ],
            "description": "Where the usual range starts on the range bar, in percent from the left."
          },
          "band_right_pct": {
            "type": [
              "number",
              "null"
            ],
            "description": "Where the usual range ends on the range bar, in percent from the left."
          },
          "money_line_short": {
            "type": [
              "string",
              "null"
            ],
            "description": "The gap to the usual price in words, such as \"$1,500 under expected\"."
          },
          "evidence_line": {
            "type": [
              "string",
              "null"
            ],
            "description": "What the usual price rests on, in words, such as \"42 similar listings, last 60 days\"."
          },
          "urgency": {
            "type": [
              "string",
              "null"
            ],
            "description": "How fast similar listings go, in words, or null."
          }
        }
      },
      "WebhookMessage": {
        "type": "object",
        "required": [
          "api_version",
          "event",
          "delivered_at",
          "data"
        ],
        "description": "One webhook delivery, as the receiver gets it. Its own shape, not the shape of GET /listings.",
        "properties": {
          "api_version": {
            "type": "string",
            "description": "The shape of this message, as a dated version."
          },
          "event": {
            "type": "string",
            "enum": [
              "listing.created",
              "listing.price_cut",
              "listing.status_change"
            ]
          },
          "event_id": {
            "type": "string",
            "description": "One id for each event. Keep it to skip a message you already handled."
          },
          "delivered_at": {
            "type": "string",
            "format": "date-time",
            "description": "When we sent this delivery."
          },
          "data": {
            "$ref": "#/components/schemas/WebhookData"
          }
        }
      },
      "WebhookData": {
        "type": "object",
        "required": [
          "team",
          "listing",
          "vs_market",
          "match_reasons"
        ],
        "properties": {
          "id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The id of the match, or null for a saved listing no search found."
          },
          "matched_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "team": {
            "type": "object",
            "required": [
              "id",
              "name"
            ],
            "properties": {
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              }
            }
          },
          "monitor": {
            "type": [
              "object",
              "null"
            ],
            "description": "The search that found the listing; null for a saved listing no search found.",
            "required": [
              "id",
              "name",
              "category"
            ],
            "properties": {
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "category": {
                "type": "string"
              }
            }
          },
          "listing": {
            "$ref": "#/components/schemas/WebhookListing"
          },
          "vs_market": {
            "$ref": "#/components/schemas/PriceCheckBlock"
          },
          "match_reasons": {
            "type": "object",
            "additionalProperties": true,
            "x-reviewed": "Sent since the first webhook version, so it stays until a new version (ADR 0009).",
            "description": "Why the search took the listing, as words by name. Empty for a saved listing no search found."
          },
          "saved_listing": {
            "type": "object",
            "description": "On a saved listing's event.",
            "required": [
              "id"
            ],
            "properties": {
              "id": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The id for /saved/{id}."
              }
            }
          },
          "previous_price": {
            "type": [
              "number",
              "null"
            ],
            "description": "On `listing.price_cut`, the price before."
          },
          "price": {
            "type": [
              "number",
              "null"
            ],
            "description": "On `listing.price_cut`, the new price."
          },
          "marketplace_status": {
            "type": "string",
            "description": "On `listing.status_change`, pending, sold or unavailable."
          },
          "marketplace_status_label": {
            "type": [
              "string",
              "null"
            ],
            "description": "On `listing.status_change`, the status in words."
          }
        }
      },
      "PhotoUrls": {
        "type": "array",
        "description": "Every photo of the listing we hold, as https addresses, in the order the listing shows them. Empty when we hold none. A photo whose address has expired is left out, so the list can be shorter than `media.photos`. Addresses are signed by Marketplace and stop working after a while: download the photo when you read the listing.",
        "items": {
          "type": "string"
        }
      },
      "WebhookListing": {
        "type": "object",
        "required": [
          "id",
          "title",
          "currency",
          "url"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "The Marketplace item id, as GET /listings gives it."
          },
          "title": {
            "type": "string"
          },
          "price": {
            "type": "number"
          },
          "currency": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "location": {
            "type": "string"
          },
          "posted_at": {
            "type": "string",
            "format": "date-time"
          },
          "first_seen_at": {
            "type": "string",
            "format": "date-time"
          },
          "image_url": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "facts": {
            "$ref": "#/components/schemas/ListingFacts"
          },
          "previous_price": {
            "type": "number"
          },
          "price_changed_at": {
            "type": "string",
            "format": "date-time"
          },
          "marketplace_status": {
            "type": "string"
          },
          "marketplace_status_changed_at": {
            "type": "string",
            "format": "date-time"
          },
          "seller": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string"
              },
              "type": {
                "type": "string"
              },
              "url": {
                "type": "string"
              }
            }
          }
        }
      },
      "ListingFacts": {
        "type": "object",
        "description": "What we read from the listing. A fact we could not read is missing.",
        "properties": {
          "make": {
            "type": "string"
          },
          "model": {
            "type": "string"
          },
          "year": {
            "type": "integer"
          },
          "trim": {
            "type": "string"
          },
          "body_style": {
            "type": "string"
          },
          "mileage_mi": {
            "type": "number",
            "description": "Miles, whatever the listing's own unit."
          },
          "mileage_km": {
            "type": "number",
            "description": "Kilometres, when the listing gave it."
          },
          "transmission": {
            "type": "string"
          },
          "fuel_type": {
            "type": "string"
          },
          "condition": {
            "type": "string",
            "enum": [
              "new",
              "used_like_new",
              "used_good",
              "used_fair"
            ]
          },
          "exterior_color": {
            "type": "string"
          },
          "interior_color": {
            "type": "string"
          },
          "owners": {
            "type": "integer"
          },
          "title_status": {
            "type": "string"
          },
          "seller_type": {
            "type": "string"
          },
          "vehicle_kind": {
            "type": "string"
          },
          "brand": {
            "type": "string"
          },
          "listing_type": {
            "type": "string",
            "description": "For a home, such as sale or rent."
          },
          "property_type": {
            "type": "string"
          },
          "beds": {
            "type": "number"
          },
          "baths": {
            "type": "number"
          },
          "sqft": {
            "type": "number"
          },
          "sqm": {
            "type": "number"
          }
        }
      },
      "Listing": {
        "type": "object",
        "required": [
          "id",
          "title",
          "price",
          "currency",
          "url",
          "saved",
          "handled",
          "hidden"
        ],
        "description": "The listing and the team's state. `id` is the Marketplace item id, the same for every team. `handled_by`, `handled_at`, `hidden_reason` and `outcome` are null until they are recorded.",
        "properties": {
          "id": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "price": {
            "type": [
              "number",
              "null"
            ]
          },
          "currency": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "location": {
            "type": [
              "string",
              "null"
            ]
          },
          "posted_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "first_seen_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When we first saw it on Marketplace."
          },
          "image_url": {
            "type": [
              "string",
              "null"
            ]
          },
          "photo_urls": {
            "$ref": "#/components/schemas/PhotoUrls"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "facts": {
            "$ref": "#/components/schemas/ListingFacts"
          },
          "previous_price": {
            "type": [
              "number",
              "null"
            ],
            "description": "The price before the last change, or null."
          },
          "price_changed_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "marketplace_status": {
            "type": [
              "string",
              "null"
            ],
            "description": "Whether it is still for sale, pending, sold or gone."
          },
          "marketplace_status_changed_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "seller": {
            "type": [
              "object",
              "null"
            ],
            "description": "Who sells it.",
            "properties": {
              "name": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "type": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "What the listing says the seller is, such as Individual or Dealership."
              },
              "url": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The seller's page on Marketplace."
              },
              "kind": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "A private seller or a dealer."
              }
            }
          },
          "people_looking": {
            "type": [
              "object",
              "null"
            ],
            "description": "On GET /listings/{id}, how many teams look for listings like this one, null below 5 teams.",
            "properties": {
              "n": {
                "type": "integer"
              },
              "reaching_ask": {
                "type": "integer"
              }
            }
          },
          "sold_nearby": {
            "type": [
              "object",
              "null"
            ],
            "description": "On GET /listings/{id}, what similar listings sold for near this one: the 25th, 50th and 75th percentile in major units, how many sales stand behind it and how many were reported or estimated, and the day it is from. Null below the floors (5 outcomes from 3 teams, no team over half), and null for a team with no counted sale in the last 90 days (a sale it recorded with an amount between 20% and 300% of the ask, while its team counts its results in group numbers).",
            "properties": {
              "day": {
                "type": "string",
                "format": "date"
              },
              "p25": {
                "type": "number"
              },
              "p50": {
                "type": "number"
              },
              "p75": {
                "type": "number"
              },
              "n": {
                "type": "integer"
              },
              "reported_n": {
                "type": "integer"
              },
              "estimated_n": {
                "type": "integer"
              }
            }
          },
          "fast_price": {
            "type": [
              "number",
              "null"
            ],
            "description": "On GET /listings/{id}, the ask, in major units, at which similar listings in this one's price band sold within a week. Null under its floor, and for a team with no counted sale in the last 90 days (a sale it recorded with an amount between 20% and 300% of the ask, while its team counts its results in group numbers)."
          },
          "price_history": {
            "type": "array",
            "description": "On GET /listings/{id}, the asking prices the ledger saw for this listing, oldest first: the first ask, then each cut and raise.",
            "items": {
              "type": "object",
              "properties": {
                "amount": {
                  "type": "number",
                  "description": "The ask, in major units."
                },
                "currency": {
                  "type": "string"
                },
                "previous": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "description": "The ask before this change. Null for the first ask."
                },
                "kind": {
                  "type": "string",
                  "enum": [
                    "first",
                    "cut",
                    "raise"
                  ]
                },
                "observed_at": {
                  "type": "string",
                  "format": "date-time"
                }
              }
            }
          },
          "notes": {
            "type": "array",
            "description": "On GET /listings/{id}, the team's notes.",
            "items": {
              "$ref": "#/components/schemas/ListingNote"
            }
          },
          "price_check": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/PriceCheckBlock"
              },
              {
                "type": "null"
              }
            ]
          },
          "verdict": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "worth_a_look",
              "check_first",
              "skip",
              null
            ]
          },
          "searches": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                }
              }
            }
          },
          "found_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "saved": {
            "type": "boolean"
          },
          "saved_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The id for /saved/{id}."
          },
          "handled": {
            "type": "boolean"
          },
          "handled_by": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "id": {
                "type": "string",
                "description": "The member's id, as GET /team lists it."
              },
              "name": {
                "type": "string"
              }
            }
          },
          "handled_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "hidden": {
            "type": "boolean"
          },
          "hidden_reason": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/HideReason"
              },
              {
                "type": "null"
              }
            ]
          },
          "outcome": {
            "type": [
              "object",
              "null"
            ],
            "description": "The team's own outcome for the listing.",
            "properties": {
              "result": {
                "type": "string"
              },
              "offered": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "agreed": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "agreed_on": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date"
              },
              "currency": {
                "type": "string"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              }
            }
          },
          "assigned_to": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  }
                }
              }
            ]
          }
        }
      },
      "Saved": {
        "type": "object",
        "required": [
          "id",
          "listing",
          "saved_at",
          "checked_at",
          "checks_ended_at"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "listing": {
            "$ref": "#/components/schemas/Listing",
            "description": "The listing, with its Marketplace item id, without the team's state."
          },
          "saved_at": {
            "type": "string",
            "format": "date-time"
          },
          "price_at_save": {
            "type": [
              "number",
              "null"
            ]
          },
          "alert_below": {
            "type": [
              "number",
              "null"
            ]
          },
          "checked_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "checks_ended_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When it was last checked, once it is no longer checked (sold, left Marketplace, or 60 days)."
          }
        }
      },
      "Error": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "object",
            "required": [
              "code",
              "message"
            ],
            "properties": {
              "code": {
                "type": "string",
                "description": "A stable word to switch on.",
                "enum": [
                  "invalid_request",
                  "validation_failed",
                  "unauthorized",
                  "forbidden",
                  "plan_required",
                  "outside_contract",
                  "email_unconfirmed",
                  "upgrade_required",
                  "not_found",
                  "no_account",
                  "conflict",
                  "apple_reauth_required",
                  "delete_failed",
                  "password_required",
                  "password_wrong",
                  "code_required",
                  "code_wrong",
                  "code_expired",
                  "search_limit_reached",
                  "people_limit_reached",
                  "saved_market_limit_reached",
                  "saved_limit_reached",
                  "own_listing_limit_reached",
                  "needs_place",
                  "not_a_search",
                  "needs_confirmation",
                  "goal_changes_reached",
                  "saved_market_daily_limit",
                  "new_market_daily_limit",
                  "markets_filling_limit",
                  "market_budget_reached",
                  "listing_pages_reached",
                  "city_feed_daily_limit",
                  "segment_search_daily_limit",
                  "unsaved_estimates_limit",
                  "watch_limit_reached",
                  "limit",
                  "too_many_tries",
                  "rate_limited",
                  "server_error",
                  "unavailable"
                ]
              },
              "message": {
                "type": "string",
                "description": "A plain sentence to show a person."
              },
              "resets_at": {
                "type": "string",
                "description": "When a daily limit lifts, in UTC, like 2026-11-28T00:00:00Z."
              }
            }
          }
        }
      },
      "Pagination": {
        "type": "object",
        "required": [
          "has_more",
          "after"
        ],
        "properties": {
          "has_more": {
            "type": "boolean"
          },
          "after": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "TeamMember": {
        "type": "object",
        "required": [
          "id",
          "name",
          "email",
          "role",
          "joined_at"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "role": {
            "type": "string",
            "enum": [
              "owner",
              "admin",
              "member"
            ]
          },
          "joined_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "TeamInvite": {
        "type": "object",
        "required": [
          "email",
          "role",
          "expires_at"
        ],
        "properties": {
          "email": {
            "type": "string"
          },
          "role": {
            "type": "string"
          },
          "expires_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "Webhook": {
        "type": "object",
        "required": [
          "id",
          "url",
          "events",
          "enabled",
          "failing_since",
          "last_delivered_at",
          "created_at"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "url": {
            "type": "string",
            "description": "Masked, because a receiving URL often carries a secret."
          },
          "events": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "listing.created",
                "listing.price_cut",
                "listing.status_change"
              ]
            }
          },
          "enabled": {
            "type": "boolean"
          },
          "failing_since": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Set when deliveries kept failing for 24 hours; a success clears it."
          },
          "last_delivered_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "TeamEvent": {
        "type": "object",
        "required": [
          "id",
          "kind",
          "actor",
          "listing",
          "search",
          "member",
          "hidden_reason",
          "detail",
          "at"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "The event's id. Pass it as `after` to read the next page."
          },
          "kind": {
            "type": "string"
          },
          "actor": {
            "description": "Who did it; null when Crawlbench did.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/TeamEventPerson"
              },
              {
                "type": "null"
              }
            ]
          },
          "listing": {
            "oneOf": [
              {
                "type": "object",
                "required": [
                  "id",
                  "title"
                ],
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "title": {
                    "type": "string"
                  }
                }
              },
              {
                "type": "null"
              }
            ]
          },
          "search": {
            "oneOf": [
              {
                "type": "object",
                "required": [
                  "id",
                  "name"
                ],
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  }
                }
              },
              {
                "type": "null"
              }
            ]
          },
          "member": {
            "description": "The person an assignment, a join or a leave is about.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/TeamEventPerson"
              },
              {
                "type": "null"
              }
            ]
          },
          "hidden_reason": {
            "type": [
              "string",
              "null"
            ]
          },
          "detail": {
            "type": "object",
            "description": "The words of the change. Outcome amounts are never in it.",
            "properties": {
              "note": {
                "type": "string",
                "description": "The note's text, on `note_added`."
              },
              "search_name": {
                "type": "string",
                "description": "The search's name, on the search kinds."
              },
              "changes": {
                "type": "object",
                "description": "On `search_changed`, each filter that changed, named as in `Search.filters`, with its old and new value.",
                "additionalProperties": {
                  "type": "array",
                  "items": {}
                }
              },
              "result": {
                "type": "string",
                "description": "The outcome, on `outcome_recorded` and `outcome_changed`."
              },
              "was": {
                "type": "string",
                "description": "The outcome it replaced, on `outcome_changed`."
              }
            }
          },
          "at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "TeamEventPerson": {
        "type": "object",
        "required": [
          "id",
          "name"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "A member id from `GET /v1/team`."
          },
          "name": {
            "type": "string"
          }
        }
      },
      "Team": {
        "type": "object",
        "required": [
          "id",
          "name",
          "people",
          "members",
          "invites"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "people": {
            "type": "object",
            "required": [
              "used",
              "limit"
            ],
            "properties": {
              "used": {
                "type": "integer"
              },
              "limit": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": "Null when the plan has no limit."
              }
            }
          },
          "members": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TeamMember"
            }
          },
          "invites": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TeamInvite"
            }
          },
          "count_in_groups": {
            "type": "boolean",
            "description": "Whether the team's results count in group numbers. Starts on."
          }
        }
      }
    },
    "responses": {
      "InvalidRequest": {
        "description": "A field is missing or of the wrong type (`invalid_request`), or a value is not allowed (`validation_failed`).",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "Unauthorized": {
        "description": "No key, a revoked key, or a wrong password or code (`unauthorized`).",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "Forbidden": {
        "description": "The key cannot do this or belongs to another product (`forbidden`), the plan does not include it (`plan_required`), the email is not confirmed (`email_unconfirmed`), or the app is too old (`upgrade_required`).",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "NotFound": {
        "description": "No such thing for this key (`not_found`).",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "Conflict": {
        "description": "The same Idempotency-Key with a different body, or a state that does not allow this (`conflict`).",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "RateLimited": {
        "description": "Over the calls allowed each minute (`rate_limited`).",
        "headers": {
          "Retry-After": {
            "$ref": "#/components/headers/Retry-After"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      }
    }
  }
}