Get categories from job
Tags: #remotive #categories #snippet
Author: Sanjeet Attili

Input

Imports

1
import pandas as pd
2
import requests
Copied!

Model

Get categories from Remotive

1
def get_remotejob_categories():
2
req_url = f"https://remotive.io/api/remote-jobs/categories"
3
res = requests.get(req_url)
4
try:
5
res.raise_for_status()
6
except requests.HTTPError as e:
7
return e
8
res_json = res.json()
9
10
# Get categories
11
jobs = res_json.get('jobs')
12
return pd.DataFrame(jobs)
13
14
df_categories = get_remotejob_categories()
Copied!

Output

Display result

1
df_categories
Copied!
Copy link
Edit on GitHub