{
  "openapi": "3.0.1",
  "info": {
    "title": "Blocket Listings Scraper",
    "description": "Blocket Listings Scraper extracts Blocket.se marketplace items and used cars: titles, SEK prices, locations with coordinates, seller type, publish dates and photos, plus make, model, year, mileage in km, regno, VIN and full descriptions. Goes past the 2,650-result cap — ideal for price research.",
    "version": "0.0",
    "x-build-id": "u3Hb4hs2hyKIp3eUC"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/piotrv1001~blocket-listings-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-piotrv1001-blocket-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/piotrv1001~blocket-listings-scraper/runs": {
      "post": {
        "operationId": "runs-sync-piotrv1001-blocket-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/piotrv1001~blocket-listings-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-piotrv1001-blocket-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",
        "properties": {
          "query": {
            "title": "Search query",
            "type": "string",
            "description": "Keyword to search on blocket.se, e.g. \"cykel\" or \"soffa\". Leave empty when you paste search URLs below, or with the Used cars category to list all cars."
          },
          "searchUrls": {
            "title": "Search URLs",
            "type": "array",
            "description": "Optional. Paste blocket.se search result URLs straight from your browser, with any filters and sorting applied, e.g. https://www.blocket.se/recommerce/forsale/search?q=soffa&location=0.300001 (items) or https://www.blocket.se/mobility/search/car?registration_class=1&variant=0.818 (cars). Every filter in the URL is kept.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "vertical": {
            "title": "Category",
            "enum": [
              "goods",
              "cars"
            ],
            "type": "string",
            "description": "What to search when using the query field: marketplace items or used cars. Search URLs choose this automatically.",
            "default": "goods"
          },
          "location": {
            "title": "Location",
            "type": "string",
            "description": "Optional county (län) or municipality name, e.g. \"Stockholm\", \"Skåne\" or \"Göteborg\"."
          },
          "priceFrom": {
            "title": "Minimum price (SEK)",
            "minimum": 0,
            "type": "integer",
            "description": "Only listings priced at or above this amount."
          },
          "priceTo": {
            "title": "Maximum price (SEK)",
            "minimum": 0,
            "type": "integer",
            "description": "Only listings priced at or below this amount."
          },
          "condition": {
            "title": "Condition",
            "type": "array",
            "description": "Marketplace items only. Keep listings in any of the selected conditions.",
            "items": {
              "type": "string",
              "enum": [
                "new",
                "like_new",
                "good",
                "fair",
                "needs_repair"
              ],
              "enumTitles": [
                "New",
                "Like new",
                "Good",
                "Fair (visibly used)",
                "Needs repair"
              ]
            }
          },
          "sellerType": {
            "title": "Seller",
            "enum": [
              "all",
              "private",
              "dealer"
            ],
            "type": "string",
            "description": "Private sellers, dealers/businesses, or both.",
            "default": "all"
          },
          "sort": {
            "title": "Sort by",
            "enum": [
              "RELEVANCE",
              "PUBLISHED_DESC",
              "PRICE_ASC",
              "PRICE_DESC",
              "MILEAGE_ASC",
              "YEAR_DESC"
            ],
            "type": "string",
            "description": "Result order. \"Newest first\" is ideal for scheduled runs that pick up new listings. Mileage and year sorting apply to cars only.",
            "default": "RELEVANCE"
          },
          "maxItems": {
            "title": "Max listings",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum number of listings to save across all searches. Set 0 for no limit: large searches are split automatically so you get every matching listing, not just the first 2,650 that blocket.se shows.",
            "default": 100
          },
          "includeDetails": {
            "title": "Include full description and specs",
            "type": "boolean",
            "description": "Open each listing to add the full description, item attributes (condition, brand, size) or car specifications and equipment, category path and address. Charged as an extra event per listing.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Proxy settings. The default Apify proxy works well for this site.",
            "default": {
              "useApifyProxy": 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
                  },
                  "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}