{
  "openapi": "3.0.1",
  "info": {
    "title": "Motorkari Scraper",
    "description": "Fast motorcycle listing scraper for Motorkari.cz. Extract price, specs, \nseller info, and optional descriptions/photos/phone. Supports filtering by \nbrand, model, year, mileage, price. Perfect for dealers, researchers, price \ncomparison tools.",
    "version": "0.0",
    "x-build-id": "bQ7tSgsSGlZBXBBQt"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/gearshift-data~motorkari-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-gearshift-data-motorkari-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/gearshift-data~motorkari-scraper/runs": {
      "post": {
        "operationId": "runs-sync-gearshift-data-motorkari-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/gearshift-data~motorkari-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-gearshift-data-motorkari-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": {
          "ingestMode": {
            "title": "Ingest mode",
            "enum": [
              "full",
              "incremental"
            ],
            "type": "string",
            "description": "• Full — scrape search results and fetch details for every listing.\n• Incremental — only fully scrape listings that weren't seen in previous runs. The actor remembers IDs in its key-value store and uses them to skip already-known listings. Summary records (title, price, url, year) are still produced for every listing so you can detect price changes.",
            "default": "full"
          },
          "customUrl": {
            "title": "🔗 Custom Search URL (Optional)",
            "type": "string",
            "description": "Paste a complete Motorkari.cz search URL with your pre-configured filters. If provided, all filter fields below will be ignored."
          },
          "manufacturer": {
            "title": "Značka (Brand/Manufacturer)",
            "type": "string",
            "description": "Filter by manufacturer (slug format). Examples: ktm, honda, yamaha, bmw, kawasaki, suzuki, harley-davidson."
          },
          "model": {
            "title": "Model",
            "type": "string",
            "description": "Filter by model (format: brand-model-name). Examples: ktm-125-smc-r, honda-cb-500."
          },
          "minYear": {
            "title": "Year from",
            "type": "integer",
            "description": "Minimum year of manufacture. Leave empty for no lower bound."
          },
          "maxYear": {
            "title": "Year to",
            "type": "integer",
            "description": "Maximum year of manufacture. Leave empty for no upper bound."
          },
          "minMileage": {
            "title": "Mileage from (km)",
            "type": "integer",
            "description": "Minimum mileage in kilometres. Leave empty for no lower bound."
          },
          "maxMileage": {
            "title": "Mileage to (km)",
            "type": "integer",
            "description": "Maximum mileage in kilometres. Leave empty for no upper bound."
          },
          "minPrice": {
            "title": "Price from (CZK)",
            "type": "integer",
            "description": "Minimum price in Czech koruna. Leave empty for no lower bound."
          },
          "maxPrice": {
            "title": "Price to (CZK)",
            "type": "integer",
            "description": "Maximum price in Czech koruna. Leave empty for no upper bound."
          },
          "keywords": {
            "title": "Text in listing",
            "type": "string",
            "description": "Search keywords within listings (e.g. ABS, serviced)."
          },
          "scrapeDescription": {
            "title": "Extract full descriptions from detail pages",
            "type": "boolean",
            "description": "Extract full listing text from detail pages using fast HTTP requests.",
            "default": false
          },
          "scrapePhotos": {
            "title": "Extract gallery photos from detail pages",
            "type": "boolean",
            "description": "Extract full-size gallery photos from detail pages (typically 4-8 images per listing).",
            "default": false
          },
          "scrapePhone": {
            "title": "Extract seller phone from detail pages",
            "type": "boolean",
            "description": "Extract seller's phone number from the listing's detail page.",
            "default": false
          },
          "archivePhotos": {
            "title": "Archive photos to Cloudflare R2",
            "type": "boolean",
            "description": "Download each listing's gallery photos, resize them to WebP, and upload to a Cloudflare R2 bucket. Protects against photo loss when source listings end. Adds `photosArchived[]` to the output. Requires the R2 fields below.",
            "default": false
          },
          "r2AccountId": {
            "title": "R2 Account ID",
            "type": "string",
            "description": "Cloudflare account id — the subdomain of your R2 S3 endpoint (https://<account>.r2.cloudflarestorage.com)."
          },
          "r2BucketName": {
            "title": "R2 Bucket name",
            "type": "string",
            "description": "Target R2 bucket.",
            "default": "gearshift-moto-photos"
          },
          "r2AccessKeyId": {
            "title": "R2 Access Key ID",
            "type": "string",
            "description": "R2 API token access key id. Use Apify secrets to avoid storing credentials in the Task input."
          },
          "r2SecretAccessKey": {
            "title": "R2 Secret Access Key",
            "type": "string",
            "description": "R2 API token secret. Use Apify secrets."
          },
          "r2PublicBaseUrl": {
            "title": "R2 Public base URL",
            "type": "string",
            "description": "Public URL prefix for archived photos, e.g. https://pub-abc123.r2.dev (shown in R2 bucket settings after enabling public access)."
          },
          "r2MaxDimension": {
            "title": "Max dimension (px)",
            "minimum": 200,
            "maximum": 4000,
            "type": "integer",
            "description": "Resize each photo so its longer edge fits within this many pixels. 1200 ≈ 200 KB WebP per photo.",
            "default": 1200
          },
          "r2Quality": {
            "title": "WebP quality (1-100)",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "WebP encoder quality. 80 is a good trade-off between size and fidelity.",
            "default": 80
          },
          "maxPagesPerCrawl": {
            "title": "Max search pages",
            "minimum": 0,
            "maximum": 999,
            "type": "integer",
            "description": "Maximum number of search result pages to process. Set to 0 for unlimited.",
            "default": 1
          },
          "maxListingsPerPage": {
            "title": "Listings per page",
            "minimum": 40,
            "maximum": 100,
            "type": "integer",
            "description": "Listings per search page (40-100, step 10). Higher = fewer pages but slower per page.",
            "default": 100
          },
          "maxItems": {
            "title": "Max items to scrape",
            "minimum": 0,
            "maximum": 999999,
            "type": "integer",
            "description": "Total listings to scrape. Set to 0 for unlimited.",
            "default": 0
          },
          "datasetName": {
            "title": "Named dataset (optional)",
            "type": "string",
            "description": "⚠️ Using a named dataset makes the run's default dataset appear empty (data stored in the named one instead)."
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Apify Proxy is recommended for reliable scraping.",
            "default": {
              "useApifyProxy": true
            }
          },
          "maxRequestRetries": {
            "title": "Max request retries",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "How many times to retry a failed HTTP request before giving up.",
            "default": 3
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Pages processed simultaneously. 5-15 recommended.",
            "default": 10
          },
          "timeoutSecs": {
            "title": "Timeout (seconds)",
            "minimum": 60,
            "maximum": 7200,
            "type": "integer",
            "description": "Maximum total runtime before the actor aborts.",
            "default": 600
          },
          "debugLog": {
            "title": "Debug logging",
            "type": "boolean",
            "description": "Enable verbose debug logging for troubleshooting. Noisy — leave off for production runs.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}