> This page is for Developer Documentation.

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

# Get a feature by ID

GET https://{tenant_name}.benchling.com/api/v2/features/{feature_id}

Get a feature by ID

Reference: https://docs.benchling.com/docs/api/v2/benchling-api/feature-libraries/get-feature

## Authentication

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

## Request

### Path parameters

- `feature_id` (string, required) — ID of feature to get

### Query parameters

- `returning` (string, optional) — Comma-separated list of fields to return. Modifies the output shape. To return all keys at a given level, enumerate them or use the wildcard, '*'. For more information, [click here](https://docs.benchling.com/docs/getting-started-1#returning-query-parameter).

## Response

### 200

OK

- `color` (string, optional) — The color of the annotations generated by the feature. Must be a valid hex string
- `featureLibraryId` (string, optional) — The id of the feature library the feature belongs to
- `featureType` (string, optional, nullable) — The type of feature, like gene, promoter, etc. Note: This is an arbitrary string, not an enum
- `name` (string, optional) — The name of the feature
- `pattern` (string, optional) — The pattern used for matching during auto-annotation.
- `id` (string, optional) — The id of the feature
- `matchType` (enum, optional) — The match type of the feature. Used to determine how auto-annotate matches are made.
  - Allowed values: `nucleotide`, `protein`

## Errors

### 404 Not Found Error

Not Found

- `error` (NotFoundErrorError, optional)

## Types

### NotFoundErrorError

- `message` (string, optional)
- `type` (enum, optional)
  - Allowed values: `invalid_request_error`
- `userMessage` (string, optional)
- `invalidId` (string, optional)

## Examples

**Response**

```json
{
  "color": "#F58A5E",
  "featureLibraryId": "featlib_19kd9aDq",
  "featureType": "string",
  "name": "string",
  "pattern": "string",
  "id": "feat_4YVqX98z",
  "matchType": "nucleotide"
}
```

**SDK Code**

```python
import requests

url = "https://{tenant_name}.benchling.com/api/v2/features/feature_id"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript
const url = 'https://{tenant_name}.benchling.com/api/v2/features/feature_id';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

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