{
  "openapi": "3.0.1",
  "info": {
    "title": "eBay Sold Listings Scraper with Validated Data",
    "description": "Collect eBay sold listings with displayed prices, sold dates, local filters, exact result caps, deduplication, and source provenance. Caffein fallback uses your Apify account and adds upstream fees. US tested; UK beta.",
    "version": "1.0",
    "x-build-id": "JJCZi9RWMGW7mRjXy"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/whoareyouanas~ebay-sold-listings-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-whoareyouanas-ebay-sold-listings-scraper",
        "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/whoareyouanas~ebay-sold-listings-scraper/runs": {
      "post": {
        "operationId": "runs-sync-whoareyouanas-ebay-sold-listings-scraper",
        "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/whoareyouanas~ebay-sold-listings-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-whoareyouanas-ebay-sold-listings-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "required": [
          "keywords"
        ],
        "properties": {
          "keywords": {
            "title": "Keywords",
            "minItems": 1,
            "maxItems": 100,
            "type": "array",
            "description": "One to 100 searches. Shared filters apply to each keyword/site pair.",
            "items": {
              "type": "string",
              "minLength": 1
            }
          },
          "ebaySites": {
            "title": "eBay marketplaces",
            "minItems": 1,
            "maxItems": 2,
            "uniqueItems": true,
            "type": "array",
            "description": "US (ebay.com) has passed live retrieval checks. UK (ebay.co.uk) is beta; results and GBP fields require successful source validation.",
            "items": {
              "type": "string",
              "enum": [
                "ebay.com",
                "ebay.co.uk"
              ]
            },
            "default": [
              "ebay.com"
            ]
          },
          "maxResultsPerKeyword": {
            "title": "Matches per keyword and site",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Maximum matched unique items for each keyword/site query, including overlap already emitted elsewhere.",
            "default": 20
          },
          "maxResults": {
            "title": "Unique listings across the run",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Exact global cap on unique marketplace/item observations. Summaries and repeated query matches do not count.",
            "default": 100
          },
          "daysToScrape": {
            "title": "Calendar days including today",
            "minimum": 1,
            "maximum": 90,
            "type": "integer",
            "description": "Displayed calendar-date window anchored to UTC date at run start; each explicit bound overrides its corresponding rolling bound.",
            "default": 30
          },
          "dateFrom": {
            "title": "From date",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Inclusive YYYY-MM-DD displayed calendar-date label within the supported public window. Not an exact UTC transaction boundary."
          },
          "dateTo": {
            "title": "Through date",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Inclusive YYYY-MM-DD displayed calendar-date label; cannot exceed the UTC date at run start."
          },
          "categoryId": {
            "title": "Search category ID",
            "pattern": "^\\d+$",
            "type": "string",
            "description": "Use 0 for the API fallback. Other categories require verified native controls and stop before a paid fallback call.",
            "default": "0"
          },
          "minPrice": {
            "title": "Minimum displayed price",
            "minimum": 0,
            "type": "number",
            "description": "eBay source price filter, in each marketplace display currency. Not a hidden accepted-offer amount."
          },
          "maxPrice": {
            "title": "Maximum displayed price",
            "minimum": 0,
            "type": "number",
            "description": "Upper eBay displayed-price filter. Must be >= minPrice."
          },
          "itemCondition": {
            "title": "Condition",
            "enum": [
              "any",
              "new",
              "used",
              "forParts"
            ],
            "type": "string",
            "description": "Initial broad eBay condition filter. Preserve observed condition labels and derived-ID provenance.",
            "default": "any"
          },
          "buyingFormat": {
            "title": "Buying format",
            "enum": [
              "all",
              "auction",
              "buyItNow"
            ],
            "type": "string",
            "description": "Filter tested on the supported source: all, auction, or fixed-price listings.",
            "default": "all"
          },
          "itemLocation": {
            "title": "Item location",
            "enum": [
              "default",
              "domestic",
              "worldwide"
            ],
            "type": "string",
            "description": "Use default for the API fallback. Domestic/worldwide require verified native controls and stop before paid fallback retrieval.",
            "default": "default"
          },
          "includeBestOffers": {
            "title": "Include accepted-offer listings",
            "type": "boolean",
            "description": "Include explicitly detected Best Offer records with asking-price labels. False cannot exclude undisclosed offers.",
            "default": true
          },
          "includeRaw": {
            "title": "Include raw source labels",
            "type": "boolean",
            "description": "Preserve short non-secret price/date/shipping/status strings for auditing. No full-page HTML in listing rows.",
            "default": true
          },
          "includeAnalytics": {
            "title": "Include comps summary",
            "type": "boolean",
            "description": "Included key-value-store summary of conservative currency-separated cohorts; never an extra billable row.",
            "default": true
          },
          "maxConcurrency": {
            "title": "Maximum active searches",
            "minimum": 1,
            "maximum": 16,
            "type": "integer",
            "description": "At most two API searches run together. Paid hybrid searches may run sequentially to protect the remaining output budget.",
            "default": 2
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Apify proxy for the native attempt only. API mode does not use your proxy configuration. Hybrid can use its paid fallback if proxy setup fails.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          },
          "dateWindowPolicy": {
            "title": "Unknown-date handling",
            "enum": [
              "strict",
              "includeUnknown"
            ],
            "type": "string",
            "description": "Strict excludes undated/ambiguous-year rows. Include unknown emits them with DATE_WINDOW_UNVERIFIABLE and uncertain date matching.",
            "default": "strict"
          },
          "retrievalMode": {
            "title": "Retrieval mode",
            "enum": [
              "hybrid",
              "native",
              "api"
            ],
            "type": "string",
            "description": "Hybrid tries native retrieval first, then caffein.dev/ebay-sold-listings. API calls that provider directly; native has no fallback and currently encounters access blocks. Caffein fees are separate and limited by upstreamBudgetUsd.",
            "default": "hybrid"
          },
          "upstreamBudgetUsd": {
            "title": "Upstream Actor budget (USD)",
            "minimum": 0.01,
            "maximum": 1000,
            "type": "number",
            "description": "Separate aggregate event-charge limit for Caffein child runs, including startup and fetched rows later excluded or deduplicated. This does not replace the Actor’s own max cost per run. Uncertain starts stop additional paid calls.",
            "default": 1
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}