# Cursor

### Prerequisites&#x20;

* ScraperAPI account
* Cursor AI account
* Cusor AI desktop app

### Setup

If you don't have an account with us yet, head over to [scraperapi.com](https://www.scraperapi.com/) to create one and grab your API key from the [Dashboard](https://dashboard.scraperapi.com/home) area. You will need it to authenticate the requests that your LLM client will be making.

**Configure Cursor Editor:**

1. Open Cursor.
2. Access the Settings menu.
3. Open Cursor Settings.
4. Go to Tools & MCP section
5. Click + 'New MCP Server'.
6. Choose Manual and paste the contents of [this](https://github.com/scraperapi/scraperapi-mcp/blob/main/README.md#installation) JSON configuration file.

### Parameters

| **`scrape`** (required)        | Tells the LLM to scrape a URL from the internet using ScraperAPI.                                                                                                                                                                        |
| ------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **`url`** (requierd)           | URL you wish to scrape.                                                                                                                                                                                                                  |
| **`render`** (optional)        | Defaults to **`False`**. Set to **`True`** if the page requires JavaScript rendering to display its contents.                                                                                                                            |
| **`country_code`** (optional)  | Activate country geotargeting (e.g. “us”, “es”, “uk”, etc.).                                                                                                                                                                             |
| **`premium`** (optional)       | Set to **`True`** to use residential IPs with your scrapes.                                                                                                                                                                              |
| **`ultra_premium`** (optional) | Activates advanced bypass mechanisms when set to **`True`**. Can **not** be combined with **`premium`**.                                                                                                                                 |
| **`device_type`** (optional)   | Defaults to **`desktop`**.  Set to **`mobile`** to use mobile user agents with the scrapes.                                                                                                                                              |
| **`output_format`** (optional) | <p>Instructs the API on what the response file type should be. Defaul is HTML. Valid options:<br>- markdown<br>- text<br>- json (for a <a href="https://docs.scraperapi.com/structured-data-endpoints/overview">list</a> of domains)</p> |
| **`autoparse`** (optional)     | Boolean. Activate auto parsing for a [list](https://docs.scraperapi.com/structured-data-endpoints/overview) of supported domains. Defaults to `False`. Set to `True` only if you want the output format in csv or json.                  |

### Prompt Example

<mark style="background-color:blue;">Get product data information from Amazon</mark>

*- "Scrape Amazon for iPhone 16 and return the first 10 results."*

#### Response

Cursor successfully executed an Amazon search through ScraperAPI by simply recognizing the word 'scrape' in the prompt, which acts as the trigger for invoking the ScraperAPI MCP tool. Cursor called ScraperAPI, which handled the request and scraped the data without getting blocked or requiring any additional input or prompt adjustments. All the underlying complexity, such as proxy rotation and anti-bot handling was managed by ScraperAPI, allowing the data to be reliably retrieved and transformed into useful information.

<figure><img src="https://921583510-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXJv4kz1e8RdAq9HrFwyo%2Fuploads%2FO9bdLHwULBfuw1s1vqmv%2Fimage.png?alt=media&#x26;token=7190ebf0-2106-4c63-9c1a-56b6aa81d000" alt=""><figcaption></figcaption></figure>

<details>

<summary>AmazonSearchResults.md</summary>

```markdown
Search used: amazon.com/s?k=iphone+16

#	Product	                                                                                    Price*	    Rating*
1	Apple iPhone 16, US Version, 128GB, Ultramarine – Unlocked (Renewed)	                      $559.00	    4.4/5
2	Apple iPhone 16, US Version, 128GB, Pink – Unlocked (Renewed)	                              $564.99	    4.4/5
3	Apple iPhone 16, US Version, 128GB, Black – Unlocked (Renewed)	                            $557.49	    4.4/5
4	Apple iPhone 16 Pro, US Version, 128GB, Black Titanium – Unlocked (Renewed)	                $656.97	    4.3/5
5	Apple iPhone 16 Pro, US Version, 256GB, Black Titanium – Unlocked (Renewed)	                $698.80	    4.3/5
6	Apple iPhone 16e, 128GB, eSIM, Black – Unlocked (Renewed)	                                  $404.95	    4.4/5
7	Apple iPhone (Renewed Premium) 16 Pro Max, US Version, 256GB, Black Titanium – Unlocked	    $839.97	    4.3/5
8	Apple iPhone 16 Pro Max, US Version, 256GB, Black Titanium – Unlocked (Renewed)	            $816.38	    4.3/5
9	Apple iPhone 15 Pro, 256GB, Natural Titanium – Unlocked (Renewed)	                          $530.70	    4.2/5
10	Apple iPhone 16 Plus, US Version, 512GB, Pink – Unlocked (Renewed)	                      $827.89	    4.4/5


*Price/rating shown as displayed at scrape time; they can change.
```

</details>
