# Basic API Requests

Only basic understanding of how the web works is required to scrape the web using BrowserAPI. Our team made it so that anyone can extract HTML from almost any website, without having to write an entire application.

### The `url` parameter&#x20;

{% hint style="warning" %}
**The `url` parameter has to be encoded in order for your request to pass!**
{% endhint %}

Before diving into the more advanced features of BrowserAPI, it is important to understand how the API works. In order to scrape a web page using our services, simply append the URL of the page you want to scrape to the API’s base endpoint, along with your API key.&#x20;

The `url` parameter represents the webpage that you are targeting and is <mark style="color:yellow;">**required**</mark> to make a request on our API. Failing to pass this parameter will result in `400: Bad Request`.

This being said, it only takes two parameters to extract the full HTML code of the page you want to scrape using BrowserAPI: `api_key` and `url`.

### Supported HTTP Methods

Whilst GET requests are quite common in web scraping, more advanced users may want to send POST or PUT requests to scrape forms or even other APIs. Currently, **BrowserAPI** offers support for the following HTTP requests:

* [**GET** requests](https://docs.webscrapingapi.com/browser-api/basic-api-requests/get-request)
* [**POST** requests](https://docs.webscrapingapi.com/browser-api/post-put-and-patch-requests#basic-post-request)
* [**PUT** requests](https://docs.webscrapingapi.com/browser-api/post-put-and-patch-requests#basic-put-request)
* [**PATCH** requests](https://docs.webscrapingapi.com/browser-api/post-put-and-patch-requests#basic-patch-request)


---

# 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/browser-api/basic-api-requests.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.
