{
  "openapi": "3.0.1",
  "info": {
    "title": "Swappa Scraper - Used Tech, Prices, Sellers & Price History",
    "description": "Scrape Swappa used-tech listings by device, carrier, storage, condition or color. Extract prices, seller details, battery health and full listing data, plus price guides, trade-in values and monthly price history.",
    "version": "0.1",
    "x-build-id": "ElR11p8xopC9OGagq"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/abotapi~swappa-com/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-abotapi-swappa-com",
        "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/abotapi~swappa-com/runs": {
      "post": {
        "operationId": "runs-sync-abotapi-swappa-com",
        "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/abotapi~swappa-com/run-sync": {
      "post": {
        "operationId": "run-sync-abotapi-swappa-com",
        "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": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "Mode",
            "enum": [
              "search",
              "url"
            ],
            "type": "string",
            "description": "Search mode resolves a device keyword to a product and walks its catalogue. URL mode reads addresses you paste.",
            "default": "search"
          },
          "resultType": {
            "title": "What to return",
            "enum": [
              "both",
              "listings",
              "soldPrices"
            ],
            "type": "string",
            "description": "Applies in both modes. Sold-price history is one record per device model carrying completed-sale rows, the monthly average sold price per storage size, list-versus-sale spreads, and the trade-in value per carrier and storage. Listings are the individual devices currently for sale."
          },
          "queries": {
            "title": "Devices",
            "type": "array",
            "description": "Device names to look up, for example 'iPhone 15 Pro' or 'MacBook Air M2'. A product slug such as 'apple-iphone-15-pro' is accepted directly. Each entry becomes one scrape target.",
            "items": {
              "type": "string"
            }
          },
          "condition": {
            "title": "Condition",
            "enum": [
              "",
              "new",
              "mint",
              "good",
              "fair"
            ],
            "type": "string",
            "description": "Search mode only. Keep only devices graded at this condition.",
            "default": ""
          },
          "carrier": {
            "title": "Carrier",
            "enum": [
              "",
              "unlocked",
              "att",
              "t-mobile",
              "verizon",
              "mint"
            ],
            "type": "string",
            "description": "Search mode only. Keep only devices that work on this carrier. This includes carrier-locked devices on that network AND unlocked devices, which work anywhere; devices locked to a different carrier are excluded. An unrecognised value is ignored by the source and returns everything.",
            "default": ""
          },
          "storage": {
            "title": "Storage size",
            "enum": [
              "",
              "64gb",
              "128gb",
              "256gb",
              "512gb",
              "1tb"
            ],
            "type": "string",
            "description": "Search mode only. Keep only devices with this storage size. Sizes that a given model does not offer simply return nothing.",
            "default": ""
          },
          "color": {
            "title": "Colour",
            "type": "string",
            "description": "Search mode only. Colour slug as the catalogue uses it, for example 'black' or 'blue'. Leave empty for any colour. A value the source does not recognise is ignored and returns every colour, so check the spelling if the results look unfiltered."
          },
          "modeln": {
            "title": "Model number",
            "type": "string",
            "description": "Search mode only. The catalogue's model-number filter token. Leave empty for any model number. A value the source does not recognise is ignored and returns every model number, so check the token if the results look unfiltered."
          },
          "sort": {
            "title": "Sort order",
            "enum": [
              "",
              "price_low",
              "price_high",
              "listing_created_newest",
              "listing_created_oldest"
            ],
            "type": "string",
            "description": "Search mode only. Order the catalogue before reading it.",
            "default": ""
          },
          "withWarranty": {
            "title": "One-year warranty only",
            "type": "boolean",
            "description": "Search mode only. Keep only devices sold with a one-year warranty.",
            "default": false
          },
          "acceptsCreditCards": {
            "title": "Accepts credit cards",
            "type": "boolean",
            "description": "Search mode only. Keep only devices from sellers who take card payment.",
            "default": false
          },
          "carrierUnlockedOnly": {
            "title": "Carrier unlocked only",
            "type": "boolean",
            "description": "Search mode only. Keep only devices that are carrier unlocked.",
            "default": false
          },
          "excludeBusinesses": {
            "title": "Exclude enterprise sellers",
            "type": "boolean",
            "description": "Search mode only. Drop high-volume enterprise sellers and keep individual sellers only.",
            "default": false
          },
          "phoneCheckCertified": {
            "title": "Certified devices only",
            "type": "boolean",
            "description": "Search mode only. Keep only devices that carry a third-party diagnostic certification.",
            "default": false
          },
          "internationalShipping": {
            "title": "Ships internationally",
            "type": "boolean",
            "description": "Search mode only. Keep only devices whose seller ships outside the United States.",
            "default": false
          },
          "urls": {
            "title": "Addresses",
            "type": "array",
            "description": "Multi-URL supported. Paste listing catalog, product, prices, guide, sales-history, single device, or category/brand links. Page numbers and URL filters are preserved. The catalogue filters above are ignored; the price and battery filters below still apply.",
            "items": {
              "type": "string"
            }
          },
          "minPrice": {
            "title": "Minimum price (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Applies in both modes. Drop devices priced below this."
          },
          "maxPrice": {
            "title": "Maximum price (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Applies in both modes. Drop devices priced above this."
          },
          "minBatteryHealth": {
            "title": "Minimum battery health (%)",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Applies in both modes. Drop devices whose stated battery health is below this. Devices that publish no battery figure are dropped when this is set."
          },
          "fetchDetails": {
            "title": "Open each device page",
            "type": "boolean",
            "description": "Open every device page for the full description, damage notes, seller policies, compatible carriers, specifications and all full-size photos. Adds a per-record surcharge for successfully enriched results.",
            "default": false
          },
          "deepSoldHistory": {
            "title": "Deep sold-price history",
            "type": "boolean",
            "description": "The site publishes the twenty most recent completed sales per slice, so a fast-selling model shows only a couple of days. Turning this on sweeps the condition, carrier and storage slices to reach months of completed sales instead. Costs up to twelve extra requests per device model and adds the detail-enrichment surcharge to each sold-price record it deepens.",
            "default": false
          },
          "maxPages": {
            "title": "Maximum catalogue pages per device",
            "minimum": 0,
            "type": "integer",
            "description": "Safety stop on how deep to walk each device's catalogue. Use 0 for no limit, which is the default: the walk stops on its own when the catalogue ends, and the maximum-devices setting below is the one limit that bounds a normal run.",
            "default": 0
          },
          "maxListings": {
            "title": "Maximum devices",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after this many records. Use 0 for no limit.",
            "default": 20
          },
          "incrementalMode": {
            "title": "Incremental mode",
            "type": "boolean",
            "description": "Remember the previous run of this same search and label each record NEW, UPDATED, REAPPEARED or EXPIRED. For finishing a single interrupted run use resumeFromRunId instead.",
            "default": false
          },
          "emitUnchanged": {
            "title": "Also return unchanged records",
            "type": "boolean",
            "description": "Incremental mode only. Returns records that did not change since the last run. These are extra rows and they are billed like any other row.",
            "default": false
          },
          "emitExpired": {
            "title": "Also return records that disappeared",
            "type": "boolean",
            "description": "Incremental mode only. Returns a row for every previously seen device that is gone now. These are extra rows and they are billed like any other row. Only produced when the run proved it read the whole catalogue. A run given individual listing addresses reads a fixed list rather than a catalogue, so it never produces these rows.",
            "default": false
          },
          "stateKey": {
            "title": "State key",
            "type": "string",
            "description": "Incremental mode only. Name this monitoring baseline yourself. Leave empty and one is derived from the mode, devices, addresses and every filter, so two different setups never share a baseline."
          },
          "resumeFromRunId": {
            "title": "Resume from run ID",
            "type": "string",
            "description": "Continue one interrupted run: records that run already returned are skipped. For a repeating schedule use incrementalMode instead."
          },
          "proxy": {
            "title": "Connection",
            "type": "object",
            "description": "Residential with country US is strongly recommended. Other settings often return nothing.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ],
              "apifyProxyCountry": "US"
            }
          },
          "mcpConnectors": {
            "title": "Pipe results into your apps (optional)",
            "type": "array",
            "description": "Optionally send results into the apps you already use, via Model Context Protocol (MCP) connectors. Authorize one under Apify, Settings, API and Integrations, then select it here. Notion gets a rich page-per-item export; other connectors get a best-effort write or digest. Leave empty to skip; it never changes the dataset output. Supported: Notion (https://mcp.notion.com/mcp), Linear (https://mcp.linear.app/sse), Airtable (https://mcp.airtable.com/mcp), Apify (https://mcp.apify.com)."
          },
          "notionParentPageUrl": {
            "title": "Notion parent page (Notion connector only)",
            "type": "string",
            "description": "URL (or id) of the Notion page under which item pages are created. Required to enable the Notion export; ignored by other connectors."
          },
          "maxNotifyListings": {
            "title": "Max items to export per connector",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Cap on items written to each connector per run. Does not affect the dataset.",
            "default": 50
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}