# Who visited this week

URL: /systems/data-and-insights/who-visited-this-week · Id: `guide:who-visited-this-week` · Status: `live`

> Say "who visited this week" and get each Visit this week, where it came from and the page it left from.

See who came to your pages this week and where they came from. It only reads, so nothing waits for your yes.

Needs: [Put up a page](/start/guides/put-up-a-page)

**Before it runs**

- You leave the chat: Never.
- What it costs: Nothing.
- To undo it: Nothing to undo: it only reads.

## What you get
- 1 list of the week’s Visits, each with where it came from (Visit)

## Your agent does
**For agents**

- Guide: `guide:who-visited-this-week`, status `live`. Page: [/systems/data-and-insights/who-visited-this-week.md](/systems/data-and-insights/who-visited-this-week.md).
- Approval: none. Run it when the founder asks.
- Leaves the chat: never.
- Needs first: [Put up a page](/start/guides/put-up-a-page).
- Run: call the steps in order, each through the API, SDK, CLI or MCP tab below; a later step passes the `$id` an earlier one returns. Each value marked example is the sample business’s: pass the founder’s own.

| Step | Verb | Inputs (type, required, this guide’s value) | Returns |
| --- | --- | --- | --- |
| 1 | [`Visit.list`](/business/nouns/visit/list) (`verb:Visit.list`) | `limit` integer: example `20` | `visits` Visit[] |

Returns: the last call answers with `visits`:

```json
{
  "api": "https://api.sb/leaseline.app",
  "$type": "Visit",
  "visits": [
    {
      "$id": "https://api.sb/leaseline.app/visits/visit_7qNAATrzGj",
      "$type": "Visit"
    }
  ],
  "meta": {
    "limit": 20,
    "after": "visit_7qNAATrzGj"
  },
  "links": {
    "self": "https://api.sb/leaseline.app/visits?limit=20",
    "next": "https://api.sb/leaseline.app/visits?after=visit_7qNAATrzGj"
  }
}
```

Next: offer “Send me this every Monday”, or “Show only visitors from the launch post”.

Calls: `Visit.list`

Ask:

```text
Who visited this week?
Where did visitors come from this week?
How many people visited?
```

API:

```bash
# Visit.list
curl "https://api.sb/leaseline.app/visits?limit=20" \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY"
```

SDK:

```ts
import { $ } from 'startup-builder'

await $.Visit.list({ limit: 20 })
```

CLI:

```bash
npx startup-builder do Visit.list --json '{"limit":20}'
```

MCP:

```json
{
  "name": "do",
  "arguments": {
    "code": "return await $.Visit.list({ limit: 20 })"
  }
}
```

## Change it
- Send me this every Monday.
- Show only visitors from the launch post.
- Which visitors signed up?

## Under the hood
- Systems: [Product analytics](/systems/product-analytics)
- Nouns: [Visit](/business/nouns/visit), [Visitor](/business/nouns/visitor), [Acquisition](/business/nouns/acquisition)

Each [Visit](/business/nouns/visit) belongs to a [Visitor](/business/nouns/visitor) and carries its [Acquisition](/business/nouns/acquisition): the link, search or post that brought it.