> ## 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.

# Drag by Description

> Drag between elements using natural language descriptions

Drag from one element to another, both described in natural language. Uses vision AI to find both elements and drag between them.

## Request

```bash theme={null}
curl -X POST https://api.tapkit.ai/v1/phones/{phone_id}/drag/select \
  -H "X-API-Key: joot_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{"from_selector": "the slider handle", "to_selector": "the right end of the slider"}'
```

### 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}
{
  "from_selector": "the slider handle",
  "to_selector": "the right end of the slider"
}
```

| Field           | Type     | Description                                             |
| --------------- | -------- | ------------------------------------------------------- |
| `from_selector` | `string` | Natural language description of where to start dragging |
| `to_selector`   | `string` | Natural language description of where to drag to        |

## 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

### Adjust a Slider

```bash theme={null}
curl -X POST https://api.tapkit.ai/v1/phones/abc123/drag/select \
  -H "X-API-Key: joot_..." \
  -H "Content-Type: application/json" \
  -d '{"from_selector": "the volume slider thumb", "to_selector": "the maximum volume position"}'
```

### SDK Usage

The Python SDK provides this through the `drag()` method with string arguments:

```python theme={null}
phone.drag("the slider handle", "the right end of the slider")
phone.drag("the file icon", "the trash folder")
phone.drag("the brightness control", "the middle of the slider")
```

<Note>
  When using the SDK, both arguments must be the same type - either both selectors (strings) or both coordinates. You cannot mix them.
</Note>

## Related Endpoints

* [Drag](/api-reference/phones/drag) - Drag between specific coordinates
* [Hold and Drag](/api-reference/phones/hold-and-drag) - Hold before dragging
