Get one job
GET /v1/jobs/{slug} returns one job with its full description as plain text and sanitised HTML, plus its skills. A job that has closed answers 410 gone.
#The request
Use the slug of a job from List jobs. The answer is the same job object plus the whole description and the skills. The endpoint takes no query parameters: a stray one is a 400 unknown_parameter.
/v1/jobs/{slug}api.greenhired.comjobs:readOne job with the whole description.
curl -s https://api.greenhired.com/v1/jobs/wind-farm-site-engineer-bergen-f3b1 \
-H "Authorization: Bearer $GREENHIRED_API_KEY" const slug = 'wind-farm-site-engineer-bergen-f3b1';
const res = await fetch('https://api.greenhired.com/v1/jobs/' + encodeURIComponent(slug), {
headers: { Authorization: 'Bearer ' + process.env.GREENHIRED_API_KEY },
});
if (res.status === 410) console.log('This job has closed.');
else console.log((await res.json()).data.title); import os, requests
slug = "wind-farm-site-engineer-bergen-f3b1"
res = requests.get(
"https://api.greenhired.com/v1/jobs/" + slug,
headers={"Authorization": "Bearer " + os.environ["GREENHIRED_API_KEY"]},
timeout=15,
)
if res.status_code == 410:
print("This job has closed.")
else:
print(res.json()["data"]["title"]) #What is added to the job
| Field | Notes |
|---|---|
description_text | The whole description as plain text, up to 60,000 characters |
description_html | Sanitised HTML: paragraphs, line breaks, lists, headings, bold and italic, links, images, tables, div and span. Never a script, style, event handler or form. Links and images are absolute addresses, so it is safe to insert into a page |
skills | A list of skill names |
The answer is { "data": { ...job } }.
#Not found and gone
404 not_found: there is no such job, it is one this API may not serve, or it is a duplicate copy of a live job (the API serves one copy of each).410 gone: the job existed and has closed (expired, removed, archived or past its closing date). Stop showing it.
#Frequently asked questions
- Can I show description_html on my site?
- Yes. It is sanitised and its links and images are absolute. You must still link to the job
urlnext to it. See Attribution. - What should I do on a 410?
- Remove the job from your pages. A
410 gonemeans the job closed. A404can also mean the API may not serve that job, so treat the two differently. - Where do I send applicants?
- To the job
urlon greenhired.com. The API never hands out the address a third-party job came from, and applying happens on the GreenHired page.
Was this page helpful?