> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.doc-detective.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.doc-detective.com/_mcp/server.

# Swipe (point-to-point)

> Reference for the `Swipe (point-to-point)` schema.

## Referenced In

* [swipe](/reference/schemas/swipe)

## Fields

| Field    | Type                                                                                                                                     | Description                                                                                                                                                                                                                                                                                                                                                      | Default |
| :------- | :--------------------------------------------------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------ |
| from     | object([Point](/reference/schemas/point))                                                                                                | Required. A pixel coordinate on the surface, measured from its top-left corner (0, 0).                                                                                                                                                                                                                                                                           | —       |
| to       | object([Point](/reference/schemas/point))                                                                                                | Required. A pixel coordinate on the surface, measured from its top-left corner (0, 0).                                                                                                                                                                                                                                                                           | —       |
| duration | integer                                                                                                                                  | Optional. Duration of the swipe movement in milliseconds. Minimum: 1                                                                                                                                                                                                                                                                                             | `500`   |
| surface  | one of: - string - object([Browser surface](/reference/schemas/browser-surface)) - object([App surface](/reference/schemas/app-surface)) | Optional. The browser window/tab or app window this step acts on. Omit to act on the active surface — the most recently opened, focused, or explicitly targeted surface, whatever its kind (a background process can't be swiped). Specifying a surface switches the active surface for the steps that follow. App surfaces use the object form (\{ "app": … }). | —       |

## Examples

```json
{
  "from": {
    "x": 42,
    "y": 42
  },
  "to": {
    "x": 42,
    "y": 42
  },
  "duration": 500,
  "surface": "chrome"
}
```