Unlock Global Job Insights and Salary Data with Our API

23 Jun 2025
Unlock Global Job Insights and Salary Data with Our API

In today's competitive job market, having access to comprehensive job data and salary insights is crucial for both job seekers and employers. The Global Job Search And Salary API offers a powerful solution for developers looking to integrate job title discovery and salary range retrieval into their applications. By harnessing this API, you can simplify the process of accessing global job opportunities and salary information, ultimately enabling better decision-making for your users.

Imagine being able to provide your users with real-time job titles based on their search queries and geographical preferences. Additionally, retrieve detailed salary ranges for specific job titles across various countries, helping users understand their earning potential. This API is particularly useful for job boards, recruitment agencies, and career development platforms seeking to enhance their offerings.

Prerequisites

To get started with the Global Job Search And Salary API, you will need an API key and a basic understanding of making API calls.

Fetch Job Titles

The Fetch Job Titles action allows developers to retrieve job titles based on user-defined search queries and country codes. This functionality is essential for those looking to discover employment opportunities from a variety of global sources, catering to specific job markets.

Input Requirements

To use this action, you will need to provide:

  • query: A string representing the search term (e.g., "web developer"). The default is "web developer".
  • countryCode: The two-letter ISO 3166-1 alpha-2 country code (e.g., "US"). The default is "US".

Expected Output

The output will include a list of job titles along with the number of available positions for each title in the specified country.

Use Cases for this specific action

  • Recruitment Platforms: Enhance job listings by providing users with relevant job titles based on their interests.
  • Career Counseling Services: Help clients explore job titles available in their field of expertise and geographical location.
  • Job Market Analysis: Analyze job title trends and demands in specific countries to guide strategic hiring decisions.

```python
import requests
import json

# Replace with your actual Cognitive Actions API key and endpoint
# Ensure your environment securely handles the API key
COGNITIVE_ACTIONS_API_KEY = "YOUR_COGNITIVE_ACTIONS_API_KEY"
# This endpoint URL is hypothetical and should be documented for users
COGNITIVE_ACTIONS_EXECUTE_URL = "https://api.cognitiveactions.com/actions/execute"

action_id = "07dd1e7a-b8ce-4d26-b99a-bf08b9c5462d" # Action ID for: Fetch Job Titles

# Construct the exact input payload based on the action's requirements
# This example uses the predefined example_input for this action:
payload = {
  "query": "web developer",
  "countryCode": "US"
}

headers = {
    "Authorization": f"Bearer {COGNITIVE_ACTIONS_API_KEY}",
    "Content-Type": "application/json",
    # Add any other required headers for the Cognitive Actions API
}

# Prepare the request body for the hypothetical execution endpoint
request_body = {
    "action_id": action_id,
    "inputs": payload
}

print(f"--- Calling Cognitive Action: {action.name or action_id} ---")
print(f"Endpoint: {COGNITIVE_ACTIONS_EXECUTE_URL}")
print(f"Action ID: {action_id}")
print("Payload being sent:")
print(json.dumps(request_body, indent=2))
print("------------------------------------------------")

try:
    response = requests.post(
        COGNITIVE_ACTIONS_EXECUTE_URL,
        headers=headers,
        json=request_body
    )
    response.raise_for_status() # Raise an exception for bad status codes (4xx or 5xx)

    result = response.json()
    print("Action executed successfully. Result:")
    print(json.dumps(result, indent=2))

except requests.exceptions.RequestException as e:
    print(f"Error executing action {action_id}: {e}")
    if e.response is not None:
        print(f"Response status: {e.response.status_code}")
        try:
            print(f"Response body: {e.response.json()}")
        except json.JSONDecodeError:
            print(f"Response body (non-JSON): {e.response.text}")
    print("------------------------------------------------")


## Retrieve Salary Ranges by Job Title and Country
The **Retrieve Salary Ranges by Job Title and Country** action enables developers to fetch salary information for specific job titles across different countries. This operation is crucial for providing insights into income potential based on job title and location, using data gathered from multiple job listing platforms.

### Input Requirements
You will need to supply the following inputs:
- **jobTitle**: A string denoting the job position (e.g., "front end developer"). The default is "front end developer".
- **countryCode**: The ISO 3166-1 alpha-2 code representing the country (e.g., "US"). The default is "US".

### Expected Output
The output will include detailed salary information, such as daily, hourly, weekly, monthly, and yearly salary ranges, along with the currency and country.

### Use Cases for this specific action
- **Salary Benchmarking**: Assist organizations in setting competitive salaries based on market data.
- **Job Seekers**: Empower job seekers with knowledge of expected salaries in their field, helping them negotiate better offers.
- **Economic Research**: Provide researchers and analysts with salary data for various job roles across countries to identify trends and disparities.

import requests
import json

# Replace with your actual Cognitive Actions API key and endpoint
# Ensure your environment securely handles the API key
COGNITIVE_ACTIONS_API_KEY = "YOUR_COGNITIVE_ACTIONS_API_KEY"
# This endpoint URL is hypothetical and should be documented for users
COGNITIVE_ACTIONS_EXECUTE_URL = "https://api.cognitiveactions.com/actions/execute"

action_id = "9c4e00eb-2f3b-433a-acfc-704788863c7b" # Action ID for: Retrieve Salary Ranges by Job Title and Country

# Construct the exact input payload based on the action's requirements
# This example uses the predefined example_input for this action:
payload = {
  "jobTitle": "front end developer",
  "countryCode": "US"
}

headers = {
    "Authorization": f"Bearer {COGNITIVE_ACTIONS_API_KEY}",
    "Content-Type": "application/json",
    # Add any other required headers for the Cognitive Actions API
}

# Prepare the request body for the hypothetical execution endpoint
request_body = {
    "action_id": action_id,
    "inputs": payload
}

print(f"--- Calling Cognitive Action: {action.name or action_id} ---")
print(f"Endpoint: {COGNITIVE_ACTIONS_EXECUTE_URL}")
print(f"Action ID: {action_id}")
print("Payload being sent:")
print(json.dumps(request_body, indent=2))
print("------------------------------------------------")

try:
    response = requests.post(
        COGNITIVE_ACTIONS_EXECUTE_URL,
        headers=headers,
        json=request_body
    )
    response.raise_for_status() # Raise an exception for bad status codes (4xx or 5xx)

    result = response.json()
    print("Action executed successfully. Result:")
    print(json.dumps(result, indent=2))

except requests.exceptions.RequestException as e:
    print(f"Error executing action {action_id}: {e}")
    if e.response is not None:
        print(f"Response status: {e.response.status_code}")
        try:
            print(f"Response body: {e.response.json()}")
        except json.JSONDecodeError:
            print(f"Response body (non-JSON): {e.response.text}")
    print("------------------------------------------------")


## Conclusion
The Global Job Search And Salary API provides a wealth of information that can significantly enhance user experiences in job search and recruitment applications. By integrating the Fetch Job Titles and Retrieve Salary Ranges actions, developers can empower users with valuable insights into job opportunities and salary expectations. 

As you explore the capabilities of this API, consider how you can leverage these features to add value to your applications. Whether you're building a job board, a recruitment platform, or a career advice tool, this API can help you deliver essential information that meets the needs of today's job market. Start integrating today and unlock the potential of global job insights for your users!