{"swagger": "2.0", "basePath": "/", "paths": {"/ad/{id}": {"parameters": [{"name": "id", "in": "path", "required": true, "type": "string"}], "get": {"responses": {"200": {"description": "Success", "schema": {"$ref": "#/definitions/JobAd"}}, "404": {"description": "Job ad not found"}}, "description": "Load a job ad by ID", "operationId": "get_ad_by_id", "parameters": [{"name": "X-Fields", "in": "header", "type": "string", "format": "mask", "description": "An optional fields mask"}], "tags": ["Historical ads"]}}, "/search": {"get": {"responses": {"200": {"description": "Success", "schema": {"$ref": "#/definitions/SearchResults"}}}, "description": "Search using parameters and/or freetext", "operationId": "get_search", "parameters": [{"name": "x-feature-freetext-bool-method", "in": "header", "type": "string", "default": "or", "enum": ["and", "or"], "description": "Boolean method to use for unclassified freetext words. Defaults to \"or\""}, {"name": "x-feature-disable-smart-freetext", "in": "header", "type": "boolean", "description": "Disables machine learning enriched queries. Freetext becomes traditional freetext query according to the setting of \"x-feature-freetext-bool-method\""}, {"name": "x-feature-enable-false-negative", "in": "header", "type": "boolean", "description": "Enables extra search for the current known term in free text to avoid false negatives"}, {"name": "published-before", "in": "query", "type": "string", "pattern": "^(\\d\\d\\d\\d-(0?[1-9]|1[0-2])-(0?[1-9]|[12][0-9]|3[01])T(0[0-9]|1[0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]))|(\\d+)$", "description": "Fetch job ads published before specified date and time (valid formats: YYYY-mm-ddTHH:MM:SS or YYYY-mm-dd or YYYY-mm or YYYY). Formats date, adding last month and day if missing, with the help of https://dateutil.readthedocs.io/en/stable/parser.html#dateutil.parser.isoparse"}, {"name": "published-after", "in": "query", "type": "string", "pattern": "^(\\d\\d\\d\\d-(0?[1-9]|1[0-2])-(0?[1-9]|[12][0-9]|3[01])T(0[0-9]|1[0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]))|(\\d+)$", "description": "Fetch job ads published after specified date and time (valid formats: YYYY-mm-ddTHH:MM:SS or YYYY-mm-dd or YYYY-mm or YYYY). Formats date, adding first month and day if missing, with the help of https://dateutil.readthedocs.io/en/stable/parser.html#dateutil.parser.isoparse"}, {"name": "occupation-name", "in": "query", "type": "array", "items": {"type": "string"}, "collectionFormat": "multi", "description": "One or more occupational codes according to the taxonomy"}, {"name": "occupation-group", "in": "query", "type": "array", "items": {"type": "string"}, "collectionFormat": "multi", "description": "One or more occupational group codes according to the taxonomy"}, {"name": "occupation-field", "in": "query", "type": "array", "items": {"type": "string"}, "collectionFormat": "multi", "description": "One or more occupational area codes according to the taxonomy"}, {"name": "occupation-collection", "in": "query", "type": "array", "items": {"type": "string"}, "collectionFormat": "multi", "description": "One or more occupational collections according to the taxonomy. Excludes not matching occupations, groups, fields"}, {"name": "skill", "in": "query", "type": "array", "items": {"type": "string"}, "collectionFormat": "multi", "description": "One or more competency codes according to the taxonomy"}, {"name": "language", "in": "query", "type": "array", "items": {"type": "string"}, "collectionFormat": "multi", "description": "One or more language codes according to the taxonomy"}, {"name": "worktime-extent", "in": "query", "type": "array", "items": {"type": "string"}, "collectionFormat": "multi", "description": "One or more codes for worktime extent, code according to the taxonomy"}, {"name": "parttime.min", "in": "query", "type": "number", "description": "For part-time jobs, minimum extent in percent (for example 50 for 50%)"}, {"name": "parttime.max", "in": "query", "type": "number", "description": "For part-time jobs, maximum extent in percent (for example 100 for 100%)"}, {"name": "driving-license-required", "in": "query", "type": "boolean", "description": "Set to true if driving licence required, false if not"}, {"name": "driving-license", "in": "query", "type": "array", "items": {"type": "string"}, "collectionFormat": "multi", "description": "One or more types of demanded driving licenses, code according to the taxonomy"}, {"name": "employment-type", "in": "query", "type": "array", "items": {"type": "string"}, "collectionFormat": "multi", "description": "Employment type, code according to the taxonomy"}, {"name": "experience", "in": "query", "type": "boolean", "description": "Input 'false' to filter jobs that don't require experience"}, {"name": "municipality", "in": "query", "type": "array", "items": {"type": "string"}, "collectionFormat": "multi", "description": "One or more municipality codes, either codes according to the taxonomy or codes according to https://skr.se/skr/tjanster/kommunerochregioner/faktakommunerochregioner/kommunkoder.2052.html"}, {"name": "region", "in": "query", "type": "array", "items": {"type": "string"}, "collectionFormat": "multi", "description": "One or more region codes, code according to the taxonomy"}, {"name": "country", "in": "query", "type": "array", "items": {"type": "string"}, "collectionFormat": "multi", "description": "One or more country codes, code according to the taxonomy"}, {"name": "unspecified-sweden-workplace", "in": "query", "type": "boolean", "description": "True will return all ads with unspecified workplace in Sweden. False does nothing"}, {"name": "abroad", "in": "query", "type": "boolean", "description": "True will return ads for work outside of Sweden even when searching for places matching Swedish municipality/region/country. False does nothing"}, {"name": "remote", "in": "query", "type": "boolean", "description": "True will return ads which are likely to allow remote work based on phrase matching,\nFalse will only return ads that do not match these phrases\n "}, {"name": "open_for_all", "in": "query", "type": "boolean", "description": "True will return all ads matching the phrase '\u00d6ppen f\u00f6r alla'"}, {"name": "trainee", "in": "query", "type": "boolean", "description": "True will return ads which are likely to allow trainee work based on phrase matching,\nFalse will only return ads that do not match these phrases\n"}, {"name": "larling", "in": "query", "type": "boolean", "description": "True will return ads which are likely to allow larling work based on phrase matching,\nFalse will only return ads that do not match these phrases\n"}, {"name": "franchise", "in": "query", "type": "boolean", "description": "True will return ads which are likely to allow franchise work based on phrase matching,\nFalse will only return ads that do not match these phrases\n"}, {"name": "hire-work-place", "in": "query", "type": "boolean", "description": "True will return ads which are likely concern rental of a place / chair to work from based on phrase matching,\nFalse will only return ads that do not match these phrases\n"}, {"name": "position", "in": "query", "type": "array", "items": {"type": "string", "pattern": "^[-+]?([1-8]?\\d(\\.\\d*)?|90(\\.0*)?),[-+]?(180(\\.0*)?|((1[0-7]\\d)|([1-9]?\\d))(\\.\\d*)?)$"}, "collectionFormat": "multi", "description": "Latitude and longitude in the format \"59.329,18.068\" (latitude,longitude)"}, {"name": "position.radius", "in": "query", "type": "array", "items": {"type": "integer"}, "collectionFormat": "multi", "description": "Radius from the specified position (latitude,longitude) in kilometers (km)"}, {"name": "employer", "in": "query", "type": "array", "items": {"type": "string"}, "collectionFormat": "multi", "description": "Name or organisation number (numbers only, no dashes or spaces) of employer"}, {"name": "q", "in": "query", "type": "string", "description": "Freetext query. Search in ad headline, ad description and employer name"}, {"name": "qfields", "in": "query", "type": "array", "items": {"type": "string"}, "collectionFormat": "multi", "enum": ["occupation", "skill", "location", "employer", "original_id"], "description": "Fields to freetext search in, in addition to default freetext search (parameter q)\nValid input values: ['occupation', 'skill', 'location', 'employer', 'original_id']\nDefault (no input): Search in ad headline, ad description and employer name"}, {"name": "duration", "in": "query", "type": "array", "items": {"type": "string"}, "collectionFormat": "multi", "description": "One or more employment-duration codes, code according to the taxonomy"}, {"name": "relevance-threshold", "in": "query", "type": "number", "description": "Set a result relevance threshold between 0 and 1"}, {"name": "resdet", "in": "query", "type": "string", "enum": ["full", "brief"], "description": "Show 'full' (default) or 'brief' results details"}, {"name": "offset", "in": "query", "type": "integer", "minimum": 0, "maximum": 2000, "default": 0, "description": "The offset parameter defines the offset from the first result you want to fetch. Valid range is (0-2000)"}, {"name": "limit", "in": "query", "type": "integer", "minimum": 0, "maximum": 100, "default": 10, "description": "Number of results to fetch. Valid range is (0-100)"}, {"name": "sort", "in": "query", "type": "string", "enum": ["relevance", "pubdate-desc", "pubdate-asc", "applydate-desc", "applydate-asc", "updated", "id"], "description": "Sorting.\nrelevance: relevance (points) (default sorting)\npubdate-desc: published date, descending (newest job ad first)\npubdate-asc: published date, ascending (oldest job ad first)\napplydate-desc: last apply date, descending (newest apply date first)\napplydate-asc: last apply date, descending (oldest apply date first, few days left for application)\nupdated: sort by update date (descending)\n"}, {"name": "stats", "in": "query", "type": "array", "items": {"type": "string"}, "collectionFormat": "multi", "enum": ["occupation-name", "occupation-group", "occupation-field", "country", "municipality", "region"], "description": "Show statistics for specified fields (available fields: occupation-name, occupation-group, occupation-field, country, municipality and region)"}, {"name": "stats.limit", "in": "query", "type": "integer", "minimum": 0, "maximum": 30, "description": "Maximum number of statistical rows per field"}, {"name": "label", "in": "query", "type": "array", "items": {"type": "string"}, "collectionFormat": "multi", "description": "One or more label strings, to filter ads by label"}, {"name": "historical-from", "in": "query", "type": "string", "pattern": "^(\\d\\d\\d\\d-(0?[1-9]|1[0-2])-(0?[1-9]|[12][0-9]|3[01])T(0[0-9]|1[0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]))|(\\d+)$", "description": "Search ads from this date (Deprecated. Use the parameter published-after instead)"}, {"name": "historical-to", "in": "query", "type": "string", "pattern": "^(\\d\\d\\d\\d-(0?[1-9]|1[0-2])-(0?[1-9]|[12][0-9]|3[01])T(0[0-9]|1[0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]))|(\\d+)$", "description": "Search ad until this date (Deprecated. Use the parameter published-before instead)"}, {"name": "start-seasonal-time", "in": "query", "type": "string", "pattern": "^(\\d\\d\\d\\d-(0?[1-9]|1[0-2])-(0?[1-9]|[12][0-9]|3[01])T(0[0-9]|1[0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]))|(\\d+)$", "description": "Search seasonal ads from this date, date type MM-DD"}, {"name": "end-seasonal-time", "in": "query", "type": "string", "pattern": "^(\\d\\d\\d\\d-(0?[1-9]|1[0-2])-(0?[1-9]|[12][0-9]|3[01])T(0[0-9]|1[0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]))|(\\d+)$", "description": "Search seasonal ads until this date, date type MM-DD"}, {"name": "request-timeout", "in": "query", "type": "integer", "minimum": 1, "maximum": 600, "default": 300, "description": "Set the query timeout in seconds (some historical queries may take several minutes)"}, {"name": "X-Fields", "in": "header", "type": "string", "format": "mask", "description": "An optional fields mask"}], "tags": ["Historical ads"]}}, "/stats": {"get": {"responses": {"200": {"description": "Success"}}, "description": "Load stats by taxonomy type", "operationId": "get_stats", "parameters": [{"name": "taxonomy-type", "in": "query", "type": "array", "items": {"type": "string"}, "collectionFormat": "multi", "description": "One or more taxonomy type, default will return all (available fields: occupation-name, occupation-group, occupation-field, employment-type, country, region, municipality, skill, language). "}, {"name": "stats-by", "in": "query", "type": "string", "default": "concept_id", "enum": ["legacy_ams_taxonomy_id", "concept_id", "label"], "description": "Search taxonomy type with different fields"}, {"name": "limit", "in": "query", "type": "integer", "default": 10, "description": "Maximum number of statistical rows per taxonomy field"}], "tags": ["Historical ads"]}}}, "info": {"title": "Historical job ads", "version": "1.32.2", "description": "## An API for searching and retrieving historical job ads from the Swedish Public Employment Service\n**Useful links:**\n- [Historical Ads info - API and files](https://gitlab.com/arbetsformedlingen/job-ads/getting-started-code-examples/historical-ads-info)\n- [Taxonomy Getting Started](https://arbetsformedlingen.gitlab.io/taxonomy-dev/projects/jobtech-taxonomy/overview.html)\n- [Taxonomy Atlas](https://atlas.jobtechdev.se)\n- [More open data from Arbetsf\u00f6rmedlingen](https://data.arbetsformedlingen.se/)\n", "contact": {"name": "Contact: opendata@arbetsformedlingen.se", "email": null, "url": "https://data.arbetsformedlingen.se/"}, "license": {"name": "Ads are licensed under CC0", "url": "https://creativecommons.org/publicdomain/zero/1.0/deed.sv"}}, "produces": ["application/json"], "consumes": ["application/json"], "tags": [{"name": "Historical ads", "description": "Search and retrieve historical job ads from Arbetsf\u00f6rmedlingen. The oldest ads are from 2016.\n"}], "definitions": {"JobAd": {"properties": {"id": {"type": "string"}, "external_id": {"type": "string"}, "original_id": {"type": "string"}, "label": {"type": "string"}, "webpage_url": {"type": "object"}, "logo_url": {"type": "string"}, "headline": {"type": "string"}, "application_deadline": {"type": "string", "format": "date-time"}, "number_of_vacancies": {"type": "integer"}, "description": {"$ref": "#/definitions/JobAdDescription"}, "employment_type": {"$ref": "#/definitions/JobTechTaxonomyItem"}, "salary_type": {"$ref": "#/definitions/JobTechTaxonomyItem"}, "salary_description": {"type": "string"}, "duration": {"$ref": "#/definitions/JobTechTaxonomyItem"}, "working_hours_type": {"$ref": "#/definitions/JobTechTaxonomyItem"}, "scope_of_work": {"$ref": "#/definitions/ScopeOfWork"}, "access": {"type": "string"}, "employer": {"$ref": "#/definitions/Employer"}, "application_details": {"$ref": "#/definitions/ApplicationDetails"}, "experience_required": {"type": "boolean"}, "access_to_own_car": {"type": "boolean"}, "driving_license_required": {"type": "boolean"}, "driving_license": {"type": "array", "items": {"$ref": "#/definitions/JobTechTaxonomyItem"}}, "occupation": {"$ref": "#/definitions/JobTechTaxonomyItem"}, "occupation_group": {"$ref": "#/definitions/JobTechTaxonomyItem"}, "occupation_field": {"$ref": "#/definitions/JobTechTaxonomyItem"}, "workplace_address": {"$ref": "#/definitions/WorkplaceAddress"}, "must_have": {"$ref": "#/definitions/Requirements"}, "nice_to_have": {"$ref": "#/definitions/Requirements"}, "application_contacts": {"$ref": "#/definitions/ApplicationContact"}, "publication_date": {"type": "string", "format": "date-time"}, "last_publication_date": {"type": "string", "format": "date-time"}, "removed": {"type": "boolean"}, "removed_date": {"type": "string", "format": "date-time"}, "source_type": {"type": "string"}, "timestamp": {"type": "integer"}}, "type": "object"}, "JobAdDescription": {"properties": {"text": {"type": "string"}, "text_formatted": {"type": "string"}, "company_information": {"type": "string"}, "needs": {"type": "string"}, "requirements": {"type": "string"}, "conditions": {"type": "string"}}, "type": "object"}, "JobTechTaxonomyItem": {"properties": {"concept_id": {"type": "string"}, "label": {"type": "string"}, "legacy_ams_taxonomy_id": {"type": "string"}}, "type": "object"}, "ScopeOfWork": {"properties": {"min": {"type": "integer"}, "max": {"type": "integer"}}, "type": "object"}, "Employer": {"properties": {"phone_number": {"type": "string"}, "email": {"type": "string"}, "url": {"type": "string"}, "organization_number": {"type": "string"}, "name": {"type": "string"}, "workplace": {"type": "string"}}, "type": "object"}, "ApplicationDetails": {"properties": {"information": {"type": "string"}, "reference": {"type": "string"}, "email": {"type": "string"}, "via_af": {"type": "boolean"}, "url": {"type": "string"}, "other": {"type": "string"}}, "type": "object"}, "WorkplaceAddress": {"properties": {"municipality": {"type": "string"}, "municipality_code": {"type": "string"}, "municipality_concept_id": {"type": "string"}, "region": {"type": "string"}, "region_code": {"type": "string"}, "region_concept_id": {"type": "string"}, "country": {"type": "string"}, "country_code": {"type": "string"}, "country_concept_id": {"type": "string"}, "street_address": {"type": "string"}, "postcode": {"type": "string"}, "city": {"type": "string"}, "coordinates": {"type": "array", "items": {"type": "number"}}}, "type": "object"}, "Requirements": {"properties": {"skills": {"type": "array", "items": {"$ref": "#/definitions/WeightedJobtechTaxonomyItem"}}, "languages": {"type": "array", "items": {"$ref": "#/definitions/WeightedJobtechTaxonomyItem"}}, "work_experiences": {"type": "array", "items": {"$ref": "#/definitions/WeightedJobtechTaxonomyItem"}}, "education": {"type": "array", "items": {"$ref": "#/definitions/WeightedJobtechTaxonomyItem"}}, "education_level": {"type": "array", "items": {"$ref": "#/definitions/WeightedJobtechTaxonomyItem"}}}, "type": "object"}, "WeightedJobtechTaxonomyItem": {"allOf": [{"$ref": "#/definitions/JobTechTaxonomyItem"}, {"properties": {"weight": {"type": "integer"}}, "type": "object"}]}, "ApplicationContact": {"properties": {"name": {"type": "string"}, "description": {"type": "string"}, "email": {"type": "string"}, "telephone": {"type": "string"}, "contact_type": {"type": "string"}}, "type": "object"}, "SearchResults": {"properties": {"total": {"$ref": "#/definitions/NumberOfHits"}, "positions": {"type": "integer"}, "query_time_in_millis": {"type": "integer"}, "result_time_in_millis": {"type": "integer"}, "stats": {"type": "array", "items": {"$ref": "#/definitions/Stats"}}, "freetext_concepts": {"$ref": "#/definitions/FreetextConcepts"}, "hits": {"type": "array", "items": {"$ref": "#/definitions/JobAdSearchResult"}}}, "type": "object"}, "NumberOfHits": {"properties": {"value": {"type": "integer"}}, "type": "object"}, "Stats": {"properties": {"type": {"type": "string"}, "values": {"type": "array", "items": {"$ref": "#/definitions/StatDetail"}}}, "type": "object"}, "StatDetail": {"properties": {"term": {"type": "string"}, "concept_id": {"type": "string"}, "code": {"type": "string"}, "count": {"type": "integer"}}, "type": "object"}, "FreetextConcepts": {"properties": {"skill": {"type": "array", "items": {"type": "string"}}, "occupation": {"type": "array", "items": {"type": "string"}}, "location": {"type": "array", "items": {"type": "string"}}, "skill_must": {"type": "array", "items": {"type": "string"}}, "occupation_must": {"type": "array", "items": {"type": "string"}}, "location_must": {"type": "array", "items": {"type": "string"}}, "skill_must_not": {"type": "array", "items": {"type": "string"}}, "occupation_must_not": {"type": "array", "items": {"type": "string"}}, "location_must_not": {"type": "array", "items": {"type": "string"}}}, "type": "object"}, "JobAdSearchResult": {"allOf": [{"$ref": "#/definitions/JobAd"}, {"properties": {"relevance": {"type": "number"}}, "type": "object"}]}}, "responses": {"ParseError": {"description": "When a mask can't be parsed"}, "MaskError": {"description": "When any error occurs on mask"}}}
