# Automated Form Filling

*The following example is a request we've prebuilt to show you Gaffa's capabilities on our* [*demo site.*](https://demo.gaffa.dev) ***You can run this request right now in the*** [***Gaffa API Playground***](https://gaffa.dev/dashboard/playground?templateId=form_fill)***.***

## API Request

```json
{
  "url": "https://demo.gaffa.dev/simulate/form?loadTime=3&showModal=false&modalDelay=0&formType=address&firstName=John&lastName=Doe&address1=123%20Main%20Street&city=London&country=UK",
  "proxy_location": null,
  "async": false,
  "max_cache_age": 0,
  "settings": {
    "record_request": true,
    "actions": [
      {
        "type": "type",
        "selector": "#email",
        "text": "johndoe@example.com"
      },
      {
        "type": "type",
        "selector": "#state",
        "text": "CA"
      },
      {
        "type": "type",
        "selector": "#zipCode",
        "text": "12345"
      },
      {
        "type": "click",
        "selector": "button[type='submit']"
      },
      {
        "type": "wait",
        "selector": "[role=\"dialog\"] h2:has-text(\"Success!\")",
        "timeout": 10000
      }
    ]
  }
}
```

## Actions

{% content-ref url="/pages/TjjKKIilt0eFTzDDyZdD" %}
[Type](/docs/features/browser-requests/actions/type.md)
{% endcontent-ref %}

{% content-ref url="/pages/1Cx0fCd84ZhpvRD9FVxt" %}
[Click](/docs/features/browser-requests/actions/click.md)
{% endcontent-ref %}

{% content-ref url="/pages/Py3syTPEzIuvQYXyaDso" %}
[Wait](/docs/features/browser-requests/actions/wait.md)
{% endcontent-ref %}

## Response

Here's a video showing Gaffa filling out the page and waiting for the success modal.

{% embed url="<https://youtu.be/TGPnuc-71Bs>" %}
Gaffa can help automatically fill out your forms!
{% endembed %}

## Read More

Read more about screen recording here (TODO).


---

# 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://gaffa.dev/docs/features/browser-requests/api-playground-examples/automated-form-filling.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.
