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

# Retrieve a database

GET https://api.notion.com/v1/databases/{database_id}

Retrieves a [database object](/reference/database) — a container for one or more [data sources](/reference/data-source) — for a provided database ID. The response adheres to any limits to an integration's capabilities.

The most important fields in the database object response to highlight:

* `data_sources`: An array of JSON objects with the `id` and `name` of every data source under the database
  * These data source IDs can be used with the [Retrieve a data source](/reference/retrieve-a-data-source), [Update a data source](/reference/update-a-data-source), and [Query a data source](/reference/query-a-data-source) APIs
* `parent`: The direct parent of the database; generally a `page_id` or `workspace: true`

To find a database ID, navigate to the database URL in your Notion workspace. The ID is the string of characters in the URL that is between the slash following the workspace name (if applicable) and the question mark. The ID is a 32 characters alphanumeric string.

Refer to the [Build your first integration guide](https://developers.notion.com/docs/create-a-notion-integration#step-3-save-the-database-id) for more details.

### Errors

Each Public API endpoint can return several possible error codes. See the [Error codes section](https://developers.notion.com/reference/status-codes#error-codes) of the Status codes documentation for more information.

### Additional resources

* [How to share a database with your integration](https://developers.notion.com/docs/create-a-notion-integration#give-your-integration-page-permissions)
* [Working with databases guide](https://developers.notion.com/docs/working-with-databases)

Reference: https://notion.ferndocs.com/reference/database-retrieve

## Request

### Path parameters

- `database_id` (string, required) — ID of a Notion database, a container for one or more data sources. This is a UUIDv4, with or without dashes.

## Response

### 200

200

- `object` (string, optional)
- `id` (string, optional)
- `title` (list of V1DatabasesDatabaseIdGetResponsesContentApplicationJsonSchemaTitleItems, optional)
- `parent` (V1DatabasesDatabaseIdGetResponsesContentApplicationJsonSchemaParent, optional)
- `is_inline` (boolean, optional, default: true)
- `in_trash` (boolean, optional, default: true)
- `created_time` (string, optional)
- `last_edited_time` (string, optional)
- `data_sources` (list of V1DatabasesDatabaseIdGetResponsesContentApplicationJsonSchemaDataSourcesItems, optional)
- `icon` (any, optional)
- `cover` (any, optional)
- `developer_survey` (string, optional)
- `request_id` (string, optional)

## Errors

### 400 Bad Request Error

400

## Types

### V1DatabasesDatabaseIdGetResponsesContentApplicationJsonSchemaTitleItems

- `type` (string, optional)
- `text` (V1DatabasesDatabaseIdGetResponsesContentApplicationJsonSchemaTitleItemsText, optional)
- `annotations` (V1DatabasesDatabaseIdGetResponsesContentApplicationJsonSchemaTitleItemsAnnotations, optional)
- `plain_text` (string, optional)
- `href` (any, optional)

### V1DatabasesDatabaseIdGetResponsesContentApplicationJsonSchemaParent

- `type` (string, optional)
- `page_id` (string, optional)

### V1DatabasesDatabaseIdGetResponsesContentApplicationJsonSchemaDataSourcesItems

- `id` (string, optional)
- `name` (string, optional)

### V1DatabasesDatabaseIdGetResponsesContentApplicationJsonSchemaTitleItemsText

- `content` (string, optional)
- `link` (any, optional)

### V1DatabasesDatabaseIdGetResponsesContentApplicationJsonSchemaTitleItemsAnnotations

- `bold` (boolean, optional, default: true)
- `italic` (boolean, optional, default: true)
- `strikethrough` (boolean, optional, default: true)
- `underline` (boolean, optional, default: true)
- `code` (boolean, optional, default: true)
- `color` (string, optional)

## Examples

**Response**

```json
{
  "Result": {
    "value": "{\n\t\"object\": \"database\",\n\t\"id\": \"248104cd-477e-80fd-b757-e945d38000bd\",\n\t\"title\": [\n\t\t{\n\t\t\t\"type\": \"text\",\n\t\t\t\"text\": {\n\t\t\t\t\"content\": \"My Task Tracker\",\n\t\t\t\t\"link\": null\n\t\t\t},\n\t\t\t\"annotations\": {\n\t\t\t\t\"bold\": false,\n\t\t\t\t\"italic\": false,\n\t\t\t\t\"strikethrough\": false,\n\t\t\t\t\"underline\": false,\n\t\t\t\t\"code\": false,\n\t\t\t\t\"color\": \"default\"\n\t\t\t},\n\t\t\t\"plain_text\": \"My Task Tracker\",\n\t\t\t\"href\": null\n\t\t}\n\t],\n\t\"parent\": {\n\t\t\"type\": \"page_id\",\n\t\t\"page_id\": \"255104cd-477e-808c-b279-d39ab803a7d2\"\n\t},\n\t\"is_inline\": false,\n\t\"in_trash\": false,\n\t\"created_time\": \"2025-08-07T10:11:07.504-07:00\",\n\t\"last_edited_time\": \"2025-08-10T15:53:11.386-07:00\",\n\t\"data_sources\": [\n\t\t{\n\t\t\t\"id\": \"248104cd-477e-80af-bc30-000bd28de8f9\",\n\t\t\t\"name\": \"My Task Tracker\"\n\t\t}\n\t],\n\t\"icon\": null,\n\t\"cover\": null,\n\t\"developer_survey\": \"https://example.com/xyz\",\n\t\"request_id\": \"2f788b44-abf3-4809-aa4c-dd40734fed0b\"\n}"
  }
}
```

**SDK Code**

```python
import requests

url = "https://api.notion.com/v1/databases/database_id"

response = requests.get(url)

print(response.json())
```

```javascript
const url = 'https://api.notion.com/v1/databases/database_id';
const options = {method: 'GET'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.notion.com/v1/databases/database_id"

	req, _ := http.NewRequest("GET", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.notion.com/v1/databases/database_id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.notion.com/v1/databases/database_id")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.notion.com/v1/databases/database_id');

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.notion.com/v1/databases/database_id");
var request = new RestRequest(Method.GET);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "https://api.notion.com/v1/databases/database_id")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```