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?

Uwe Keim
  • 39,551
  • 56
  • 175
  • 291
Mehoff
  • 44
  • 3
  • 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. – Julio César Estravis Jul 31 '23 at 15:13

1 Answers1

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.

  • 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 – Mehoff Aug 16 '23 at 20:27
  • As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Aug 18 '23 at 09:07