Unlock Real-Time Job Data and Company Insights with AI Actions

In today's rapidly changing job market, having access to timely and accurate salary and company information is crucial for both job seekers and employers. The Real Time Company And Job Insights API offers a suite of Cognitive Actions that empower developers to integrate real-time data from Glassdoor into their applications. With these actions, you can streamline the process of salary estimation, job searching, and company reviews, ultimately simplifying decision-making for users.
Imagine a scenario where a job seeker is uncertain about salary expectations for a specific role in a certain location. With the API, developers can easily provide this information, allowing users to make informed career choices. Similarly, businesses can leverage company insights to understand industry standards, helping them to attract and retain top talent.
Prerequisites
To get started with the Real Time Company And Job Insights API, you'll need an API key and a basic understanding of making API calls.
Estimate Salary By Job and Location
The Estimate Salary By Job and Location action allows you to retrieve salary estimations for specific jobs at specific companies, utilizing real-time Glassdoor data. This action is particularly useful for job seekers looking to understand their market value based on their job title and location.
Input Requirements
The input requires the following parameters:
employerId(string): A unique identifier for the employer.jobTitle(string): The title of the job to search for.location(string, optional): The geographic location for the job search.experienceYears(string, optional): Filter based on years of experience.
Expected Output
The output includes detailed salary information such as:
max_salarymin_salarymedian_salarysalary_currency- Company name and confidence in the data.
Use Cases for this Specific Action
- Job Seekers: Individuals can assess if they are being offered a competitive salary based on their job title and location.
- Recruiters: Helps recruiters set realistic salary expectations for potential candidates.
- Market Analysis: Companies can analyze salary trends to ensure they remain competitive in attracting talent.
```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 = "2f8f8536-a6ba-4863-abb1-4973e0c90177" # Action ID for: Estimate Salary By Job and Location
# Construct the exact input payload based on the action's requirements
# This example uses the predefined example_input for this action:
payload = {
"domain": "www.glassdoor.com",
"jobTitle": "software developer",
"employerId": "1138",
"locationType": "ANY",
"experienceYears": "ALL"
}
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 Estimates by Job Title and Location
The **Retrieve Salary Estimates by Job Title and Location** action fetches accurate salary estimates based on specific job titles and locations. This action helps developers provide users with an understanding of salary expectations across different areas.
### Input Requirements
The parameters required include:
- `positionTitle` (string): The job title to search for.
- `location` (string): The geographical location for the job search.
- `experienceYears` (string, optional): Filter based on years of experience.
### Expected Output
The output includes:
- `max_salary`
- `min_salary`
- `median_salary`
- `salary_currency`
- A link for more detailed salary information.
### Use Cases for this Specific Action
- **Job Portals**: Integrate salary estimates into job listings to help candidates gauge their potential earnings.
- **Compensation Benchmarking**: Companies can use the data to benchmark salaries against competitors in similar locations.
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 = "4b90c1e4-94c6-4298-acd7-0c8d908dd000" # Action ID for: Retrieve Salary Estimates by Job Title and Location
# Construct the exact input payload based on the action's requirements
# This example uses the predefined example_input for this action:
payload = {
"domain": "www.glassdoor.com",
"location": "new york",
"placeType": "ANY",
"positionTitle": "software developer",
"experienceYears": "ALL"
}
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("------------------------------------------------")
## Perform Company Search on Glassdoor
This action enables developers to efficiently search for companies on the Glassdoor platform, providing fast and reliable results in real-time.
### Input Requirements
The input parameters include:
- `query` (string): The search term used to find companies.
- `limit` (number, optional): The maximum number of results to return.
### Expected Output
The output provides:
- Company name
- CEO name and rating
- Company size and type
- Job count and revenue information
### Use Cases for this Specific Action
- **Company Research**: Job seekers can research potential employers and their ratings before applying.
- **Competitive Analysis**: Businesses can assess their competitors based on employee reviews and ratings.
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 = "69c26680-db65-40a4-abd7-0ef32833edb4" # Action ID for: Perform Company Search on Glassdoor
# Construct the exact input payload based on the action's requirements
# This example uses the predefined example_input for this action:
payload = {
"limit": 10,
"query": "goo",
"websiteDomain": "www.glassdoor.com"
}
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("------------------------------------------------")
## Search Jobs on Glassdoor
With the **Search Jobs on Glassdoor** action, developers can perform job searches using various filters, including job type, location, and company rating.
### Input Requirements
The required parameters are:
- `location` (string): The geographical location to search for jobs.
- `query` (string): The search term for the type of job.
### Expected Output
The output includes:
- A list of jobs with details such as job title, salary range, and company information.
### Use Cases for this Specific Action
- **Job Boards**: Enhance job search functionality on websites with tailored job listings.
- **Mobile Apps**: Create job search applications that allow users to filter jobs based on their preferences.
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 = "97eafe15-4e9a-4f29-a16d-891e73a40498" # Action ID for: Search Jobs on Glassdoor
# Construct the exact input payload based on the action's requirements
# This example uses the predefined example_input for this action:
payload = {
"query": "front end developer",
"location": "new york",
"locationType": "ANY",
"minimumCompanyRating": "ANY"
}
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 Company Reviews from Glassdoor
This action allows you to fetch detailed company reviews from Glassdoor, supporting various filtering, sorting, and pagination options.
### Input Requirements
The input parameters include:
- `companyId` (number): A unique identifier for the company.
- `sort` (string, optional): Determines the order of results.
### Expected Output
The output contains:
- Company rating
- Detailed reviews with pros and cons
- Advice to management from employees
### Use Cases for this Specific Action
- **Employee Insights**: Job seekers can gain insights into company culture and employee satisfaction before applying.
- **HR Tools**: Companies can analyze feedback to improve employee engagement and retention strategies.
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 = "a60d1f40-db70-4429-94a0-cbcffec3e933" # Action ID for: Retrieve Company Reviews from Glassdoor
# Construct the exact input payload based on the action's requirements
# This example uses the predefined example_input for this action:
payload = {
"page": 1,
"sort": "POPULAR",
"domain": "www.glassdoor.com",
"language": "en",
"companyId": 9079
}
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 Company Overview from Glassdoor
This action fetches detailed company information in real-time, including an overview and additional details using the company's unique identifier.
### Input Requirements
The required parameters are:
- `companyIdentifier` (string): A unique identifier for the company.
### Expected Output
The output includes:
- Company overview
- CEO and revenue information
- Company size and type
### Use Cases for this Specific Action
- **Investor Research**: Investors can assess company performance and culture before making investment decisions.
- **Job Seekers**: Provides potential employees with a comprehensive view of the company they are considering.
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 = "e905fe71-83e7-41f4-a73e-1b03e8aab178" # Action ID for: Retrieve Company Overview from Glassdoor
# Construct the exact input payload based on the action's requirements
# This example uses the predefined example_input for this action:
payload = {
"websiteDomain": "www.glassdoor.com",
"companyIdentifier": "1138"
}
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 Real Time Company And Job Insights API provides developers with powerful tools to access real-time salary data, company reviews, and job listings. By integrating these Cognitive Actions, you can enhance user experience, provide valuable insights, and simplify the job search process. Start leveraging these capabilities today to stay competitive in the dynamic job market!