{
  "openapi": "3.0.1",
  "info": {
    "title": "eBay Sold Listings Search",
    "description": "Get confirmed eBay sold prices — not asking prices. Search by keyword across 8 marketplaces, filter by date range, and export clean structured data for comps, resale pricing, and market research.",
    "version": "1.19",
    "x-build-id": "I5KLjd0QtsvADprhg"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/caffein.dev~ebay-sold-listings/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-caffein.dev-ebay-sold-listings",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/caffein.dev~ebay-sold-listings/runs": {
      "post": {
        "operationId": "runs-sync-caffein.dev-ebay-sold-listings",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/caffein.dev~ebay-sold-listings/run-sync": {
      "post": {
        "operationId": "run-sync-caffein.dev-ebay-sold-listings",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "keywords": {
            "title": "Keywords",
            "minItems": 1,
            "maxItems": 6,
            "uniqueItems": true,
            "type": "array",
            "description": "One or more search keywords. Each keyword runs as a separate search with the same filters applied to all.",
            "items": {
              "type": "string"
            }
          },
          "keyword": {
            "title": "Keyword (deprecated — use Keywords)",
            "type": "string",
            "description": "Single search keyword. Deprecated: use the 'keywords' array field instead."
          },
          "search": {
            "title": "Search (deprecated — use Keywords)",
            "type": "string",
            "description": "Deprecated: alias for the single-keyword `keyword` field. Use the `keywords` array instead. Accepted for backward compatibility with callers that send `search`. Backslash-escaped quotes (\\\") in the value are unescaped before the search runs."
          },
          "daysToScrape": {
            "title": "Days to Scrape",
            "minimum": 1,
            "maximum": 90,
            "type": "integer",
            "description": "Number of days back to scrape sold listings (default: 30)",
            "default": 30
          },
          "count": {
            "title": "Count",
            "minimum": 1,
            "type": "integer",
            "description": "Number of listings to scrape (default: 100)",
            "default": 100
          },
          "categoryId": {
            "title": "Category",
            "type": "string",
            "description": "eBay category ID — maps directly to the `_sacat` URL parameter. Enter ANY eBay category ID as free text; you are not limited to a preset list. Use \"0\" (the default) for All Categories. Don't know the ID? We maintain the full, up-to-date list of category & subcategory IDs at https://sold-comps.com/ebay-categories",
            "default": "0"
          },
          "subcategoryId": {
            "title": "Subcategory",
            "type": "string",
            "description": "Optional eBay subcategory ID — also maps to `_sacat`. Enter ANY subcategory ID as free text. When set, it overrides the Category field above. Leave blank to search at the category level. Full ID reference: https://sold-comps.com/ebay-categories. The output record's `categoryId` / `category` fields reflect the effective category actually used for the search.",
            "default": ""
          },
          "ebaySite": {
            "title": "eBay Site",
            "enum": [
              "ebay.com",
              "ebay.co.uk",
              "ebay.de",
              "ebay.fr",
              "ebay.it",
              "ebay.es",
              "ebay.ca",
              "ebay.com.au"
            ],
            "type": "string",
            "description": "eBay site to scrape from",
            "default": "ebay.com"
          },
          "sortOrder": {
            "title": "Sort order",
            "enum": [
              "endedRecently",
              "timeNewlyListed",
              "pricePlusPostageLowest",
              "pricePlusPostageHighest",
              "distanceNearest"
            ],
            "type": "string",
            "description": "Sort order for the sold search results page.",
            "default": "endedRecently"
          },
          "minPrice": {
            "title": "Min price",
            "minimum": 0,
            "type": "number",
            "description": "Minimum sold price filter (search-page filter)."
          },
          "maxPrice": {
            "title": "Max price",
            "minimum": 0,
            "type": "number",
            "description": "Maximum sold price filter (search-page filter)."
          },
          "itemLocation": {
            "title": "Item location",
            "enum": [
              "default",
              "domestic",
              "worldwide"
            ],
            "type": "string",
            "description": "Search-page item location filter.",
            "default": "default"
          },
          "itemCondition": {
            "title": "Condition",
            "enum": [
              "any",
              "new",
              "used"
            ],
            "type": "string",
            "description": "Search-page condition filter.",
            "default": "any"
          },
          "includeCompletedListings": {
            "title": "Include Completed Listings",
            "type": "boolean",
            "description": "When true (default), includes eBay's Completed Listings filter alongside the Sold filter. This enables accurate detection of 'Best Offer Accepted' listings via the listingType and isBestOfferAccepted fields. When false, uses only the Sold filter — all results are guaranteed sold items, but Best Offer Accepted items will appear as regular 'buy_it_now' with the asking price shown as soldPrice.",
            "default": true
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}