GraphQL

The SEEK API uses GraphQL  to expose a graph of positions, candidates and other business objects.GraphQL allows you to query and join SEEK’s objects together in whatever way best suits your software. It also gives SEEK insight into how its API is being used and which fields our partners are interested in.For more background on GraphQL we recommend the GraphQL Foundation’s Introduction to GraphQL .

Requests and responses

You can send any GraphQL operation that you see on this site or later create in the GraphQL Explorer as an HTTP POST request. GraphQL is not tied to a certain programming language or client library; this works with any HTTP client that you already use and are familiar with.A simple query can be bundled into a JSON request body like so:
RequestResponse
Copy
POST https://graphql.seek.com/graphql HTTP/1.1
Accept-Language: en-AU
Authorization: Bearer PARTNER_TOKEN_HERE
Content-Type: application/json
User-Agent: example-application/1.2.3
X-Request-Id: a9e3d78d-576d-470b-b1d2-52f4921be25c
X-Session-Id: b5a8774c-c450-4906-a25c-861bce129106
{
  "query": "{ version }"
}
Here are some basic code samples that operate at the HTTP layer. In practice, we recommend using a GraphQL client library to streamline development.
BashC#JavaJavaScript (Node.js)KotlinPHPPython 3Swift
Copy
#!/bin/sh

# In practice, propagate language preferences from the end-user client.
# https://developer.seek.com/graphql/in-practice#content-localisation
acceptLanguage='en-AU'

# In practice, retrieve and cache an access token dynamically at runtime.
# https://developer.seek.com/auth
accessToken=''

# In practice, use your application name and version from configuration.
# https://developer.seek.com/graphql/in-practice#tracing-requests
userAgent='example-application/1.2.3'

# In practice, share the session ID among requests in a given interaction.
# https://developer.seek.com/graphql/in-practice#tracing-requests
sessionId="$(uuidgen)"

# In practice, be wary of code injection.
# https://developer.seek.com/graphql/in-practice#variables
data='{"query": "{ version }"}'

# In practice, use a GraphQL client and something other than a Bash script.
# https://developer.seek.com/graphql/in-practice#client-libraries-and-tools
# https://graphql.org/community/tools-and-libraries/?tags=client
response="$(
  curl \
  --data "${data}" \
  --header "Accept-Language: ${acceptLanguage}" \
  --header "Authorization: Bearer ${accessToken}" \
  --header 'Content-Type: application/json' \
  --header "User-Agent: ${userAgent}" \
  --header "X-Request-Id: $(uuidgen)" \
  --header "X-Session-Id: ${sessionId}" \
  --request POST \
  --silent \
  --write-out '\n%{http_code}' \
  'https://graphql.seek.com/graphql'
)"

echo "${response}" | tail -n 1
# 200

echo "${response}" | head -n 1
# {"data":{"version":"abcdefa.12345"},"extensions":{"requestLatency":1}}
The above samples send an unauthenticated version query. A valid access token is required in the Authorization request header for other operations, as covered in the previous Auth section.

Code samples

We provide GraphQL code samples across the Developer Site to demonstrate the implementation of features that are described in the documentation:
QueryVariablesResult
query ($id: String!) {
  hiringOrganization(id: $id) {
    name
  }
}
There are a few aspects to each code sample:
  1. The first tab displays the query or mutation operation that is being described.
  2. The second tab displays the input variables that are supplied alongside the operation.
  3. The third tab displays the result of executing the operation with the supplied variables.
  4. The Copy button copies the contents of the current tab to your clipboard.This may be useful to incorporate the sample code into your software or an API testing tool.
  5. The GraphQL Explorer button takes you to a dashboard page where you can execute the operation.The dashboard includes a lightweight, in-browser editor where you can execute GraphQL operations in one click. It is similar in usage to API testing tools like Postman and Insomnia.Our code samples reference mock objects in our read-only Playground environment. This allows us to document operations that can be executed by all partners; by contrast, access to production objects is typically restricted to a single hirer or partner.

Dashboard

The Developer Dashboard is an administrative user interface that lets you observe and configure your SEEK API integration:It’s a key component of our integration process and can be used to:

Schema

The schema documentation website lets you inspect low-level details of our GraphQL operations & types:This documentation is automatically generated from our GraphQL schema. You can introspect  the schema yourself by pointing GraphQL client tooling at https://graphql.seek.com/graphql. See GraphQL in practice for more information about our GraphQL endpoint and client tooling.