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

# Get ancestors of a concept

GET https://api.contentful.com/organizations/{organization_id}/taxonomy/concepts/{concept_id}/ancestors

Reference: https://contentful.com/developers/docs/references/content-management-api/taxonomy/get-ancestors-of-a-concept

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Request

### Path parameters

- `concept_id` (string, required) — The ID of the concept.
- `organization_id` (string, required) — The ID of the organization.

### Query parameters

- `depth` (integer, optional) — Number of levels to traverse upwards to retrieve ancestors. *Default=1* (i.e. direct parents only)
- `limit` (integer, optional) — Limits the maximum number of concepts returned (per page).
- `pageNext` (string, optional) — Pagination cursor from which to return the next page of concepts. Alternatively, just call the url at `pages.next` in the previous response.
- `pagePrev` (string, optional) — Pagination cursor from which to return the previous page of concepts. Alternatively, just use the full url from `pages.prev` in the previous response.
- `order` (enum, optional) — Options for ordering the results
  - Allowed values: `sys.createdAt`, `sys.updatedAt`, `prefLabel`, `-sys.createdAt`, `-sys.updatedAt`, `-prefLabel`
- `query` (string, optional) — Filter results using a full-text search query, looking at _prefLabel_, _altLabels_, _hiddenLabels_ and _notations_ fields

## Response

### 200

OK - Request successful

- `map from string to any`

## Examples

**Response**

```json
{
  "items": [
    {
      "altLabels": {
        "en-US": [
          "Couches",
          "Settees"
        ]
      },
      "broader": [
        {
          "sys": {
            "id": "1Py5SjffQHkGGY3dZ02W14",
            "linkType": "TaxonomyConcept",
            "type": "Link"
          }
        }
      ],
      "changeNote": {
        "en-US": ""
      },
      "conceptSchemes": [
        {
          "sys": {
            "id": "2s0F7127ajju1AVToMaCtE",
            "linkType": "TaxonomyConceptScheme",
            "type": "Link"
          }
        }
      ],
      "definition": {
        "en-US": ""
      },
      "editorialNote": {
        "en-US": ""
      },
      "example": {
        "en-US": ""
      },
      "hiddenLabels": {
        "en-US": [
          "Davenports"
        ]
      },
      "historyNote": {
        "en-US": ""
      },
      "notations": [
        "FURN0017B"
      ],
      "note": {
        "en-US": ""
      },
      "prefLabel": {
        "en-US": "Sofas"
      },
      "related": [
        {
          "sys": {
            "id": "5abcWINB018mASQ5Fdrkbj",
            "linkType": "TaxonomyConcept",
            "type": "Link"
          }
        }
      ],
      "scopeNote": {
        "en-US": ""
      },
      "sys": {
        "createdAt": "2025-05-23T12:27:53.000Z",
        "createdBy": {
          "sys": {
            "id": "7BslKh9TdKGOK41VmLDjFZ",
            "linkType": "User",
            "type": "Link"
          }
        },
        "id": "3kZdDUXy9n0l2Xi2cq8TPc",
        "organization": {
          "sys": {
            "id": "0D9ZC8rLWiw6x5qizZGiRs",
            "linkType": "Organization",
            "type": "Link"
          }
        },
        "type": "TaxonomyConcept",
        "updatedAt": "2025-05-23T12:27:53.000Z",
        "updatedBy": {
          "sys": {
            "id": "4FLrUHftHW3v2BLi9fzfjU",
            "linkType": "User",
            "type": "Link"
          }
        },
        "version": 0
      },
      "uri": ""
    }
  ],
  "limit": 100,
  "pages": {
    "next": "<url>",
    "prev": "<url>"
  },
  "sys": {
    "type": "Array"
  }
}
```

**SDK Code**

```android Android
SDK currently doesn't implement this endpoint.
```

```java Java
SDK currently doesn't implement this endpoint.
```

```kotlin Kotlin
SDK currently doesn't implement this endpoint.
```

```swift Swift
We currently don't provide a CMA SDK for this platform.
```

```js-legacy JavaScript (legacy)
Please use the Javascript (Plain client) for this endpoint.
```

```javascript JavaScript
import { createClient } from 'contentful-management'

// Client init
const client = contentful.createClient({
  accessToken: '<content_management_api_key>'
})

const { pages, items } = await client.concept.getAncestors({
  organizationId: '<organization_id>',
  conceptId: '<concept_id>',
  query: {
    depth: 2,
    order: 'prefLabel',
    query: 'cars'
  }
})

// Get next page
if( pages?.next ) {
  const nextPage = await client.concept.getAncestors({
    organizationId: '<organization_id>',
    query: {
      pageUrl: pages.next
    }
  })
}
```

```php PHP
SDK currently doesn't implement this endpoint.
```

```ruby Ruby
SDK currently doesn't implement this endpoint.
```

```python Python
SDK currently doesn't implement this endpoint.
```

```.net .NET
csharp
// This client should only be created once per application.
var httpClient = new HttpClient();

var client = new ContentfulManagementClient(httpClient, "<content_management_api_key>", "<space_id>");

// Get concept ancestors (parent concepts)
var ancestors = await managementClient.GetTaxonomyConceptAncestors(organizationId, "concept-id", depth: 2);
```