The aim of this text is to walk you through what you're seeing in the Swagger-GUI to give you a bit of orientation on what can be done with the Job Search API. If you are just looking for a way to fetch all ads please use our Stream API The search API is intended for user search not downloading all job ads. We may invalidate your API Key if you make excessive amounts of calls that don't fit the intended purpose of this API.
A bad practice typically means searching for every job of every region every fifth minute. A good practice means making lots of varied calls initiated by real users.
The endpoints for the ads search API are:
The easiest way to try out the API is to go to the Swagger-GUI.
Below we only show the URL's. If you prefer the curl command, you type it like:
curl "{URL}" -H "accept: application/json" -H "api-key: {proper_key}"/search?q={search text}
The search endpoint in the first section will return job ads that are currently open for applications. The API is meant for searching, we want to offer you the possibility to just build your own customized GUI on top of our free text query field "q" in /search like this ...
https://joblinks-api-cicd.prod.services.jtech.se/joblinks?q=FlenThis means you don't need to worry about how to build an advanced logic to help the users finding the most relevant ads for, let's say, Flen. The search engine will do this for you. If you want to narrow down the search result in other ways than the free query offers, you can use the available search filters. Some of the filters need id-keys as input for searching structured data. The ids can be found in the Taxonomy API. These ids will help you get sharper hits for structured data. We will always work on improving the hits for free queries hoping you'll have less and less use for filtering.
/ad/{id}
This endpoint is used for fetching specific job ads with all available meta data, by their ad ID number. The ID number can be found by doing a search query.
https://jobsearch.api.jobtechdev.se/ad/8430129Code examples for accessing the api can be found in the 'getting-started-code-examples' repository on Github: https://github.com/JobtechSwe/getting-started-code-examples
If you need help finding the official names for occupations, skills, or geographic locations you will find them in our Taxonomy API
The results of your queries will be in JSON format. We won't attempt to explain this attribute by attribute in this document. Instead we've decided to try to include this in the data model which you can find in our Swagger-GUI.
Successful queries will have a response code of 200 and give you a result set that consists of:
- Some meta data about your search such as number of hits and the time it took to execute the query and
- The ads that matched your search.
Unsuccessful queries will have a response code of:
| HTTP Status code | Reason | Explanation |
|---|---|---|
| 400 | Bad Request | Something wrong in the query |
| 404 | Missing ad | The ad you requested is not available |
| 500 | Internal Server Error | Something wrong on the server side |
To help you find your way forward, here are some example of use cases:
- Searching using Wildcard
- Phrase search
- Searching for a particular job title
- Searching only within a specific field of work
- Filtering employers using organisation number
- Finding jobs near you
- Negative search
- Finding Swedish speaking jobs abroad
- Getting all the jobs since date and time
- Simple freetext search
For some terms the easiest way to find everything you want is through a wildcard search. An example from a user requesting this kind of search was for museum jobs where both searches for "museum" and the various job titles starting with "musei" would be relevant hits which the information structure currently dont merge very well. From version 1.8.0
Request URL
https://joblinks-api-cicd.prod.services.jtech.se/joblinks?q=muse*To search in the ad text for a phrase, use the q parameter and surround the phrase with double quotes (%22).
Request URL
https://joblinks-api-cicd.prod.services.jtech.se/joblinks?q=%22search%20for%20this%20phrase%22The easiest way to get the ads that contain a specific word like a job title is to use a free text query (q) with the search endpoint. This will give you ads with the specified word in either headline, ad description or place of work.
Request URL
https://joblinks-api-cicd.prod.services.jtech.se/joblinks?q=souschefIf you want to be certain that the ad is for a "souschef" - and not just mentions a "souschef" - you can use the occupation ID in the field "occupation". If the ad has been registered by the recruiter with the occupation field set to "souschef", the ad will show up in this search. To do this query you use both the Taxonomy API and the search endpoint. First of all, you need to find the occupation ID for "souschef" in the Taxonomy API for the term in the right category (occupation-name).
NB! the old endpoint (jobsearch.api.jobtechdev.se/taxonomy/) is deprecated and will be removed. Use our Taxonomy API instead
Now you can use the conceptId (iugg_Qq9_QHH) in search to fetch the ads registered with the term "souschef" in the occupation-name field:
Request URL
https://joblinks-api-cicd.prod.services.jtech.se/joblinks?occupation-name=iugg_Qq9_QHHThis will give a smaller result set with a higher certainty of actually being for a "souschef", however the result set will likely miss a few relevant ads since the occupation-name field isn't always set by employers. You should find that a larger set is more useful since there are multiple sorting factors working to show the most relevant hits first. We're also working to always improve the API in regards to unstructured data.
Firstly, use the Taxonomy API to get the Id for Data/IT (occupation field). You'll then make a free text search on the term "IT" narrowing down the search to occupation-field
In the response body you’ll find the conceptId (apaJ_2ja_LuF)for the term Data/IT. Use this with the search endpoint to define the field in which you want to get. So now I want to combine this with my favorite programming language without all those snake related jobs ruining my search.
Request URL
https://joblinks-api-cicd.prod.services.jtech.se/joblinks?occupation-field=apaJ_2ja_LuF&q=pythonIn a similar way, you can use the Taxonomy API to find conceptIds for the parameters occupation-group and occupation-collection
occupation-collection can be used in combination with occupation-name, occupation-field and occupation-group and the search will show ads that are in ALL (AND condition between parameters)
If you want to list all the jobs with just one employer you can use the swedish organisation number from Bolagsverket. For example its possible to take Arbetsförmedlingens number 2021002114 and basically use that as a filter
Request URL
https://joblinks-api-cicd.prod.services.jtech.se/joblinks?employer=2021002114The filter makes a preix search as a default, like a wild card search without the need for an asterix. So a good example of the usefulness of this is to take advantage of the fact that all governmental employers in sweden have org numbers that start with a 2. So you could make a request for Java jobs within the public sector like this.
Request URL
https://joblinks-api-cicd.prod.services.jtech.se/joblinks?employer=2&q=javaYou can filter your search on geographical terms picked up from the Taxonomy just the same way you can with occupation-titles and occupation-fields. (Concept_id doesn't work everywhere at the time of writing but you can use the numeral id's, they are very official and way less likely to change as skills and occupations sometimes do) If you want to search for jobs in Norway you can find the conceptId for "Norge" in the Taxonomy API
And add that parameter conceptId (QJgN_Zge_BzJ) to the country field
Request URL
https://joblinks-api-cicd.prod.services.jtech.se/joblinks?country=QJgN_Zge_BzJIf I make a query which includes 2 different geographical filters the most local one will be promoted. As in this case where I'm searching for "lärare" using the municipality code for Haparanda (tfRE_hXa_eq7) and the region code for Norrbottens Län (9hXe_F4g_eTG). The jobs that are in Haparanda will be the first ones in the result set.
https://joblinks-api-cicd.prod.services.jtech.se/joblinks?municipality=tfRE_hXa_eq7®ion=9hXe_F4g_eTG&q=l%C3%A4rareSo, this is very simple using our q-field. Let's say you want to find Unix jobs
Request URL
https://joblinks-api-cicd.prod.services.jtech.se/joblinks?q=unixBut you find that you get a lot of jobs expecting you to work with which you don't want. All that's needed is to use the minus symbol and the word you want to exclude.
Request URL
https://joblinks-api-cicd.prod.services.jtech.se/joblinks?q=unix%20-linuxSometimes a filter can work too broadly and then it's easier to use a negative search to remove specific results you don't want. In this case we will show you how to filter out all the jobs in Sweden. Rather than adding a minus Sweden in the q field "-sverige" you can use the country code and the country field in the search. So first you get the country code for "Sverige" from the Taxonomy API .
As return we get conceptId i46j_HmG_v64 for "Sverige" and conceptId zSLA_vw2_FXN for "Svenska".
Request URL to get jobs in Swedish outside Sweden
https://joblinks-api-cicd.prod.services.jtech.se/joblinks?language=zSLA_vw2_FXN&country=-i46j_HmG_v64A very common use case is COLLECT ALL THE ADS. We don't want you to use the search API for this. It's expensive in terms of band width, CPU cycles and development time and it's not even guaranteed you'll get everything. Instead we'd like you to use our Stream API.