{
  "openapi": "3.0.1",
  "info": {
    "title": "Tori.fi Scraper - Classifieds, Prices, Sellers & Listings",
    "description": "Scrape Tori.fi, Finland's classifieds marketplace, by keyword, filters or URL. Extract listing titles, prices, photos, categories, item conditions, locations and seller details. Supports individual listings, shops and search URLs for market research and price comparison.",
    "version": "0.1",
    "x-build-id": "2IOQbQ6YcK8UNTcSj"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/abotapi~tori-fi-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-abotapi-tori-fi-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~tori-fi-scraper/runs": {
      "post": {
        "operationId": "runs-sync-abotapi-tori-fi-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~tori-fi-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-abotapi-tori-fi-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": "What do you want to scrape?",
            "enum": [
              "search",
              "url"
            ],
            "type": "string",
            "description": "Search runs the keywords and filters below. URL mode scrapes the Tori links you paste (search, listing, shop, latest listings or sitemap links) and ignores the search fields.",
            "default": "search"
          },
          "searchTerms": {
            "title": "Search keywords",
            "type": "array",
            "description": "One keyword per line, Finnish works best (for example polkupyora, iPhone, sohva). Each keyword is walked page by page, 53 listings per page. Leave empty to browse every listing that matches the filters below. The site shows at most 50 pages (about 2,650 listings) per search, so use filters to split larger searches.",
            "default": [
              "polkupyora"
            ],
            "items": {
              "type": "string"
            }
          },
          "categories": {
            "title": "Categories",
            "type": "array",
            "description": "Only listings in these top level categories. Leave empty for all categories.",
            "items": {
              "type": "string",
              "enum": [
                "0.76",
                "0.90",
                "0.93",
                "0.77",
                "0.78",
                "0.68",
                "0.91",
                "0.67",
                "0.69",
                "0.71",
                "0.86"
              ],
              "enumTitles": [
                "Antiikki ja taide",
                "Auto-, vene- ja moottoripyörätarvikkeet",
                "Elektroniikka ja kodinkoneet",
                "Eläimet ja eläintarvikkeet",
                "Koti ja sisustus",
                "Lapset ja vanhemmat",
                "Liiketoiminta ja palvelut",
                "Piha ja remontointi",
                "Urheilu ja ulkoilu",
                "Vaatteet, kosmetiikka ja asusteet",
                "Viihde ja harrastukset"
              ]
            }
          },
          "productCategory": {
            "title": "Sub category code",
            "type": "string",
            "description": "Optional product category code from a Tori search link (the product_category value, for example 2.69.3963.257 for bicycles). Narrower than Categories."
          },
          "brandId": {
            "title": "Brand code",
            "type": "string",
            "description": "Optional brand code from a Tori search link (the brand value, for example 9289). Leave empty for all brands."
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "RELEVANCE",
              "PUBLISHED_DESC",
              "PRICE_ASC",
              "PRICE_DESC"
            ],
            "type": "string",
            "description": "Order of the results for every keyword.",
            "default": "RELEVANCE"
          },
          "minPrice": {
            "title": "Minimum price (EUR)",
            "minimum": 0,
            "type": "integer",
            "description": "Keep only listings priced at least this many euros. Empty or 0 keeps all."
          },
          "maxPrice": {
            "title": "Maximum price (EUR)",
            "minimum": 0,
            "type": "integer",
            "description": "Keep only listings priced at most this many euros. Empty or 0 keeps all."
          },
          "conditions": {
            "title": "Condition",
            "type": "array",
            "description": "Only listings in these conditions. Leave empty for any condition.",
            "items": {
              "type": "string",
              "enum": [
                "1",
                "2",
                "3",
                "4",
                "5"
              ],
              "enumTitles": [
                "New",
                "Like new",
                "Good",
                "Fair",
                "Needs repair"
              ]
            }
          },
          "sellerType": {
            "title": "Seller type",
            "enum": [
              "any",
              "private",
              "company"
            ],
            "type": "string",
            "description": "Private sellers, companies, or both.",
            "default": "any"
          },
          "tradeType": {
            "title": "Listing type",
            "enum": [
              "any",
              "sell",
              "giveaway",
              "wanted"
            ],
            "type": "string",
            "description": "Items for sale, items given away, or wanted ads.",
            "default": "any"
          },
          "regions": {
            "title": "Regions",
            "type": "array",
            "description": "Only listings located in these regions. Leave empty for all of Finland.",
            "items": {
              "type": "string",
              "enum": [
                "0.100015",
                "0.100014",
                "0.100006",
                "0.100013",
                "0.100003",
                "0.100017",
                "0.100004",
                "0.100007",
                "0.100020",
                "0.100001",
                "0.100011",
                "0.100005",
                "0.100009",
                "0.100002",
                "0.100008",
                "0.100012",
                "0.100010",
                "0.100018",
                "0.100016"
              ],
              "enumTitles": [
                "Ahvenanmaa",
                "Etelä-Karjala",
                "Etelä-Pohjanmaa",
                "Etelä-Savo",
                "Kainuu",
                "Kanta-Häme",
                "Keski-Pohjanmaa",
                "Keski-Suomi",
                "Kymenlaakso",
                "Lappi",
                "Pirkanmaa",
                "Pohjanmaa",
                "Pohjois-Karjala",
                "Pohjois-Pohjanmaa",
                "Pohjois-Savo",
                "Päijät-Häme",
                "Satakunta",
                "Uusimaa",
                "Varsinais-Suomi"
              ]
            }
          },
          "publishedToday": {
            "title": "Published today only",
            "type": "boolean",
            "description": "Only listings published today.",
            "default": false
          },
          "deliveryOnly": {
            "title": "Delivery offered only",
            "type": "boolean",
            "description": "Only listings whose seller offers delivery through the site's own delivery service.",
            "default": false
          },
          "latitude": {
            "title": "Latitude",
            "type": "number",
            "description": "Centre of a radius search, for example 60.17 (Helsinki). Used together with Longitude and Radius."
          },
          "longitude": {
            "title": "Longitude",
            "type": "number",
            "description": "Centre of a radius search, for example 24.94 (Helsinki)."
          },
          "radiusMeters": {
            "title": "Radius (meters)",
            "minimum": 0,
            "type": "integer",
            "description": "Only listings within this distance of the latitude and longitude above. Empty or 0 turns the radius search off."
          },
          "urls": {
            "title": "Tori links",
            "type": "array",
            "description": "Tori links, one per line. Accepted: a search link (tori.fi/recommerce/forsale/search?..., filters, sort and page in the link are kept, a link with page 2 or more starts at that page), a category, brand, radius, free (given away) or map link, a listing link (also the short tori.fi/<number> form), a shop link (tori.fi/tori-kaupat/...), the latest listings feed and the listing sitemap (its first 25 searches). Tracking parameters are ignored. Home and editorial pages carry no listings and are skipped with a warning. Filter fields are ignored in this mode.",
            "default": [
              "https://www.tori.fi/recommerce/forsale/search?q=polkupyora",
              "https://www.tori.fi/recommerce/forsale/search?q=polkupyora&page=2",
              "https://www.tori.fi/recommerce/forsale/search",
              "https://www.tori.fi/recommerce/forsale/search?category=0.69",
              "https://www.tori.fi/recommerce/forsale/search?product_category=2.69.3963.257",
              "https://www.tori.fi/recommerce/forsale/search?q=polkupyora&price_from=50&price_to=200&sort=PUBLISHED_DESC&dealer_segment=1&trade_type=1&condition=2",
              "https://www.tori.fi/recommerce/forsale/search?trade_type=2",
              "https://www.tori.fi/recommerce/forsale/search?brand=9289",
              "https://www.tori.fi/recommerce/forsale/search?lat=60.17&lon=24.94&radius=5000",
              "https://www.tori.fi/recommerce/forsale/item/49931144",
              "https://www.tori.fi/recommerce/forsale/item/49931144?utm_source=x&ref=y",
              "https://www.tori.fi/49931144",
              "https://www.tori.fi/tori-kaupat/e-fat-finland-oy",
              "https://www.tori.fi/map/recommerce/forsale",
              "https://www.tori.fi/recommerce/forsale/search/api/search/SEARCH_ID_BAP_COMMON?q=polkupyora",
              "https://www.tori.fi/feed/recommerce/atom.xml",
              "https://www.tori.fi/sitemap-bap.xml"
            ],
            "items": {
              "type": "string"
            }
          },
          "fetchDetails": {
            "title": "Add listing details",
            "type": "boolean",
            "description": "Open each listing to add the full description, category path, attributes, condition, all photos, precise position, postal code, edit time, delivery flags, availability and the seller company block (name, address, phone, registry link). Off returns the search row fields only and adds no details charge. Listing and feed links still open their listing page for the base row; that read is not charged as details.",
            "default": true
          },
          "maxPages": {
            "title": "Max pages per search",
            "minimum": 0,
            "type": "integer",
            "description": "Optional. Result pages to walk per keyword or link. This does not cap the run by default: empty or 0 means no page limit (the site itself stops at 50 pages) and it defers to Max items, which is the one default cap (20)."
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 0,
            "type": "integer",
            "description": "The single default cap of the run: maximum listings to return across the whole run (default 20). Max pages has no finite default and defers to this field. 0 means no limit. In incremental mode, unchanged listings count toward this number.",
            "default": 20
          },
          "proxy": {
            "title": "Proxy",
            "type": "object",
            "description": "Proxy settings. The default Apify Proxy connection was measured on this site and loads every page without a block, so normal runs do not need residential. Residential is optional; it is billed by traffic on your account. If the selected connection is refused, the run switches to Apify Residential and then to a backup connection on its own.",
            "default": {
              "useApifyProxy": true
            }
          },
          "resumeFromRunId": {
            "title": "Resume from run ID",
            "type": "string",
            "description": "Run ID (or dataset ID) of a previous run of this Actor. Listings already collected there are skipped, so this run returns only the delta. Leave empty for a normal run. For recurring monitoring of the same search, use Incremental mode instead."
          },
          "incrementalMode": {
            "title": "Incremental changes for scheduled runs",
            "type": "boolean",
            "description": "For recurring price monitoring. A listing is returned as NEW the first time and as UPDATED when a tracked field changes: price, currency, title, description, availability, inactive flag, buy now, shipping flags, condition and other attributes, category, location, seller block, photos. Unchanged listings are not returned or billed. Never compared: rank, search keyword, collection time, match count, paging, search key, sort, publish and edit time stamps, image links and sizes. State is kept per tracked search or link set, or per State key when you set one.",
            "default": false
          },
          "stateKey": {
            "title": "State key",
            "type": "string",
            "description": "Optional name for a monitoring campaign. Runs sharing a key share their incremental state. Leave empty to scope it automatically to the search or links."
          },
          "baselineDatasetId": {
            "title": "Start from an existing dataset (incremental mode only)",
            "type": "string",
            "description": "Optional. Pick the dataset of an earlier full run of this Actor so the first incremental run returns only listings that changed since then. Pick it unedited. Only used on the first run for a state key and not combined with Resume."
          },
          "emitExpired": {
            "title": "Emit expired listings (incremental mode only)",
            "type": "boolean",
            "description": "Off by default. Also returns listings that were tracked before and are no longer found, marked EXPIRED. Only produced after a complete scan, never when Max items, Max pages, the 50 page limit of the site, a pasted page beyond 1, a listing, shop, feed or sitemap link, or Resume limited the run. These synthetic rows are returned and billed, so leave it off unless you need expiry tracking.",
            "default": false
          },
          "changeScope": {
            "title": "What counts as a change (incremental mode only)",
            "enum": [
              "all",
              "priceAndStock"
            ],
            "type": "string",
            "description": "All fields (default): any change to the tracked fields returns an UPDATED row. Price and availability only: only price, currency, availability, inactive flag, buy now and the listing attributes (condition, size, and so on) return an UPDATED row; title, description, photos, location and seller details never do.",
            "default": "all"
          },
          "compactUpdates": {
            "title": "Compact update rows (incremental mode only)",
            "type": "boolean",
            "description": "Off by default. When on, UPDATED and EXPIRED rows are short: listing id, url, title, current price and availability, plus priceChanges and variantChanges with the old and new value of each moved field. NEW rows always carry the complete record.",
            "default": false
          },
          "expireAfterMissedScans": {
            "title": "Expire after N missed full scans (incremental mode only)",
            "minimum": 1,
            "maximum": 30,
            "type": "integer",
            "description": "Only used with Emit expired listings. A listing is marked EXPIRED only after it was missing from this many complete scans in a row (default 1). Raise it so a listing that briefly drops out of the results is not reported as gone.",
            "default": 1
          },
          "ignoreFieldsForChanges": {
            "title": "Ignore fields when detecting changes (incremental mode only)",
            "type": "array",
            "description": "Extra field names that must not mark a listing as UPDATED in incremental mode. Rank, search context, time stamps and image details are already ignored. Use a dotted name such as shop.phoneNumber to ignore one key inside a nested block, or attributes.label for one key inside every attribute.",
            "items": {
              "type": "string"
            }
          },
          "mcpConnectors": {
            "title": "Pipe results into your apps (optional)",
            "type": "array",
            "description": "Optionally send the scraped results into the apps you already use, via Model Context Protocol (MCP) connectors. Authorize a connector once under Apify Settings, Integrations, then select it here. The connector receives a condensed summary per item; the full record stays in the dataset. Leave empty to skip."
          },
          "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}