Is there a way to search through job postings with new Upwork GraphQL API?

Is there a way to search through job postings with new Upwork GraphQL API?


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?

Share
Improve this question

1

  • 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 at 15:13

1 Answer
1

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.

Share
Improve this answer

New contributor

Aaron Eden is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

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

    – Mehoff

    31 mins ago




Not the answer you're looking for? Browse other questions tagged

or ask your own question.

Leave a Reply

Your email address will not be published. Required fields are marked *