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

# Overview

> Here is a list of different `parameters` you can use with ScrapeAutomate. This overview will help you get started with ScrapeAutomate while ensuring secure usage of your credentials.

### Query Parameters

| Parameter                                                            | Type       | Description                                                                                                                                                                                                      | Required | Default                                                     |
| -------------------------------------------------------------------- | ---------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | ----------------------------------------------------------- |
| [api\_key](#api-key)                                                 | `string`   | Your unique API key to authenticate every request.                                                                                                                                                               | `true`   | [Get your API key](https://app.scrapeautomate.com/register) |
| [url](#url)                                                          | `string`   | The URL of the web page you want to scrape.                                                                                                                                                                      | `true`   |                                                             |
| [render](#render)                                                    | `boolean`  | Whether to render JavaScript while scraping.                                                                                                                                                                     | `false`  | `false`                                                     |
| [window\_width](/features/rendering#setting-window-width)            | `number`   | The width of the browser window.                                                                                                                                                                                 | `false`  | `1920`                                                      |
| [window\_height](/features/rendering#setting-window-height)          | `number`   | The height of the browser window.                                                                                                                                                                                | `false`  | `1080`                                                      |
| [markdown](/features/output#markdown)                                | `boolean`  | Returns the scraped data in markdown.                                                                                                                                                                            | `false`  | `false`                                                     |
| [screenshot](/features/output#screenshot)                            | `boolean`  | Returns screenshot of the web page.                                                                                                                                                                              | `false`  | `false`                                                     |
| [webhook\_url](/features/output#webhook)                             | `string`   | Used for setting a webhook where the response will be sent to.                                                                                                                                                   | `false`  |                                                             |
| [instructions](/features/rendering#instructions)                     | `object[]` | This Allows you to interact with the web page.                                                                                                                                                                   | `false`  |                                                             |
| [proxy\_type](/features/proxy#proxy-type)                            | `string`   | The type of proxy to use while scraping for better anonymity, performance and speed                                                                                                                              | `false`  |                                                             |
| [proxy\_country](/features/proxy#proxy-country)                      | `string`   | The location of the proxy server.                                                                                                                                                                                | `false`  |                                                             |
| [workflow\_id](/features/workflow)                                   | `string`   | Reuse configurations from a saved workflow.                                                                                                                                                                      | `false`  |                                                             |
| [block\_resources](/features/blocking#blocking-resources)            | `boolean`  | Blocks specific web resources (stylesheets, images, media, etc.) during automation using block\_resources. Separate multiple resources with "," . Useful for faster scraping and preventing unnecessary loading. | `false`  | `false`                                                     |
| [block\_ads](/features/blocking#blocking-ads)                        | `boolean`  | Whether to block ads while scraping.                                                                                                                                                                             | `false`  | `false`                                                     |
| [block\_chat\_widgets](/features/blocking#blocking-chat-widgets)     | `boolean`  | Automatically block chat widgets from appearing in the ui.scraping.                                                                                                                                              | `false`  | `false`                                                     |
| [block\_cookie\_banners](/features/blocking#blocking-cookie-banners) | `boolean`  | Automatically block cookie banners from appearing in the ui.scraping.                                                                                                                                            | `false`  | `false`                                                     |

## Getting Started

ScrapeAutomate is one of the easiest scraping tools available on the web.

To get started with scraping, you only need **two** things:

* Your unique `api_key`
* The `Encoded URL` of the web page you want to scrape.

<Note>
  You can get your **API key** after creating an account on{" "}
  [ScrapeAutomate](https://app.scrapeautomate.com/register).
</Note>

### API Key

Your unique API key is essential to authenticate every API request. After creating and verifying your account on [ScrapeAutomate](https://scrapeautomate.com), your API key will be visible on the builder page as highlighted in the image below.

<img src="https://mintcdn.com/dataautomators/14ZMQUi1AvHUWpZN/images/api-key.png?fit=max&auto=format&n=14ZMQUi1AvHUWpZN&q=85&s=f5762e0e8829681b04477688e6832ff9" alt="API Key Example" width="10128" height="5753" data-path="images/api-key.png" />

#### Code Example

<CodeGroup>
  ```shell cURL theme={null}
  curl --request GET \
      --url 'https://app.scrapeautomate.com/api/scraper?api_key=<exampleToken>'
  ```

  ```javascript Node.js theme={null}
  import axios from "axios";

  const response = await axios.get(
    "https://app.scrapeautomate.com/api/scraper?api_key=<exampleToken>"
  );
  ```

  ```java Java theme={null}
  import java.io.IOException;
  import java.net.URI;
  import java.net.http.HttpClient;
  import java.net.http.HttpRequest;
  import java.net.http.HttpResponse;

  HttpClient client = HttpClient.newHttpClient();

  HttpRequest request = HttpRequest.newBuilder()
      .uri(URI.create("https://app.scrapeautomate.com/api/scraper?api_key=<exampleToken>"))
      .GET()
      .build();

  HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
  ```

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

  response = requests.get('https://app.scrapeautomate.com/api/scraper?api_key=<exampleToken>')
  ```

  ```php PHP theme={null}
  <?php
  $ch = curl_init();
  curl_setopt($ch, CURLOPT_URL, 'https://app.scrapeautomate.com/api/scraper?api_key=<exampleToken>');
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');

  $response = curl_exec($ch);

  curl_close($ch);
  ```

  ```go Go theme={null}
  package main

  import (
  	"fmt"
  	"io"
  	"log"
  	"net/http"
  )

  func main() {
  	client := &http.Client{}
  	req, err := http.NewRequest("GET", "https://app.scrapeautomate.com/api/scraper?api_key=<exampleToken>", nil)
  	if err != nil {
  		log.Fatal(err)
  	}
  	resp, err := client.Do(req)
  	if err != nil {
  		log.Fatal(err)
  	}
  	defer resp.Body.Close()
  	bodyText, err := io.ReadAll(resp.Body)
  	if err != nil {
  		log.Fatal(err)
  	}
  	fmt.Printf("%s\n", bodyText)
  }
  ```

  ```http HTTP theme={null}
  GET /api/scraper?api_key=<exampleToken> HTTP/1.1
  Host: app.scrapeautomate.com
  User-Agent: curl/8.2.1
  Accept: */*
  ```
</CodeGroup>

<Warning>
  Do not share your **API key** with anyone. Sharing your API key can lead to
  **unauthorized access, unexpected charges, and potential security
  vulnerabilities**.
</Warning>

### URL

You must provide an `encoded-URL` to use ScrapeAutomate API. Encoding ensures that the URL is processed correctly by the API and that special characters (like spaces, question marks, and ampersands) do not cause issues.

You can use websites like [urlencoder](https://www.urlencoder.org/) to easily encode your URLs.

<img src="https://mintcdn.com/dataautomators/14ZMQUi1AvHUWpZN/images/url-encoder.png?fit=max&auto=format&n=14ZMQUi1AvHUWpZN&q=85&s=f79c9d8f0553b29984b464f4fe4ed742" alt="URL Example" width="976" height="479" data-path="images/url-encoder.png" />

After encoding the URL, pass it in the query parameter named `url` as shown below:

<CodeGroup>
  ```shell cURL theme={null}
  curl --request GET \
      --url 'https://app.scrapeautomate.com/api/scraper?api_key=<exampleToken>&url=https%3A%2F%2Fexample.com'
  ```

  ```javascript Node.js theme={null}
  import axios from "axios";

  const response = await axios.get(
    "https://app.scrapeautomate.com/api/scraper?api_key=<exampleToken>&url=https%3A%2F%2Fexample.com"
  );
  ```

  ```java Java theme={null}
  import java.io.IOException;
  import java.net.URI;
  import java.net.http.HttpClient;
  import java.net.http.HttpRequest;
  import java.net.http.HttpResponse;

  HttpClient client = HttpClient.newHttpClient();

  HttpRequest request = HttpRequest.newBuilder()
      .uri(URI.create("https://app.scrapeautomate.com/api/scraper?api_key=<exampleToken>&url=https%3A%2F%2Fexample.com"))
      .GET()
      .build();

  HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
  ```

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

  response = requests.get('https://app.scrapeautomate.com/api/scraper?api_key=<exampleToken>&url=https%3A%2F%2Fexample.com')
  ```

  ```php PHP theme={null}
  <?php
  $ch = curl_init();
  curl_setopt($ch, CURLOPT_URL, 'https://app.scrapeautomate.com/api/scraper?api_key=<exampleToken>&url=https%3A%2F%2Fexample.com');
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');

  $response = curl_exec($ch);

  curl_close($ch);
  ```

  ```go Go theme={null}
  package main

  import (
  	"fmt"
  	"io"
  	"log"
  	"net/http"
  )

  func main() {
  	client := &http.Client{}
  	req, err := http.NewRequest("GET", "https://app.scrapeautomate.com/api/scraper?api_key=<exampleToken>&url=https%3A%2F%2Fexample.com", nil)
  	if err != nil {
  		log.Fatal(err)
  	}
  	resp, err := client.Do(req)
  	if err != nil {
  		log.Fatal(err)
  	}
  	defer resp.Body.Close()
  	bodyText, err := io.ReadAll(resp.Body)
  	if err != nil {
  		log.Fatal(err)
  	}
  	fmt.Printf("%s\n", bodyText)
  }
  ```

  ```http HTTP theme={null}
  GET /api/scraper?api_key=<exampleToken>&url=https%3A%2F%2Fexample.com HTTP/1.1
  Host: app.scrapeautomate.com
  User-Agent: curl/8.2.1
  Accept: */*
  ```
</CodeGroup>

<Note>
  The `url` parameter and `api_key` are both required. If any of these
  parameters are missing, your request won't be processed.
</Note>

### Render

The **render** parameter is a boolean value that determines whether ScrapeAutomate should render javascript while scraping. Setting render to `true` enables features like taking screenshots, blocking specific resources, form-filling, and clicking elements.

<CodeGroup>
  ```shell cURL theme={null}
  curl --request GET \
      --url 'https://app.scrapeautomate.com/api/scraper?api_key=<exampleToken>&render=true&url=https%3A%2F%2Fexample.com'
  ```

  ```javascript Node.js theme={null}
  import axios from "axios";

  const response = await axios.get(
    "https://app.scrapeautomate.com/api/scraper?api_key=<exampleToken>&render=true&url=https%3A%2F%2Fexample.com"
  );
  ```

  ```java Java theme={null}
  import java.io.IOException;
  import java.net.URI;
  import java.net.http.HttpClient;
  import java.net.http.HttpRequest;
  import java.net.http.HttpResponse;

  HttpClient client = HttpClient.newHttpClient();

  HttpRequest request = HttpRequest.newBuilder()
      .uri(URI.create("https://app.scrapeautomate.com/api/scraper?api_key=<exampleToken>&render=true&url=https%3A%2F%2Fexample.com"))
      .GET()
      .build();

  HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
  ```

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

  response = requests.get(
      'https://app.scrapeautomate.com/api/scraper?api_key=<exampleToken>&render=true&url=https%3A%2F%2Fexample.com',
  )
  ```

  ```php PHP theme={null}
  <?php
  $ch = curl_init();
  curl_setopt($ch, CURLOPT_URL, 'https://app.scrapeautomate.com/api/scraper?api_key=<exampleToken>&render=true&url=https%3A%2F%2Fexample.com');
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');

  $response = curl_exec($ch);

  curl_close($ch);
  ```

  ```go Go theme={null}
  package main

  import (
  	"fmt"
  	"io"
  	"log"
  	"net/http"
  )

  func main() {
  	client := &http.Client{}
  	req, err := http.NewRequest("GET", "https://app.scrapeautomate.com/api/scraper?api_key=<exampleToken>&render=true&url=https%3A%2F%2Fexample.com", nil)
  	if err != nil {
  		log.Fatal(err)
  	}
  	resp, err := client.Do(req)
  	if err != nil {
  		log.Fatal(err)
  	}
  	defer resp.Body.Close()
  	bodyText, err := io.ReadAll(resp.Body)
  	if err != nil {
  		log.Fatal(err)
  	}
  	fmt.Printf("%s\n", bodyText)
  }
  ```

  ```http HTTP theme={null}
  GET /api/scraper?api_key=<exampleToken>&render=true&url=https%3A%2F%2Fexample.com HTTP/1.1
  Host: app.scrapeautomate.com
  User-Agent: curl/8.2.1
  Accept: */*
  ```
</CodeGroup>

<Info>
  By default, the **render** parameter is set to `false`. Note that launching a
  browser consumes more ten times more credits.
</Info>
