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

# Tap by Description

> Tap an element using natural language description

Tap an element on screen by describing it in natural language. Uses vision AI to find and tap the described element.

## Request

```bash theme={null}
curl -X POST https://api.tapkit.ai/v1/phones/{phone_id}/tap/select \
  -H "X-API-Key: joot_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{"selector": "the blue Submit button"}'
```

### Path Parameters

| Parameter  | Type     | Description          |
| ---------- | -------- | -------------------- |
| `phone_id` | `string` | The phone identifier |

### Query Parameters

| Parameter | Type      | Default | Description                    |
| --------- | --------- | ------- | ------------------------------ |
| `async`   | `boolean` | `false` | Return immediately with job ID |

### Request Body

```json theme={null}
{
  "selector": "the blue Submit button"
}
```

| Field      | Type     | Description                                        |
| ---------- | -------- | -------------------------------------------------- |
| `selector` | `string` | Natural language description of the element to tap |

## Response

### Synchronous

```json theme={null}
{
  "id": "job_abc123",
  "status": "completed",
  "result": {},
  "created_at": "2024-01-15T10:30:00Z",
  "completed_at": "2024-01-15T10:30:02Z"
}
```

### Asynchronous

```json theme={null}
{
  "job_id": "job_abc123"
}
```

## Examples

### Tap a Button

```bash theme={null}
curl -X POST https://api.tapkit.ai/v1/phones/abc123/tap/select \
  -H "X-API-Key: joot_..." \
  -H "Content-Type: application/json" \
  -d '{"selector": "the Settings icon"}'
```

### Tap a Text Element

```bash theme={null}
curl -X POST https://api.tapkit.ai/v1/phones/abc123/tap/select \
  -H "X-API-Key: joot_..." \
  -H "Content-Type: application/json" \
  -d '{"selector": "the Sign In link"}'
```

### Python Example

```python theme={null}
import requests

response = requests.post(
    f"https://api.tapkit.ai/v1/phones/{phone_id}/tap/select",
    headers={
        "X-API-Key": "joot_...",
        "Content-Type": "application/json"
    },
    json={"selector": "the blue Submit button"}
)

job = response.json()
print(f"Tap completed: {job['status']}")
```

### SDK Usage

The Python SDK provides this through the `tap()` method with a string argument:

```python theme={null}
phone.tap("the blue Submit button")
phone.tap("the Settings icon")
phone.tap("Sign In link at the bottom")
```

## Tips

* Be specific in your descriptions ("the blue Submit button" vs just "button")
* Include visual characteristics like color, position, or text content
* Works best with clearly visible, distinct UI elements

## Related Endpoints

* [Tap](/api-reference/phones/tap) - Tap at specific coordinates
* [Double Tap](/api-reference/phones/double-tap) - Double tap gesture
