{
  "openapi": "3.0.1",
  "info": {
    "title": "Blocket.se Scraper",
    "description": "[💰 $3.0 / 1K] Extract classified ads from Blocket.se — Sweden's biggest second-hand marketplace. Search cars, motorcycles, electronics, furniture, and more. Filter by county, category, price, seller type, and recency.",
    "version": "1.0",
    "x-build-id": "jXet3Wg9wFVlelmM3"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/solidcode~blocket-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-solidcode-blocket-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/solidcode~blocket-scraper/runs": {
      "post": {
        "operationId": "runs-sync-solidcode-blocket-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/solidcode~blocket-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-solidcode-blocket-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": {
          "searchQueries": {
            "title": "Search Keywords",
            "type": "array",
            "description": "Keywords to search for on Blocket.se (Swedish or English — both work). Each keyword runs as its own search; rows that match more than one keyword are deduplicated by ad ID. Leave empty to scrape the unfiltered listing for the chosen category and region.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "category": {
            "title": "Category",
            "enum": [
              "all",
              "cars",
              "motorcycles",
              "boats",
              "electronics",
              "furniture-home",
              "fashion",
              "sports-outdoor",
              "hobby",
              "kids-baby",
              "pets",
              "art-antiques",
              "garden-renovation",
              "vehicle-parts",
              "business-equipment"
            ],
            "type": "string",
            "description": "Limit results to a single Blocket category. Vehicle categories (Cars, Motorcycles, Boats) use Blocket's richer mobility schema and return extra fields (make, model, year, mileage, fuel, gearbox, registration number).",
            "default": "all"
          },
          "region": {
            "title": "Region",
            "enum": [
              "all",
              "stockholm",
              "uppsala",
              "sodermanland",
              "ostergotland",
              "jonkoping",
              "kronoberg",
              "kalmar",
              "gotland",
              "blekinge",
              "skane",
              "halland",
              "vastra-gotaland",
              "varmland",
              "orebro",
              "vastmanland",
              "dalarna",
              "gavleborg",
              "vasternorrland",
              "jamtland",
              "vasterbotten",
              "norrbotten"
            ],
            "type": "string",
            "description": "Restrict results to a single Swedish county (län). Leave on 'All of Sweden' to search nationwide.",
            "default": "all"
          },
          "priceMin": {
            "title": "Minimum Price (SEK)",
            "minimum": 0,
            "type": "integer",
            "description": "Only include ads at or above this price, in Swedish kronor (SEK). Leave empty for no minimum."
          },
          "priceMax": {
            "title": "Maximum Price (SEK)",
            "minimum": 0,
            "type": "integer",
            "description": "Only include ads at or below this price, in Swedish kronor (SEK). Leave empty for no maximum."
          },
          "sellerType": {
            "title": "Seller Type",
            "enum": [
              "all",
              "private",
              "business"
            ],
            "type": "string",
            "description": "Filter by who is selling — private individuals only, business dealers only, or both. Note: roughly 99% of car ads on Blocket are posted by dealers, so picking 'Private sellers only' together with the Cars category will typically return zero results.",
            "default": "all"
          },
          "shippingOnly": {
            "title": "Shippable Ads Only",
            "type": "boolean",
            "description": "Only include ads where the seller offers shipping (Blocket Frakt). Useful when you can't pick the item up in person.",
            "default": false
          },
          "publishedWithin": {
            "title": "Published Within",
            "enum": [
              "any",
              "1",
              "3",
              "7",
              "9"
            ],
            "type": "string",
            "description": "Only include ads posted within this recency window. 'Any' returns all currently active ads. Maximum window is 9 days — Blocket's search API does not support wider time filters.",
            "default": "any"
          },
          "sortBy": {
            "title": "Sort By",
            "enum": [
              "newest",
              "price-asc",
              "price-desc"
            ],
            "type": "string",
            "description": "Order in which to collect results from Blocket. Newest first is the default and gives the most relevant recent ads first.",
            "default": "newest"
          },
          "startUrls": {
            "title": "Start URLs",
            "type": "array",
            "description": "Power-user input. Paste Blocket.se URLs directly — search-result pages (e.g. https://www.blocket.se/annonser/hela_sverige/elektronik?q=iphone), category pages, or individual ad pages (e.g. https://www.blocket.se/annons/.../12345678). When provided, these override the Search Keywords / Category / Region / Filters fields above.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "maxResults": {
            "title": "Max Results",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum number of ads to collect across all searches and URLs. Set to 0 for no cap (an internal safety limit of 100,000 still applies). Results are collected in full pages, so the final page may overshoot this number by a few rows.",
            "default": 100
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}