{
  "openapi": "3.0.1",
  "info": {
    "title": "USAJOBS & Arbetsförmedlingen API: Government Jobs Feed",
    "description": "Government jobs API: US federal jobs from USAJOBS (with your free key) and Swedish Arbetsförmedlingen / Platsbanken ads as clean JSON, with a new-jobs-only mode and licence on every row. $2 per 1,000 jobs.",
    "version": "0.2",
    "x-build-id": "2nCjsu7lUgV5hWP52"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/devdarfy~gov-jobs/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-devdarfy-gov-jobs",
        "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/devdarfy~gov-jobs/runs": {
      "post": {
        "operationId": "runs-sync-devdarfy-gov-jobs",
        "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/devdarfy~gov-jobs/run-sync": {
      "post": {
        "operationId": "run-sync-devdarfy-gov-jobs",
        "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": {
          "sources": {
            "title": "Sources",
            "type": "array",
            "description": "Government job APIs to query. jobtech-se = Swedish Public Employment Service (open data, CC0, no key needed). usajobs = USAJOBS, runs only if you enter your own free USAJOBS API key and registered email below.",
            "items": {
              "type": "string",
              "enum": [
                "jobtech-se",
                "usajobs"
              ],
              "enumTitles": [
                "Sweden - JobTech / Platsbanken (CC0)",
                "USA - USAJOBS (your own API key)"
              ]
            },
            "default": [
              "jobtech-se"
            ]
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Search words sent to the source API (matched in title and description; any word matches). Swedish ads are mostly in Swedish, e.g. sjuksköterska, lärare, utvecklare. Leave empty for all recent jobs.",
            "items": {
              "type": "string"
            }
          },
          "countries": {
            "title": "Countries (ISO codes)",
            "type": "array",
            "description": "ISO 3166-1 alpha-2 codes (SE, US, NO...). Only jobs with a known country can match. Sources that do not cover a listed country are skipped.",
            "items": {
              "type": "string"
            }
          },
          "locations": {
            "title": "Locations",
            "type": "array",
            "description": "Keep jobs whose location text contains any of these (city, municipality, region, state).",
            "items": {
              "type": "string"
            }
          },
          "postedWithinDays": {
            "title": "Posted within days",
            "minimum": 0,
            "type": "integer",
            "description": "Only jobs published in the last N days. 0 = no limit. USAJOBS supports at most 60 days.",
            "default": 0
          },
          "occupation": {
            "title": "Occupation / category",
            "type": "string",
            "description": "Text matched against the occupation label (for example 'sjuksköterska', 'Information Technology'). For USAJOBS a 4-digit job category series code (for example 2210) is sent to the API directly."
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum number of jobs returned in total, 0 = unlimited. You are charged per job returned (pay per result), so this caps your spend.",
            "default": 100
          },
          "onlyNewSinceLastRun": {
            "title": "Only new since last run",
            "type": "boolean",
            "description": "Delta mode: skip jobs already delivered in earlier runs (IDs are kept in the named key-value store 'gov-jobs-seen' in your account). Jobs cut off by Max items are not marked as seen and come back next run. Schedule the Actor daily with this on to get a feed of new vacancies.",
            "default": false
          },
          "includeDescription": {
            "title": "Include description text",
            "type": "boolean",
            "description": "Adds the plain-text description as descriptionText (e-mail addresses are replaced with [email removed]). Makes rows larger.",
            "default": false
          },
          "apiKey": {
            "title": "USAJOBS API key",
            "type": "string",
            "description": "Your own USAJOBS API key (the Authorization-Key). Only needed for the usajobs source. It is used only for requests to data.usajobs.gov, stored as a secret input and never written to output or logs. Request a free key at developer.usajobs.gov."
          },
          "apiKeyEmail": {
            "title": "USAJOBS registered email",
            "type": "string",
            "description": "The e-mail address you registered the USAJOBS key with. USAJOBS requires it as the User-Agent header. Only needed for the usajobs source; stored as a secret input and never written to output or logs."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}