The base URL is where you can access and interact with the API.
All API requests must be directed to the base URL followed by the respective endpoint
.
https://api.jobzy.africa/jobs
There are basically three endpoints:
https://api.jobzy.africa/jobs/listing
This endpoint takes no query parameters
Here's an example of how the request function body would look in your favourite language or framework.
#include <curl/curl.h>
int main(void) {
CURL *curl;
CURLcode res;
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-api-key: YOUR_API_KEY"); // Replace 'YOUR_API_KEY' with your actual API key
curl = curl_easy_init();
if(curl) {
curl_easy_setopt(curl, CURLOPT_URL, "https://api.jobzy.africa/jobs/listing");
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
res = curl_easy_perform(curl);
if(res != CURLE_OK)
fprintf(stderr, "curl_easy_perform() failed: %s\n",
curl_easy_strerror(res));
curl_easy_cleanup(curl);
curl_slist_free_all(headers);
}
return 0;
}
https://api.jobzy.africa/jobs/listing/search
The Talent Jobs Search endpoint takes the following query parameters:
Prop | Type | Default |
---|
| string
| - |
| number
| 1 |
Here's an example of how the request function body would look in your favourite language or framework.
#include <curl/curl.h>
#include <stdio.h>
void job_search_api(const char* api_key, const char* q, int limit) {
CURL *curl = curl_easy_init();
if (curl) {
char url[256];
snprintf(url, sizeof(url), "https://api.jobzy.africa/jobs/listing/search?q=%s&limit=%d", q, limit);
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-api-key: api_key");
curl_easy_setopt(curl, CURLOPT_URL, url);
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
CURLcode res = curl_easy_perform(curl);
if (res != CURLE_OK) {
fprintf(stderr, "Request failed: %s\n", curl_easy_strerror(res));
}
curl_slist_free_all(headers);
curl_easy_cleanup(curl);
}
}
int main() {
job_search_api("YOUR_API_KEY", "software_engineer", 5); // Replace "YOUR_API_KEY" with your actual API key
return 0;
}
https://api.jobzy.africa/jobs/jsearch/jobs/endpoint
The endpoint
path parameter has two available endpoint-options: search
and job-detail
The search
enpoint option takes the following query parameters:
Prop | Type | Default |
---|
| string
| - |
| number
| 1 |
| number
| 1 |
| string
| US |
The job-detail
enpoint option takes the following query parameters:
Prop | Type | Default |
---|
| string
| - |
| string
| US |
| string
| - |
| string
| - |
Here's an example of how the request function body would look in your favourite language or framework.
#include <curl/curl.h>
#include <stdio.h>
void job_search_api(const char* api_key, const char* endpoint, const char* query, int num_pages) {
CURL *curl = curl_easy_init();
if (curl) {
char url[256];
snprintf(url, sizeof(url), "https://api.jobzy.africa/jobs/jsearch/jobs/endpoint=%s?query=%s&num_pages=%d", endpoint, query, num_pages);
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-api-key: api_key");
curl_easy_setopt(curl, CURLOPT_URL, url);
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
CURLcode res = curl_easy_perform(curl);
if (res != CURLE_OK) {
fprintf(stderr, "Request failed: %s\n", curl_easy_strerror(res));
}
curl_slist_free_all(headers);
curl_easy_cleanup(curl);
}
}
int main() {
// Usage:
job_search_api("YOUR_API_KEY", "search", "developer jobs in chicago", 1); // Replace "YOUR_API_KEY" with your actual API key
return 0;
}
NOTE: Do not forget to include "x-api-key"
in your request headers with the actual API key value for authentication purposes, as indicated above!