1
Since Upwork is deprecating REST API support on December 15, I’ve started refactoring my application to support new GraphQL API. My main REST API requests are:
Search Jobs: GET /api/profiles/v2/search/jobs.{format}
Get Job Profile: GET /api/profiles/v1/jobs/{job_key}.{format}
The problem is, GraphQL API Docs does not seem to have similar requests in "Search" directory. Only thing I can search through, on a date of writing this question, are "freelancerProfileRecords". I can indeed get information about a specific job post using it’s ID – it’s written in API docs, but this does not cover my needs, and makes migration from REST API frustrating.
I need to have a filter mechanism using params such as: "title", "skills", "q" and so on, like it is written in REST docs here.
Is there a workaround, or did I just miss something?
1
1 Answer
Reset to default
0
I’m running into the same issue. I found this online, but am still waiting on authorization for my API Key to be able to test if it works…
Construct the GraphQL query: Once authenticated, you can create a GraphQL query to search for jobs. Since the GraphQL API does not provide a direct way to filter jobs, you will need to fetch a list of jobs and then filter them based on your criteria in your application. Here’s an example of a GraphQL query to fetch a list of jobs:
query {
jobPostings(first: 10) {
edges {
node {
id
title
skills
budget {
amount
currency
}
location {
country
city
}
duration
}
}
}
}
This query supposedly fetches the first 10 job postings along with their ID, title, skills, budget, location, and duration.
1
-
Unfortunately, this query gets "ValidationError" because API does not have "jobPostings" field. Can you please confirm, that when using "JobPosting(jobPostingId: xxxxx){ … }" query – you are getting "UnauthorizedError" instead of "Do not have enough permissions to access…"? I am confused by this error message, and can't confirm that my key was granted with GraphQL API jobsPostings scope access because of it
– Mehoff31 mins ago
Not the answer you're looking for? Browse other questions tagged
or ask your own question.
or ask your own question.
It seems you are correct indeed, you are not missing anything. In the Documentation, under Search, the only item available is freelancerProfileRecords. Maybe further down the REST API sunsetting timeline they will add more functionality.
Jul 31 at 15:13
|