{
  "openapi": "3.0.1",
  "info": {
    "title": "JobsDB Thailand Scraper",
    "description": "Scrape public job listings from th.jobsdb.com with optional detail enrichment.",
    "version": "0.1",
    "x-build-id": "sBTYjkre5zOT993gP"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/mai_amm~jobsdb-thailand-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-mai_amm-jobsdb-thailand-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/mai_amm~jobsdb-thailand-scraper/runs": {
      "post": {
        "operationId": "runs-sync-mai_amm-jobsdb-thailand-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/mai_amm~jobsdb-thailand-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-mai_amm-jobsdb-thailand-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": "Job search keyword such as software engineer, data analyst, or บัญชี."
          },
          "queries": {
            "title": "Multiple queries",
            "type": "array",
            "description": "Optional list of additional keywords. Each keyword is searched separately.",
            "items": {
              "type": "string"
            }
          },
          "location": {
            "title": "Location",
            "type": "string",
            "description": "Optional Thailand location, for example Bangkok, Chiang Mai, Chonburi, Remote."
          },
          "startUrls": {
            "title": "Start URLs",
            "type": "array",
            "description": "JobsDB Thailand search or job detail URLs. Non-Thai JobsDB URLs are ignored.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum number of job records to save across all queries and URLs. Use 0 for unlimited.",
            "default": 25
          },
          "maxPages": {
            "title": "Max pages",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Maximum search result pages per search source.",
            "default": 5
          },
          "sortMode": {
            "title": "Sort mode",
            "enum": [
              "relevance",
              "date"
            ],
            "type": "string",
            "description": "Use date for newest jobs first, or relevance for JobsDB default ranking.",
            "default": "relevance"
          },
          "dateRange": {
            "title": "Date range",
            "enum": [
              "",
              "1",
              "3",
              "7",
              "14",
              "31"
            ],
            "type": "string",
            "description": "Jobs posted within this many days, for example 1, 3, 7, 14, or 31.",
            "default": ""
          },
          "workType": {
            "title": "Work type code",
            "type": "string",
            "description": "Native JobsDB work type code, for example 242 for Full time when available."
          },
          "workArrangement": {
            "title": "Work arrangement code",
            "type": "string",
            "description": "Native JobsDB arrangement code, for example 2 for Remote when available."
          },
          "classification": {
            "title": "Classification code",
            "type": "string",
            "description": "Native JobsDB classification/category code."
          },
          "subClassification": {
            "title": "Sub-classification code",
            "type": "string",
            "description": "Native JobsDB sub-classification code."
          },
          "includeDetails": {
            "title": "Include details",
            "type": "boolean",
            "description": "Open job detail pages for full descriptions, company metadata, apply URL, emails, and phones where provided.",
            "default": true
          },
          "includeContacts": {
            "title": "Include contacts",
            "type": "boolean",
            "description": "Include public emails and phone numbers extracted from detail text.",
            "default": false
          },
          "compact": {
            "title": "Compact output",
            "type": "boolean",
            "description": "Return only core fields for AI-agent or MCP use.",
            "default": false
          },
          "incrementalMode": {
            "title": "Incremental mode",
            "type": "boolean",
            "description": "Track listings across runs and emit only new, updated, or reappeared jobs by default.",
            "default": false
          },
          "stateKey": {
            "title": "State key",
            "type": "string",
            "description": "Stable key for incremental state. Use a different key for each scheduled query set."
          },
          "emitUnchanged": {
            "title": "Emit unchanged",
            "type": "boolean",
            "description": "When incremental mode is enabled, include unchanged jobs in the output.",
            "default": false
          },
          "emitExpired": {
            "title": "Emit expired",
            "type": "boolean",
            "description": "When incremental mode is enabled, emit jobs that existed in the previous state but were not found in this run.",
            "default": false
          },
          "skipReposts": {
            "title": "Skip reposts",
            "type": "boolean",
            "description": "Drop detected reposts from output when incremental mode is enabled.",
            "default": false
          },
          "descriptionMaxLength": {
            "title": "Description max length",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum text length for description fields. Use 0 for no trimming.",
            "default": 12000
          },
          "includeRawHtml": {
            "title": "Include raw HTML",
            "type": "boolean",
            "description": "Include full detail-page HTML in descriptionHtml. Disabled by default to keep datasets smaller.",
            "default": false
          },
          "maxRequestRetries": {
            "title": "Max request retries",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Retry count per request. Increase when proxies are unstable.",
            "default": 4
          },
          "navigationTimeoutSecs": {
            "title": "Navigation timeout seconds",
            "minimum": 30,
            "maximum": 240,
            "type": "integer",
            "description": "Timeout for loading a JobsDB page. Residential proxies can be slow, so 120 seconds is safer for production.",
            "default": 120
          },
          "requestHandlerTimeoutSecs": {
            "title": "Request handler timeout seconds",
            "minimum": 60,
            "maximum": 360,
            "type": "integer",
            "description": "Overall timeout per request including browser work and parsing.",
            "default": 180
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Number of browser pages running in parallel.",
            "default": 2
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Apify Proxy configuration. Residential proxy is recommended for JobsDB/SEEK.",
            "default": {
              "useApifyProxy": true,
              "groups": [
                "RESIDENTIAL"
              ]
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}