{
  "openapi": "3.0.1",
  "info": {
    "title": "Blocket Scraper - Sweden Marketplace Listings & Prices",
    "description": "Blocket scraper for blocket.se goods ads: search by keyword, filters or a pasted search URL and get every ad as a row with title, price in SEK, location, coordinates, seller type, shipping options and photos. For resellers, price research and market monitoring in Sweden.",
    "version": "0.1",
    "x-build-id": "7e608hqyyuMPw0gIM"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/s-r~blocket-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-s-r-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/s-r~blocket-scraper/runs": {
      "post": {
        "operationId": "runs-sync-s-r-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/s-r~blocket-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-s-r-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": {
          "query": {
            "title": "Query",
            "type": "string",
            "description": "Search keyword. Swedish terms work best. Optional when supplying a search URL or filters."
          },
          "url": {
            "title": "Url",
            "type": "string",
            "description": "Paste a Blocket goods search URL, including its filters. It takes precedence over query and filters; an explicit sort overrides the URL sort."
          },
          "category": {
            "title": "Category",
            "enum": [
              "0.91",
              "0.67",
              "0.77",
              "0.93",
              "0.90",
              "0.68",
              "0.71",
              "0.76",
              "0.78",
              "0.69",
              "0.86"
            ],
            "type": "string",
            "description": "Goods category: 0.91 business, 0.67 garden/building, 0.77 animals, 0.93 electronics, 0.90 vehicle accessories, 0.68 children, 0.71 clothing, 0.76 art, 0.78 furniture, 0.69 sport, 0.86 hobbies."
          },
          "sub_category": {
            "title": "Sub category",
            "type": "string",
            "description": "Blocket subcategory id in the form 1.<category>.<subcategory>, as found in a search URL."
          },
          "region": {
            "title": "Region",
            "enum": [
              "0.300010",
              "0.300020",
              "0.300009",
              "0.300021",
              "0.300013",
              "0.300023",
              "0.300006",
              "0.300008",
              "0.300007",
              "0.300025",
              "0.300012",
              "0.300001",
              "0.300004",
              "0.300003",
              "0.300017",
              "0.300024",
              "0.300022",
              "0.300019",
              "0.300014",
              "0.300018",
              "0.300005"
            ],
            "type": "string",
            "description": "Swedish county id. Stockholm is 0.300001, Skåne 0.300012, Västra Götaland 0.300014. Paste a URL for multiple counties."
          },
          "price_min": {
            "title": "Price min",
            "minimum": 0,
            "type": "integer",
            "description": "Minimum asking price in SEK. Zero is accepted."
          },
          "price_max": {
            "title": "Price max",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum asking price in SEK."
          },
          "condition": {
            "title": "Condition",
            "enum": [
              "new",
              "like_new",
              "good",
              "fair",
              "broken"
            ],
            "type": "string",
            "description": "Filter: new, like new, good, fair or broken. The selected Swedish filter label is returned as condition; individual ad details are not fetched."
          },
          "seller_type": {
            "title": "Seller type",
            "enum": [
              "all",
              "private",
              "business"
            ],
            "type": "string",
            "description": "Include all sellers, private individuals or businesses.",
            "default": "all"
          },
          "ad_type": {
            "title": "Ad type",
            "enum": [
              "all",
              "for_sale",
              "giveaway",
              "wanted"
            ],
            "type": "string",
            "description": "Include all ads, for-sale ads, giveaways or wanted ads.",
            "default": "all"
          },
          "shipping_only": {
            "title": "Shipping only",
            "type": "boolean",
            "description": "Only listings that can be shipped.",
            "default": false
          },
          "published_today": {
            "title": "Published today",
            "type": "boolean",
            "description": "Only ads published today according to Blocket.",
            "default": false
          },
          "sort": {
            "title": "Sort",
            "enum": [
              "relevance",
              "newest",
              "oldest",
              "price_asc",
              "price_desc"
            ],
            "type": "string",
            "description": "Sort by relevance, publication date or price. Omit to preserve a pasted URL sort; keyword searches default to relevance."
          },
          "max_items": {
            "title": "Max items",
            "minimum": 1,
            "maximum": 2650,
            "type": "integer",
            "description": "Maximum unique ads, across all continuation requests. Blocket exposes at most 50 pages (2,650 ads) per search."
          },
          "maxItems": {
            "title": "Maxitems",
            "minimum": 1,
            "maximum": 2650,
            "type": "integer",
            "description": "Alias for max_items. If both are supplied, maxItems takes precedence."
          },
          "cursor": {
            "title": "Cursor",
            "maxLength": 80000,
            "type": "string",
            "description": "Opaque next_cursor from an earlier response for this same search. The Apify actor follows it automatically."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}