# API Parameters

Parameters are being used to customise each request to the API. Understanding how to use these parameters will allow you to reach the full potential of the WebScrapingAPI and better interact with the targeted URL.&#x20;

Below is a list of all the parameters available in our API:

### #1: Required Parameters

<table><thead><tr><th width="232">Parameter</th><th width="110" align="center">Type</th><th width="294">Description</th><th width="114" align="center">More</th></tr></thead><tbody><tr><td><code>api_key</code> <br> <mark style="color:red;background-color:red;">Required</mark> </td><td align="center"><code>string</code></td><td>Used for authentication</td><td align="center"><a href="../../../browser-api/getting-started/authentication#the-api-key">learn</a></td></tr><tr><td><code>url</code><br> <mark style="color:red;background-color:red;">Required</mark> </td><td align="center"><code>string</code></td><td><p>Specify the URL of the web page you would like to scrape.</p><p><br><strong>IMPORTANT:</strong> <strong>Please make sure you URL encode the value of this parameter!</strong></p></td><td align="center"><a href="../../../browser-api/basic-api-requests#the-url-parameter">learn</a></td></tr></tbody></table>

### #2: Optional Parameters

<table><thead><tr><th width="187">Parameter</th><th width="109" align="center">Type</th><th width="342">Description</th><th width="114" align="center">More</th></tr></thead><tbody><tr><td><code>render_js</code></td><td align="center"><code>boolean</code></td><td>Set to <code>0</code> (off, default) or <code>1</code> (on) depending on whether or not to render JavaScript on the target web page. JavaScript rendering is done by using a browser. </td><td align="center"><a href="../advanced-api-features/rendering-javascript">learn</a></td></tr><tr><td><code>country</code></td><td align="center"><code>string</code></td><td>Specify the 2-letter code of the country you would like to use as a proxy geolocation for your scraping API request.</td><td align="center"><a href="../advanced-api-features/geolocation">learn</a></td></tr><tr><td><code>city</code></td><td align="center"><code>string</code></td><td>Specify the city you would like the request to originate from. The <code>country</code> is required in this case.</td><td align="center"><a href="../advanced-api-features/geolocation">learn</a></td></tr><tr><td><code>asn</code></td><td align="center"><code>string</code></td><td>Set the ASN (Autonomous System Number) of the network you want your proxy to be from.</td><td align="center"><a href="../advanced-api-features/geolocation">learn</a></td></tr><tr><td><code>timeout</code></td><td align="center"><code>int</code></td><td><p>Specify the maximum timeout in milliseconds you would like to use for your scraping API request. In order to force a timeout, you can specify a number such as <code>1000</code>. </p><p></p><p>This will abort the request after 1000ms. The maximum value for this parameter is <code>120000</code>. The default value for this parameter is also <code>120000</code>.</p></td><td align="center"></td></tr><tr><td><code>extract_rules</code></td><td align="center"><code>object</code></td><td>Get the scraped website based on various extraction rules.</td><td align="center"><a href="../advanced-api-features/extraction-rules">learn</a></td></tr><tr><td><code>json_response</code></td><td align="center"><code>boolean</code></td><td>Have the API return a JSON object instead of the plain HTML scraped from the URL.</td><td align="center"><a href="../advanced-api-features/full-json-response">learn</a></td></tr><tr><td><code>json_dom</code></td><td align="center"><code>boolean</code></td><td>Get the scraped website in JSON format. It can be set to <code>0</code> (default) or <code>1</code>.</td><td align="center"><a href="../advanced-api-features/json-dom-response">learn</a></td></tr></tbody></table>

{% hint style="info" %}
For boolean parameters, you can provide values in multiple formats. If the parameter is set to `'0'` or `'false'`, it will be treated as `false`, meaning the feature will be disabled or set to off. If you send `'1'` or `'true'`, the parameter will be interpreted as `true`, enabling or turning on the feature. The system recognizes both numeric and string representations of boolean values for flexibility in different use cases.
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.webscrapingapi.com/webscrapingapi/getting-started/api-parameters.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
