Install third-party dependencies

For better async support, you can opt for the httpx package. Adapt the code below accordingly.

pip install requests

Important notes:

Example code

import requests

hostname = 'search.api.careerjet.net'
path = '/v4/query'
api_key = '<API_KEY>'
referer = 'https://example-publisher-site.com/find-jobs/?s=python+developer&l=London'

params = {
    'locale_code': 'en_IM',
    'keywords': 'python developer',
    'location': 'London',
    'user_ip': '<USER_IP>',
    'user_agent': '<USER_AGENT>',
}

r = requests.get(
    url=f'https://{hostname}{path}',
    params=params,
    auth=(api_key, ''),
    headers={
        'content-type': 'application/json',
        'Referer': referer,
    },
    timeout=2
)
print(r.status_code)
print(r.json())