# Get Lifelogs — Limitless.ai

> Returns a list of lifelog entries based on specified time range or date. See the documentation

- Key: `limitless_ai-get-lifelogs`
- Type: Action (Read-only)
- Version: 0.0.2
- App: Limitless.ai (`limitless_ai`) — https://pipedream.com/apps/limitless-ai.md
- This page (HTML): https://pipedream.com/apps/limitless-ai/actions/get-lifelogs
- Hints: read-only · open-world
- Source: https://github.com/PipedreamHQ/pipedream/blob/master/components/limitless_ai/actions/get-lifelogs/get-lifelogs.mjs

## Description

Returns a list of lifelog entries based on specified time range or date. [See the documentation](https://www.limitless.ai/developers#get-lifelogs)

## Props

| Prop | Type | Required | Description |
|---|---|---|---|
| `timezone` | `string` | No | Time zone identifier, e.g., UTC or America/New_York |
| `date` | `string` | Yes | Specific date in ISO format: YYYY-MM-DD. If start or end are provided, date will be ignored |
| `start` | `string` | No | Start date or timestamp for the query range. ISO-8601 format: YYYY-MM-DD or YYYY-MM-DD HH:mm:SS |
| `end` | `string` | No | End date or timestamp for the query range. ISO-8601 format: YYYY-MM-DD or YYYY-MM-DD HH:mm:SS |
| `cursor` | `string` | No | Pagination cursor to fetch the next set of results |
| `direction` | `string` | No | Order of results |
| `includeMarkdown` | `boolean` | No | Whether to include Markdown-formatted content |
| `includeHeadings` | `boolean` | No | Whether to include document headings in the result |
| `isStarred` | `boolean` | No | Filter results by starred status |
| `limit` | `string` | No | Maximum number of results to return |

## Run it

**MCP**

```ts
import { Client } from "@modelcontextprotocol/sdk/client/index.js"
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js"
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const accessToken = await pd.rawAccessToken

const transport = new StreamableHTTPClientTransport(
  new URL("https://remote.mcp.pipedream.net/v3"),
  {
    requestInit: {
      headers: {
        Authorization: `Bearer ${accessToken}`,
        "x-pd-project-id": process.env.PIPEDREAM_PROJECT_ID!,
        "x-pd-environment": "production",
        "x-pd-external-user-id": "{external_user_id}", // any stable ID for this user in your system
        "x-pd-app-slug": "limitless_ai",
      },
    },
  },
)

const mcp = new Client({ name: "my-agent", version: "1.0.0" })
await mcp.connect(transport)

const { tools } = await mcp.listTools()

// listTools() hands your model this tool's input schema, so it can
// fill the arguments itself:
const result = await mcp.callTool({
  name: "limitless_ai-get-lifelogs",
  arguments: {
    timezone: "Timezone",
    date: "Date",
  },
})
```

**TypeScript**

```ts
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const result = await pd.actions.run({
  id: "limitless_ai-get-lifelogs",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    limitless_ai: { authProvisionId: "apn_xxxxxxx" },
    timezone: "Timezone",
    date: "Date",
  },
})

console.log(result)
```

**cURL**

```bash
curl -X POST https://api.pipedream.com/v1/connect/{project_id}/actions/run \
  -H "Content-Type: application/json" \
  -H "X-PD-Environment: production" \
  -H "Authorization: Bearer {access_token}" \
  -d '{
    "external_user_id": "{external_user_id}",
    "id": "limitless_ai-get-lifelogs",
    "configured_props": {
      "limitless_ai": { "authProvisionId": "apn_xxxxxxx" },
      "timezone": "Timezone",
      "date": "Date"
    }
  }'
```

---

- App: https://pipedream.com/apps/limitless-ai.md · All apps: https://pipedream.com/apps
