{
  "description": "Search and browse jobs.ch job listings, resolve companies, or paste jobs.ch search and detail URLs.",
  "properties": {
    "categories": {
      "default": [],
      "description": "Filter by one or more occupational fields / job functions (multi-value OR). Allowed IDs: 97-261 (165 jobs.ch categories; labels in README). Required for mode=byCategory.",
      "editor": "stringList",
      "items": {
        "type": "string"
      },
      "prefill": [],
      "title": "Occupational fields",
      "type": "array"
    },
    "companyIds": {
      "default": [],
      "description": "jobs.ch company IDs (mode=byCompany). IDs are the most reliable company filter and take priority over names.",
      "editor": "stringList",
      "items": {
        "type": "string"
      },
      "prefill": [],
      "title": "Company IDs",
      "type": "array"
    },
    "companyNames": {
      "default": [],
      "description": "Company names to resolve against jobs.ch's company directory (mode=byCompany). Exact names are preferred; unmatched names fall back to a keyword search filtered by company name.",
      "editor": "stringList",
      "items": {
        "type": "string"
      },
      "prefill": [],
      "title": "Company names",
      "type": "array"
    },
    "companySegments": {
      "default": [],
      "description": "Filter by employer segment (multi-value OR). Allowed values: gu (large company), kmu (SME), pdl (personnel-service provider).",
      "editor": "stringList",
      "items": {
        "type": "string"
      },
      "prefill": [],
      "title": "Company size",
      "type": "array"
    },
    "descriptionFormat": {
      "default": "text",
      "description": "Format of the enriched description: plain text, original HTML, or both.",
      "editor": "select",
      "enum": [
        "text",
        "html",
        "both"
      ],
      "enumTitles": [
        "Plain text",
        "HTML",
        "Both"
      ],
      "prefill": "text",
      "title": "Description format",
      "type": "string"
    },
    "employmentGradeMax": {
      "default": 100,
      "description": "Upper bound of the workload range in percent.",
      "maximum": 100,
      "minimum": 0,
      "prefill": 100,
      "title": "Workload % — maximum",
      "type": "integer"
    },
    "employmentGradeMin": {
      "default": 0,
      "description": "Lower bound of the workload range in percent.",
      "maximum": 100,
      "minimum": 0,
      "prefill": 0,
      "title": "Workload % — minimum",
      "type": "integer"
    },
    "employmentTypes": {
      "default": [],
      "description": "Filter by one or more contract types (multi-value OR). Allowed IDs: 1 Temporary, 2 Freelance, 3 Internship, 4 Supplementary income, 5 Permanent position, 6 Apprenticeship. Required for mode=byEmploymentType.",
      "editor": "stringList",
      "items": {
        "type": "string"
      },
      "prefill": [],
      "title": "Employment types",
      "type": "array"
    },
    "includeDetails": {
      "default": false,
      "description": "Fetch each job's detail page for full description, apply URL/method, salary estimate, contacts, languages, categories, regions, deadline, benefits and company profile/ratings. Adds one request per job plus one cached request per company.",
      "prefill": false,
      "title": "Include job details & company profile",
      "type": "boolean"
    },
    "incrementalMode": {
      "default": false,
      "description": "When enabled, only new or changed jobs are pushed. State is stored under `stateKey` in the key-value store.",
      "prefill": false,
      "title": "Incremental mode",
      "type": "boolean"
    },
    "industries": {
      "default": [],
      "description": "Filter by one or more employer industries (multi-value OR). Allowed IDs: 1-24. Required for mode=byIndustry; optional elsewhere.",
      "editor": "stringList",
      "items": {
        "type": "string"
      },
      "prefill": [],
      "title": "Industries",
      "type": "array"
    },
    "languageSkills": {
      "default": [],
      "description": "Filter by one or more required working languages (multi-value OR). Allowed values: de, en, fr, it.",
      "editor": "stringList",
      "items": {
        "type": "string"
      },
      "prefill": [],
      "title": "Required languages",
      "type": "array"
    },
    "locale": {
      "default": "en",
      "description": "jobs.ch site language for URLs and translated labels.",
      "editor": "select",
      "enum": [
        "en",
        "de",
        "fr"
      ],
      "enumTitles": [
        "English",
        "German (Deutsch)",
        "French (Français)"
      ],
      "prefill": "en",
      "title": "Language",
      "type": "string"
    },
    "location": {
      "default": "",
      "description": "Optional free-text city/place refinement (e.g. Zürich, Geneva, Basel).",
      "editor": "textfield",
      "prefill": "",
      "title": "City / place",
      "type": "string"
    },
    "maxDescriptionLength": {
      "default": 0,
      "description": "Truncate descriptions to this many characters (0 = no truncation).",
      "maximum": 50000,
      "minimum": 0,
      "prefill": 0,
      "title": "Max description length",
      "type": "integer"
    },
    "maxItems": {
      "default": 20,
      "description": "Maximum number of jobs to return. jobs.ch serves 20 rows per page and caps each search at 2,000 rows.",
      "maximum": 2000,
      "minimum": 1,
      "prefill": 3,
      "title": "Max items",
      "type": "integer"
    },
    "maxPages": {
      "default": 100,
      "description": "Maximum result pages to request per query/filter combination (jobs.ch caps searches at 100 pages).",
      "maximum": 100,
      "minimum": 1,
      "prefill": 1,
      "title": "Max pages",
      "type": "integer"
    },
    "mode": {
      "default": "search",
      "description": "What to fetch. `search` runs classic keyword search (or semantic with `searchMode=semantic`). `browse` uses filters only. `byCompany` resolves company names/IDs. `byUrls` accepts jobs.ch search or job-detail URLs. The `byRegion`/`byIndustry`/`byEmploymentType`/`byCategory` modes are kept for backward compatibility and require their matching filter.",
      "editor": "select",
      "enum": [
        "search",
        "browse",
        "byCompany",
        "byUrls",
        "byRegion",
        "byIndustry",
        "byEmploymentType",
        "byCategory"
      ],
      "enumTitles": [
        "Keyword search",
        "Browse all jobs by filters",
        "Jobs at specific companies",
        "Search or job URLs",
        "Browse by canton / region",
        "Browse by industry",
        "Browse by employment type",
        "Browse by occupational field"
      ],
      "prefill": "search",
      "title": "Mode",
      "type": "string"
    },
    "positions": {
      "default": [],
      "description": "Filter by one or more seniority levels (multi-value OR). Allowed IDs: 1 Executive position, 2 Specialist, 3 Employee.",
      "editor": "stringList",
      "items": {
        "type": "string"
      },
      "prefill": [],
      "title": "Seniority levels",
      "type": "array"
    },
    "publishedSince": {
      "default": "",
      "description": "Only jobs first published within this time window.",
      "editor": "select",
      "enum": [
        "",
        "1",
        "3",
        "7",
        "30"
      ],
      "enumTitles": [
        "(Any time)",
        "Last 24 hours",
        "Last 3 days",
        "Last 7 days",
        "Last 30 days"
      ],
      "prefill": "",
      "title": "Published since",
      "type": "string"
    },
    "regions": {
      "default": [],
      "description": "Filter by one or more Swiss canton/language-regions (multi-value OR). Allowed IDs: 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25. Required for mode=byRegion; optional elsewhere.",
      "editor": "stringList",
      "items": {
        "type": "string"
      },
      "prefill": [],
      "title": "Cantons / regions",
      "type": "array"
    },
    "searchMode": {
      "default": "classic",
      "description": "`classic` uses jobs.ch's exact keyword API with all filters and sort. `semantic` uses the site's fuzzy, cross-language search page (filters still apply; sort is relevance-only).",
      "editor": "select",
      "enum": [
        "classic",
        "semantic"
      ],
      "enumTitles": [
        "Classic (exact keyword)",
        "Semantic (fuzzy, cross-language)"
      ],
      "prefill": "classic",
      "title": "Search relevance",
      "type": "string"
    },
    "searchQueries": {
      "default": [],
      "description": "One or more free-text keywords (mode=search). Multiple queries are run in order and deduplicated by job ID. Leave empty to browse all jobs matching the filters.",
      "editor": "stringList",
      "items": {
        "type": "string"
      },
      "prefill": [
        "software engineer"
      ],
      "title": "Search queries",
      "type": "array"
    },
    "sortBy": {
      "default": "relevance",
      "description": "Classic search sort order: relevance or newest-first. Semantic search always uses relevance.",
      "editor": "select",
      "enum": [
        "relevance",
        "date"
      ],
      "enumTitles": [
        "Relevance",
        "Newest first"
      ],
      "prefill": "relevance",
      "title": "Sort order",
      "type": "string"
    },
    "startUrls": {
      "default": [],
      "description": "jobs.ch search URLs or job-detail URLs (mode=byUrls). Search URLs carry their own filters; invalid or non-jobs.ch URLs are skipped.",
      "editor": "requestListSources",
      "items": {
        "properties": {
          "url": {
            "description": "jobs.ch search or job-detail URL.",
            "title": "URL",
            "type": "string"
          }
        },
        "required": [
          "url"
        ],
        "type": "object"
      },
      "prefill": [],
      "title": "Start URLs",
      "type": "array"
    },
    "stateKey": {
      "default": "",
      "description": "Key-value store key for incremental state (default `jobs_ch_incremental_state`). Only used when `incrementalMode` is true.",
      "editor": "textfield",
      "prefill": "",
      "title": "Incremental state key",
      "type": "string"
    }
  },
  "required": [
    "mode"
  ],
  "schemaVersion": 1,
  "title": "jobs.ch Scraper Input",
  "type": "object"
}
