{
  "openapi": "3.0.1",
  "info": {
    "title": "Job Market Intelligence",
    "description": "Aggregate job listings from four free data sources, deduplicate them, and generate a structured intelligence report with skill demand rankings, salary benchmarks, top hiring companies, and remote-work statistics — all without any API keys.",
    "version": "1.0",
    "x-build-id": "eHEXGpHQKUQYlFiIg"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/ryanclinton~job-market-intelligence/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-ryanclinton-job-market-intelligence",
        "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/ryanclinton~job-market-intelligence/runs": {
      "post": {
        "operationId": "runs-sync-ryanclinton-job-market-intelligence",
        "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/ryanclinton~job-market-intelligence/run-sync": {
      "post": {
        "operationId": "run-sync-ryanclinton-job-market-intelligence",
        "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": [
          "query"
        ],
        "properties": {
          "query": {
            "title": "Search Query",
            "type": "string",
            "description": "Job search query (e.g., 'software engineer', 'data scientist', 'product manager')",
            "default": "software engineer"
          },
          "location": {
            "title": "Location",
            "type": "string",
            "description": "Location filter (e.g., 'San Francisco', 'Remote', 'New York')"
          },
          "companyName": {
            "title": "Company Name",
            "type": "string",
            "description": "Filter by specific company name"
          },
          "remoteOnly": {
            "title": "Remote Only",
            "type": "boolean",
            "description": "Only show remote jobs",
            "default": false
          },
          "datePosted": {
            "title": "Date Posted",
            "enum": [
              "day",
              "week",
              "month",
              "any"
            ],
            "type": "string",
            "description": "How recent should the job postings be",
            "default": "month"
          },
          "sources": {
            "title": "Sources",
            "type": "array",
            "description": "Which sources to search (leave empty for all). Available: remotive, arbeitnow, jobicy, hn-whoishiring",
            "items": {
              "type": "string"
            }
          },
          "analyzeSkills": {
            "title": "Analyze Skills",
            "type": "boolean",
            "description": "Extract and rank mentioned skills from job descriptions",
            "default": true
          },
          "analyzeSalaries": {
            "title": "Analyze Salaries",
            "type": "boolean",
            "description": "Extract and summarize salary data from job postings",
            "default": true
          },
          "maxResults": {
            "title": "Max Results",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Maximum number of job listings to return. Analytics quality plateaus past ~200 — going higher mostly increases runtime, not insight.",
            "default": 100
          },
          "sourceWeights": {
            "title": "Source Weights",
            "type": "object",
            "description": "Per-source sub-sampling fraction (0..1). Use this to down-weight noisier sources — e.g. {\"hn-whoishiring\": 0.5} keeps roughly half of HN listings while taking the other sources whole. Sources not listed here pass through at full weight. Sub-sampling is deterministic via per-listing hash, so re-runs are reproducible. ⚠️ Use only when you intentionally want a representative sample, not complete coverage — sub-sampling drops listings, so cohort size shrinks."
          },
          "customSkills": {
            "title": "Custom Skills",
            "type": "array",
            "description": "Add domain-specific skills to detect alongside the built-in 80+ technologies. Each entry: { name, regex, category? }. Example: [{\"name\": \"Snowpark\", \"regex\": \"\\\\bsnowpark\\\\b\", \"category\": \"Data\"}]. Categories: Languages, Frameworks, Cloud, Data, AI/ML, Other (default). Invalid regex entries are logged and skipped."
          },
          "groupBy": {
            "title": "Segment By",
            "type": "array",
            "description": "Split analytics into per-segment reports — fixes the cohort-mixing distortion when one query spans regions / seniorities / job types. Pick one or more dimensions; output adds a `segments[]` array with per-segment salary, top skills, seniority breakdown, and remote percentage. Empty = single cohort.",
            "items": {
              "type": "string"
            }
          },
          "enableHistoricalTracking": {
            "title": "Enable Historical Tracking",
            "type": "boolean",
            "description": "Persist a cohort snapshot to a named KV store (job-market-intelligence-history) and compute trend insights against the previous run. Adds: salaryMedianChange, listingGrowthRate, topRising/FallingSkills, newCompanies/departedCompanies, direction (expanding/stable/tightening). First run with this on returns trendInsights=null and writes the baseline snapshot.",
            "default": false
          },
          "historyStateKey": {
            "title": "History State Key",
            "type": "string",
            "description": "Override the auto-derived snapshot key (default: hash of query + location). Use a stable string when monitoring the same cohort across runs with slightly different filters."
          },
          "incremental": {
            "title": "Incremental Mode",
            "type": "boolean",
            "description": "When enabled together with historical tracking, drops listings whose URLs were already returned in the previous run. Reduces downstream processing/noise — only fresh listings reach your dataset/pipelines (all sources are still fetched in full so analytics like trend insights remain accurate). First run for a key returns everything (no prior URLs to filter).",
            "default": false
          },
          "lookbackDays": {
            "title": "Lookback Days",
            "minimum": 1,
            "maximum": 365,
            "type": "integer",
            "description": "Maximum age of the prior snapshot for trend computation. Snapshots older than this are treated as a first run. Default 30.",
            "default": 30
          },
          "mode": {
            "title": "Mode (Persona Preset)",
            "enum": [
              "default",
              "job_seeker",
              "recruiter",
              "analyst"
            ],
            "type": "string",
            "description": "Reorders the recommendedActions[] block by audience priority. default = balanced; job_seeker = bubbles learn-skill / apply-now / curriculum actions; recruiter = bubbles salary-band / hiring-velocity / role-spec actions; analyst = bubbles monitoring / strategy / regime actions. The full action list is always emitted — mode only affects ordering.",
            "default": "default"
          },
          "eventThresholds": {
            "title": "Event Thresholds",
            "type": "object",
            "description": "Override the default thresholds that trigger entries in the events[] array. Defaults: salarySpikePercent 5, salaryDropPercent -5, listingGrowthSpikePercent 25, listingDropPercent -25, remoteShiftPoints 5, skillEmergenceDeltaPercent 100. Example: {\"salarySpikePercent\": 3, \"listingGrowthSpikePercent\": 10} for noisier alerting."
          },
          "whatIfScenarios": {
            "title": "What-If Scenarios",
            "type": "array",
            "description": "Counterfactual scenarios to evaluate against the cohort. Each: { type: 'salary_change' | 'skill_emphasis', percent? (for salary_change), skill? (for skill_emphasis), constraints?: { maxPercent?, minPercent? } }. When omitted, the actor auto-generates 2–4 representative scenarios. Outputs are derivable-only (percentile shift, tier change, scarcity match) — never forecasts. Example: [{\"type\": \"salary_change\", \"percent\": 10, \"constraints\": {\"maxPercent\": 5}}, {\"type\": \"skill_emphasis\", \"skill\": \"Rust\"}]."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}