> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stophy.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Upwork search

> Read an Upwork job search page as JSON with the upwork-search parser. $1 per 1,000 calls. Send the page to scrape. Examples in cURL, TypeScript and Python.

Reads an Upwork job search page, like upwork.com/nx/search/jobs/?q=react, and returns a list of jobs as JSON.

## Make a request

Send the page's URL to [scrape](https://docs.stophy.dev/api-reference/endpoint/scrape.md) with a `json` format that names the parser. Get an API key in the [Quickstart](https://docs.stophy.dev/quickstart).

```bash cURL theme={null}
curl -X POST https://api.stophy.dev/v1/scrape \
  -H "Authorization: Bearer $STOPHY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://www.upwork.com/nx/search/jobs/?q=react&sort=recency","formats":[{"type":"json","parser":"upwork-search"}]}'
```

```typescript TypeScript theme={null}
const response = await fetch("https://api.stophy.dev/v1/scrape", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.STOPHY_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    url: "https://www.upwork.com/nx/search/jobs/?q=react&sort=recency",
    formats: [{ type: "json", parser: "upwork-search" }],
  }),
});
console.log(await response.json());
```

```python Python theme={null}
import os

import requests

response = requests.post(
    "https://api.stophy.dev/v1/scrape",
    headers={"Authorization": f"Bearer {os.environ['STOPHY_API_KEY']}"},
    json={
        "url": "https://www.upwork.com/nx/search/jobs/?q=react&sort=recency",
        "formats": [{"type": "json", "parser": "upwork-search"}],
    },
)
print(response.json())
```

## Read the response

The parser's data is in `data.json`. Its fields include `results`, `cursor`, `page` and `total`. This sample is cut to the first items.

```json theme={null}
{
  "success": true,
  "data": {
    "json": null
  }
}
```

## Options

Send options in the `options` object of the `json` format.

| Option | What it does |
| - | - |
| `workload` | Upwork's hours needed: full time, part time, or as needed. Only hourly jobs say this, so the search stays hourly. |
| `duration` | Upwork's project length: under one month, one to three months, three to six months, or more than six months. Only hourly jobs say this, so the search stays hourly. |
| `minHourlyRate` | Lowest hourly rate in USD. A job matches when its posted range overlaps this minimum, so 25 to 50 matches a minimum of 50. The search stays hourly. |
| `maxHourlyRate` | Highest hourly rate in USD. Send it with minHourlyRate. The job's posted range overlaps both, and the search stays hourly. |
| `page` | Page number, starting at 1. |

It also takes `jobType` and `experienceLevel`.

## Price

\$1 per 1,000 calls. See [Pricing](https://docs.stophy.dev/account/pricing.md).

## Limits and errors

* The URL must be an Upwork job search page, like upwork.com/nx/search/jobs/?q=react. Any other URL fails with `invalidRequest`.
* The answer comes back in `data.json`. If the page cannot be read, the call fails with an error code from [Errors](https://docs.stophy.dev/api-reference/errors.md).

## Related

* [Pre-built parsers](https://docs.stophy.dev/scrape/prebuilt-parsers) lists every parser.
* [Scrape](https://docs.stophy.dev/scrape/overview) has the options every scrape takes.
* [Upwork job](https://docs.stophy.dev/scrape/prebuilt-parsers/jobs/upwork-job.md)
* [LinkedIn jobs](https://docs.stophy.dev/scrape/prebuilt-parsers/jobs/linkedin-jobs.md)
* [LinkedIn job](https://docs.stophy.dev/scrape/prebuilt-parsers/jobs/linkedin-job.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.