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

# Notion: Retrieve A Data Source

> Retrieve a data source. Notion Retrieve A Data Source reference includes SDK V2 and CLI requests, input constraints, response fields, and Deepline cost.

Retrieve a data source.

<Info>
  Tool ID: `notion_retrieve_a_data_source`
</Info>

## Run this action

Use the TypeScript SDK for a single call. Put `ctx.tools.execute(...)` inside a Play when the call should be durable, scheduled, or run across a CSV.

```ts theme={null}
import { Deepline } from 'deepline';

const deepline = await Deepline.connect();
const result = await deepline.tools.execute(
  'notion_retrieve_a_data_source',
  {
    "data_source_id": "data_source_123"
  },
);

console.log(result.toolResponse.raw);
```

### CLI

```bash theme={null}
deepline tools execute notion_retrieve_a_data_source --input '{
  "data_source_id": "data_source_123"
}' --json
```

## Example response

The SDK exposes this shape at `result.toolResponse.raw`. Values below are representative.

```json theme={null}
{
  "data": {
    "object": "data_source",
    "id": "123e4567-e89b-42d3-a456-426614174000",
    "properties": {}
  }
}
```

Use `deepline tools get notion_retrieve_a_data_source --json` for the latest machine-readable contract.

## Input reference

Retrieve a data source

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `payload.data_source_id` | `string` | Yes | — | — |

<details>
  <summary>Show raw input schema</summary>

  ### Input JSON Schema

  ```json theme={null}
  {
    "type": "object",
    "description": "Retrieve a data source",
    "properties": {
      "data_source_id": {
        "type": "string"
      }
    },
    "required": [
      "data_source_id"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Output reference

Standard tool result payload.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `result.data` | `object` | Yes | — | Provider response payload. |
| `result.data.object` | `"data_source"` | Yes | — | The data source object type name. |
| `result.data.id` | `string` | Yes | — | — |
| `result.data.properties` | `record` | Yes | — | The properties schema of the data source. |
| `result.data.title` | `array` | Yes | — | The title of the data source. |
| `result.data.title[].plain_text` | `string` | Yes | — | The plain text content of the rich text object, without any styling. |
| `result.data.title[].href` | `string \| null` | Yes | — | A URL that the rich text object links to or mentions. |
| `result.data.title[].annotations` | `object` | Yes | — | — |
| `result.data.title[].annotations.bold` | `boolean` | Yes | — | — |
| `result.data.title[].annotations.italic` | `boolean` | Yes | — | — |
| `result.data.title[].annotations.strikethrough` | `boolean` | Yes | — | — |
| `result.data.title[].annotations.underline` | `boolean` | Yes | — | — |
| `result.data.title[].annotations.code` | `boolean` | Yes | — | — |
| `result.data.title[].annotations.color` | `"default" \| "gray" \| "brown" \| "orange" \| "yellow" \| "green" \| "blue" \| "purple" \| "pink" \| "red" \| "default_background" \| "gray_background" \| "brown_background" \| "orange_background" \| "yellow_background" \| "green_background" \| "blue_background" \| "purple_background" \| "pink_background" \| "red_background"` | Yes | — | — |
| `result.data.title[].type` | `"text"` | Yes | — | Always `text` |
| `result.data.title[].text` | `object` | Yes | — | If a rich text object's type value is `text`, then the corresponding text field contains an object including the text content and any inline link. |
| `result.data.title[].text.content` | `string` | Yes | — | The actual text content of the text. |
| `result.data.title[].text.link` | `object \| null` | Yes | — | An object with information about any inline link in this text, if included. |
| `result.data.title[].text.link.url` | `string` | Yes | — | The URL of the link. |
| `result.data.title[].mention` | `object` | Yes | — | Mention objects represent an inline mention of a database, date, link preview mention, page, template mention, or user. A mention is created in the Notion UI when a user types `@` followed by the name of the reference. |
| `result.data.title[].mention.type` | `"user"` | Yes | — | Always `user` |
| `result.data.title[].mention.user` | `object` | Yes | — | — |
| `result.data.title[].mention.user.id` | `string` | Yes | — | — |
| `result.data.title[].mention.user.object` | `"user"` | Yes | — | Always `user` |
| `result.data.title[].mention.date` | `object` | Yes | — | — |
| `result.data.title[].mention.date.start` | `string` | Yes | — | The start date of the date object. |
| `result.data.title[].mention.date.end` | `string \| null` | Yes | — | The end date of the date object, if any. |
| `result.data.title[].mention.date.time_zone` | `string \| null` | Yes | — | The time zone of the date object. |
| `result.data.title[].mention.link_preview` | `object` | Yes | — | — |
| `result.data.title[].mention.link_preview.url` | `string` | Yes | — | The URL of the link preview mention. |
| `result.data.title[].mention.link_mention` | `object` | Yes | — | — |
| `result.data.title[].mention.link_mention.href` | `string` | Yes | — | The href of the link mention. |
| `result.data.title[].mention.link_mention.title` | `string` | No | — | The title of the link. |
| `result.data.title[].mention.link_mention.description` | `string` | No | — | The description of the link. |
| `result.data.title[].mention.link_mention.link_author` | `string` | No | — | The author of the link. |
| `result.data.title[].mention.link_mention.link_provider` | `string` | No | — | The provider of the link. |
| `result.data.title[].mention.link_mention.thumbnail_url` | `string` | No | — | The thumbnail URL of the link. |
| `result.data.title[].mention.link_mention.icon_url` | `string` | No | — | The icon URL of the link. |
| `result.data.title[].mention.link_mention.iframe_url` | `string` | No | — | The iframe URL of the link. |
| `result.data.title[].mention.link_mention.height` | `integer` | No | — | The height of the link preview iframe. |
| `result.data.title[].mention.link_mention.padding` | `integer` | No | — | The padding of the link preview iframe. |
| `result.data.title[].mention.link_mention.padding_top` | `integer` | No | — | The top padding of the link preview iframe. |
| `result.data.title[].mention.page` | `object` | Yes | — | Details of the page mention. |
| `result.data.title[].mention.page.id` | `string` | Yes | — | — |
| `result.data.title[].mention.database` | `object` | Yes | — | Details of the database mention. |
| `result.data.title[].mention.database.id` | `string` | Yes | — | — |
| `result.data.title[].mention.template_mention` | `object` | Yes | — | — |
| `result.data.title[].mention.template_mention.type` | `"template_mention_date"` | Yes | — | Always `template_mention_date` |
| `result.data.title[].mention.template_mention.template_mention_date` | `"today" \| "now"` | Yes | — | The date of the template mention. |
| `result.data.title[].mention.template_mention.template_mention_user` | `"me"` | Yes | — | The user of the template mention. |

The table shows the first 50 fields. Use the live contract below for every field.

<Info>
  This output schema is too large to embed without slowing the page. Get the complete live contract with `deepline tools get notion_retrieve_a_data_source --json`.
</Info>

## Deepline cost

* Pricing model: `fixed` (per call).
* Estimated Deepline credits: `0` per pricing unit.
* Provider-native pricing may still exist outside Deepline credit billing.

## Related documentation

* [Notion provider guide](/docs/providers/notion/guide)
* [SDK V2 quickstart](/docs/sdk-v2/quickstart)
* [SDK reference](/docs/sdk-v2/sdk-reference)
* [Run tools across a CSV](/docs/sdk-v2/batch-csv)


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