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

# Map

> List the screens Lusor already knows in a phone app, as app:// addresses you can scrape.

Map lists an app's known screens as `app://` addresses that [Scrape](https://docs.lusor.ai/app-data/scrape.md) can follow. It answers at once: it reads what your workspace's earlier runs recorded, plus a base map Lusor ships. It never opens the app, holds no phone and runs no model.

Use it to find the addresses in an app, then scrape the ones you need.

## Map an app

```bash theme={null}
curl https://api.lusor.ai/v1/map \
  -H "X-Api-Key: $LUSOR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "app://settings",
    "search": "about",
    "limit": 50
  }'
```

### Response

```json theme={null}
{
  "success": true,
  "links": [
    { "url": "app://settings/general/about", "title": "About" }
  ],
  "coverage": { "recorded": 0, "base": 1 },
  "checkedAt": null
}
```

| Field | What it is |
| - | - |
| `links` | The known screens. Each has `url`, an address for scrape, and `title`, the screen's name as a person sees it. Without `search`, the app's first screen comes first. |
| `coverage.recorded` | How many links came from your workspace's own runs. |
| `coverage.base` | How many links came from Lusor's base map. |
| `checkedAt` | When a run in your workspace last read one of the app's mapped screens. `null` when nothing of the app is recorded. |
| `message` | Present when `links` is empty. It says why. |

A map is never claimed to be complete. It lists what runs have seen.

Map is not a task. There is no id to read later and nothing to poll: the response is the result.

## Where the links come from

* **Your runs.** Every scrape and agent run in your workspace records the screens it passes through and the rows it taps, so the map grows as you use the app. Each address is the shortest chain of tapped row names from the app's first screen, in lowercase with dashes, so scrape can follow it as written. Back buttons are never steps.
* **Lusor's base map.** Addresses scrape has completed on a real phone. Today that is English iPhone Settings: `general`, `general/about`, `battery`, `wi-fi` and `privacy-&-security`.

Screen names differ between iPhone and Android, so a recorded map is per platform. Map reads:

1. the platform of the phone named in `device`, when you send it;
2. otherwise the platform all of the workspace's phones share;
3. otherwise both platforms, when the workspace has phones of both kinds or none.

A Lusor app name such as `app://settings` is the app on either platform. A raw package or bundle id such as `app://com.android.settings` is that app on its own platform only, so with an iPhone named in `device` it returns an empty map.

## Options

| Field | Required | Meaning |
| - | - | - |
| `url` | Yes | The app, as `app://<app>`. A path, such as `app://settings/general`, keeps only the links under it. Up to 2,048 characters. |
| `search` | No | Keeps the links whose name or address contains these words, best match first: a name that is the search, then one that starts with it, then one that contains it, then an address that contains it. Up to 500 characters. |
| `limit` | No | The most links to return, `1` to `5000`. Defaults to `5000`. |
| `device` | No | The phone whose platform's map to read. |
| `workspaceId` | No | The workspace, for a credential that can reach several. An API key is bound to one workspace and can leave it out. |

Fields map does not know are ignored, so a Firecrawl map options object runs unchanged.

## An app with no map yet

An app no run has passed through returns an empty `links` and a `message`:

```json theme={null}
{
  "success": true,
  "links": [],
  "coverage": { "recorded": 0, "base": 0 },
  "checkedAt": null,
  "message": "No screens of \"amazon\" are known yet. Every scrape and agent run in the app adds the screens it passes through."
}
```

To add an app's screens to its map, run [Scrape](https://docs.lusor.ai/app-data/scrape.md) or [Agent](https://docs.lusor.ai/app-data/agent.md) in that app.

## Billing and safe retries

Each answered call is charged, an empty list included. A call that is refused or fails, with any `4xx` or `5xx`, is not charged. See [Credits and minutes](https://docs.lusor.ai/billing/credits-and-minutes.md).

Send an `Idempotency-Key` header to retry without a second charge:

* A repeat with the same key and the same request within 24 hours returns the first response, with the header `Idempotent-Replayed: true`, and is not charged again.
* A refused or failed call does not use up its key, so a retry with it runs.
* The same key with a different request returns `422 idempotency_key_reused`.

## Errors

| Status | `error` | Meaning |
| - | - | - |
| `400` | `bad_request` | `url` is missing, is not `app://<app>`, or holds a control character, or `limit` is out of range. |
| `400` | `invalid_idempotency_key` | The `Idempotency-Key` is not 1 to 255 visible ASCII characters. |
| `400` | `unknown_device` | `device` is not one of the workspace's phones. `devices` lists their ids. |
| `401` | `unauthenticated`, `invalid_api_key` | The API key is missing, wrong or revoked. |
| `402` | `credits_exhausted` | The workspace is out of credits. Nothing was read or charged. |
| `409` | `idempotency_key_in_use` | A request with this key is still running. |
| `409` | `idempotency_outcome_unknown` | A request with this key never finished, so it is not run again. Use a new key. |
| `422` | `idempotency_key_reused` | The key was already used for a different request. |
| `503` | `map_timeout` | Reading the app's map took too long. Try again, or narrow it with a path or `search`. Not charged. |
| `503` | `idempotency_unavailable` | The key could not be recorded, so nothing ran. Not charged. |

## Known limits

* **iPhone maps are thin.** Most taps on an iPhone are recorded by position, with no row name, and a tap with no name cannot be an address step. An iPhone's recorded map has fewer links than an Android phone's for the same use.
* **The base map is English iPhone Settings only.**
* **An address works on the platform and in the language it was recorded in.** One address per screen across platforms and languages is not built yet.

## Related

> [card] [Scrape](https://docs.lusor.ai/app-data/scrape.md)
>
> Read one of the screens map returned.

> [card] [Agent](https://docs.lusor.ai/app-data/agent.md)
>
> Do a task in an app when you do not know which screen holds the data.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.