{
  "openapi": "3.0.1",
  "info": {
    "title": "Blocket Sweden Scraper - Cars, Classifieds, Prices & Sellers",
    "description": "Scrape Blocket, Sweden's largest marketplace: used cars, motorcycles, boats and goods with prices, specs, equipment, location, photos and seller type. Search by keyword and filters or paste links, and monitor price changes with recurring updates.",
    "version": "0.1",
    "x-build-id": "QU9reyxj2VhCLRSdm"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/abotapi~blocket-se-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-abotapi-blocket-se-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/abotapi~blocket-se-scraper/runs": {
      "post": {
        "operationId": "runs-sync-abotapi-blocket-se-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/abotapi~blocket-se-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-abotapi-blocket-se-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": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "Mode",
            "enum": [
              "search",
              "url"
            ],
            "type": "string",
            "description": "Search by filters walks the result list for the segment and filters below. Paste links walks the links you paste, forward from the page each link names.",
            "default": "search"
          },
          "segment": {
            "title": "What to search",
            "enum": [
              "car",
              "mc",
              "boat",
              "goods"
            ],
            "type": "string",
            "description": "Used cars, motorcycles, boats or goods from the marketplace. The filters below apply where they make sense (fuel and body type are for cars, category and condition are for goods).",
            "default": "car"
          },
          "keywords": {
            "title": "Keywords",
            "type": "string",
            "description": "Free-text search, for example volvo xc60 or cykel. Works with every filter below."
          },
          "make": {
            "title": "Make",
            "type": "string",
            "description": "Cars, motorcycles and boats: the brand as the site lists it, for example Volvo, Yamaha or Bayliner. Leave empty for every brand."
          },
          "model": {
            "title": "Model (cars)",
            "type": "string",
            "description": "Cars only: a model or series name as the site lists it under the make, for example XC60 or V70-Serie. Works best together with Make."
          },
          "category": {
            "title": "Category (goods)",
            "type": "string",
            "description": "Goods only: a category name as the site lists it, for example Cyklar, Barncyklar or Mobiltelefoner. Leave empty for every category."
          },
          "region": {
            "title": "Region or town",
            "type": "string",
            "description": "A county or town name as the site lists it, for example Skåne, Stockholm or Karlskrona. Leave empty for the whole country."
          },
          "minPrice": {
            "title": "Minimum price (SEK)",
            "minimum": 0,
            "type": "integer",
            "description": "Lowest price in Swedish kronor, for example 50000."
          },
          "maxPrice": {
            "title": "Maximum price (SEK)",
            "minimum": 0,
            "type": "integer",
            "description": "Highest price in Swedish kronor, for example 200000."
          },
          "minYear": {
            "title": "Earliest model year",
            "minimum": 1900,
            "maximum": 2030,
            "type": "integer",
            "description": "Cars, motorcycles and boats: only this model year or later, for example 2018."
          },
          "maxYear": {
            "title": "Latest model year",
            "minimum": 1900,
            "maximum": 2030,
            "type": "integer",
            "description": "Cars, motorcycles and boats: only this model year or earlier, for example 2022."
          },
          "maxMileage": {
            "title": "Maximum mileage (Swedish mil)",
            "minimum": 0,
            "type": "integer",
            "description": "Cars and motorcycles: at most this many mil on the clock (1 mil = 10 km), for example 15000 for 150 000 km."
          },
          "fuel": {
            "title": "Fuel (cars)",
            "enum": [
              "any",
              "petrol",
              "diesel",
              "electric",
              "ethanol",
              "cng",
              "hybridPetrol",
              "hybridDiesel",
              "hybridGas",
              "pluginPetrol",
              "pluginDiesel"
            ],
            "type": "string",
            "description": "Cars only: only this fuel type, applied by the site itself.",
            "default": "any"
          },
          "bodyType": {
            "title": "Body type (cars)",
            "enum": [
              "any",
              "convertible",
              "coupe",
              "minivan",
              "hatchback3",
              "hatchback5",
              "wagon",
              "pickup",
              "sedan",
              "van",
              "suv",
              "other"
            ],
            "type": "string",
            "description": "Cars only: only this body type, applied by the site itself.",
            "default": "any"
          },
          "transmission": {
            "title": "Transmission (cars)",
            "enum": [
              "any",
              "manual",
              "automatic"
            ],
            "type": "string",
            "description": "Cars only: only manual or only automatic gearbox.",
            "default": "any"
          },
          "sellerType": {
            "title": "Seller type",
            "enum": [
              "any",
              "dealer",
              "private"
            ],
            "type": "string",
            "description": "Only ads from dealers and companies, or only from private sellers.",
            "default": "any"
          },
          "condition": {
            "title": "Condition (goods)",
            "enum": [
              "any",
              "new",
              "likeNew",
              "good",
              "fair"
            ],
            "type": "string",
            "description": "Goods only: only items in this condition, applied by the site itself.",
            "default": "any"
          },
          "tradeType": {
            "title": "Ad type (goods)",
            "enum": [
              "any",
              "sell",
              "giveaway",
              "wanted"
            ],
            "type": "string",
            "description": "Goods only: for sale, given away or wanted ads.",
            "default": "any"
          },
          "newToday": {
            "title": "Only ads published today",
            "type": "boolean",
            "description": "Turn on to keep only the ads the site marks as new from today.",
            "default": false
          },
          "sortBy": {
            "title": "Sort order",
            "enum": [
              "default",
              "newest",
              "priceAsc",
              "priceDesc",
              "mileageAsc",
              "yearNewest"
            ],
            "type": "string",
            "description": "Order of the results, applied by the site itself. The site serves at most 2 500 ads per search, so combine a sort order with filters to reach deeper.",
            "default": "default"
          },
          "urls": {
            "title": "Blocket links",
            "type": "array",
            "description": "Result lists (cars, motorcycles, boats, goods), single ads, short ad links and sitemaps. The filters in the link are applied and pages are walked forward from the page the link names. The filter fields above are ignored in this mode.",
            "default": [
              "https://www.blocket.se/mobility/item/28291881",
              "https://www.blocket.se/28291881",
              "https://www.blocket.se/recommerce/forsale/item/28283080",
              "https://www.blocket.se/mobility/search/car?page=2",
              "https://www.blocket.se/mobility/search/api/search/SEARCH_ID_CAR_USED?page=2&sort=PRICE_ASC",
              "https://www.blocket.se/mobility/search/api/search/SEARCH_ID_CAR_USED?sort=PUBLISHED_DESC&year_from=2020&price_to=100000&location=0.300010",
              "https://www.blocket.se/mobility/search/api/search/SEARCH_ID_MC_USED",
              "https://www.blocket.se/mobility/search/api/search/SEARCH_ID_BOAT_USED",
              "https://www.blocket.se/mobility/search/mc",
              "https://www.blocket.se/mobility/browse/car",
              "https://www.blocket.se/mobility/search/car?make=0.785",
              "https://www.blocket.se/recommerce/forsale/search?q=cykel&page=2",
              "https://www.blocket.se/recommerce/forsale/search/api/search/SEARCH_ID_BAP_COMMON?q=cykel&page=2",
              "https://www.blocket.se/recommerce/forsale/search?category=0.71&location=0.300010",
              "https://www.blocket.se/annonser/hela_sverige?q=cykel",
              "https://www.blocket.se/mobility/search/car?utm_source=x&gclid=1",
              "https://www.blocket.se/sitemap.xml",
              "https://m.blocket.se/mobility/search/car",
              "https://www.blocket.se/bostad"
            ],
            "items": {
              "type": "string"
            }
          },
          "fetchDetails": {
            "title": "Read each ad's own page",
            "type": "boolean",
            "description": "The result list carries price, year, mileage, make, model, location, coordinates and the first photos. An ad's own page adds the description, the spec table (power, engine volume, weight, seats, inspection dates, owners and more), the equipment list, the postal address and every photo. A per-ad detail-enrichment charge applies when this is on.",
            "default": true
          },
          "maxPages": {
            "title": "Max pages per source",
            "minimum": 0,
            "type": "integer",
            "description": "Optional guard per search or link: stop after this many result pages. Empty or 0 (the default) means no page limit. It does not cap the run and defers to Max items, which is the single cap (default 20)."
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 0,
            "maximum": 1000000,
            "type": "integer",
            "description": "The single limit that stops a run. Default 20 ads; 0 means no limit (at most 1,000,000).",
            "default": 20
          },
          "proxy": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "The site serves its data to the standard Apify proxy pool, so that is the default. Residential also works and is recommended for the most reliable results on large or frequent runs.",
            "default": {
              "useApifyProxy": true
            }
          },
          "resumeFromRunId": {
            "title": "Continue a previous run",
            "type": "string",
            "description": "Give the run id of an interrupted run and every ad it already collected is skipped. Mutually exclusive with recurring updates once a baseline exists."
          },
          "incrementalMode": {
            "title": "Recurring updates (only return what changed)",
            "type": "boolean",
            "description": "Label every ad NEW, UPDATED, UNCHANGED or REAPPEARED against the previous run of the same setup, and record the ones that vanished as EXPIRED. UPDATED means a compared field moved: price, mileage, description, equipment, photos, seller details, inspection dates and the other listing facts. Never compared: the run time, the result page number, the search link, and the published and last-edited times (the site re-stamps them when a seller refreshes an ad). Unchanged ads are not returned unless you also turn on the return-unchanged switch. Returns (and bills) extra rows only for what changed.",
            "default": false
          },
          "stateKey": {
            "title": "State key (optional, recurring updates only)",
            "type": "string",
            "description": "Name the baseline of a recurring schedule yourself. Without it the baseline is keyed on the whole search setup, so two differently-configured schedules never share one baseline."
          },
          "emitUnchanged": {
            "title": "Also return unchanged ads (recurring updates only)",
            "type": "boolean",
            "description": "Returns (and bills) every tracked ad again, labelled UNCHANGED, instead of only the changed ones.",
            "default": false
          },
          "emitExpired": {
            "title": "Also return ads that are gone (recurring updates only)",
            "type": "boolean",
            "description": "Ads tracked by the previous run but absent from a COMPLETE scan are returned (and billed) one last time, labelled EXPIRED. A run that stopped early never reports ads as gone.",
            "default": false
          },
          "changeScope": {
            "title": "What counts as a change (recurring updates only)",
            "enum": [
              "all",
              "priceAndStock"
            ],
            "type": "string",
            "description": "Any listing field: every compared field can make an ad UPDATED. Price only: just the price and currency decide UPDATED, so description, photo and equipment edits never produce a returned row. Changing this changes which baseline an automatic state key uses.",
            "default": "all"
          },
          "compactUpdates": {
            "title": "Short rows for updated ads (recurring updates only)",
            "type": "boolean",
            "description": "UPDATED and EXPIRED rows come back short: ids, link, title, current price and priceChanges with the old and new value of each moved field. New ads stay full. The per-ad detail charge is not applied to a short row because it carries no detail fields.",
            "default": false
          },
          "expireAfterMissedScans": {
            "title": "Missed scans before an ad is marked gone (recurring updates only)",
            "minimum": 1,
            "maximum": 30,
            "type": "integer",
            "description": "With the gone-ads switch on, an ad is returned as EXPIRED only after it was missing from this many complete scans in a row. An ad that left the results and a sold one look the same without opening each ad page.",
            "default": 1
          },
          "ignoreFieldsForChanges": {
            "title": "Ignore fields when detecting changes (incremental mode only)",
            "type": "array",
            "description": "Field names that never make an ad UPDATED and are left out of changedFields (they stay in the output). Use a dotted path to ignore one key inside a nested list, for example extras.label. Leave empty to compare every listing field. Changing this changes which baseline an automatic state key uses.",
            "items": {
              "type": "string"
            }
          },
          "mcpConnectors": {
            "title": "Pipe results into your apps (optional)",
            "type": "array",
            "description": "Optional delivery step AFTER the scrape: pipes dataset results into apps you connected in the Apify MCP Connector setup.",
            "items": {
              "type": "string"
            }
          },
          "notionParentPageUrl": {
            "title": "Notion parent page (Notion connector only)",
            "type": "string",
            "description": "Notion connector only: the parent page new Notion pages attach under."
          },
          "maxNotifyListings": {
            "title": "Max items to export per connector",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "How many dataset rows at most each connector receives per run.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}