# get_datapoints_by_filter

> **Function** in `langchain_google_vertexai`

📖 [View in docs](https://reference.langchain.com/python/langchain-google-vertexai/vectorstores/_v2_operations/get_datapoints_by_filter)

Gets datapoint IDs that match a filter in a Vertex AI Vector Search 2.0.

Retrieves IDs from the Collection matching the given filter.

## Signature

```python
get_datapoints_by_filter(
    project_id: str,
    region: str,
    collection_id: str,
    filter_: dict,
    credentials: Optional[Credentials] = None,
) -> List[str]
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `project_id` | `str` | Yes | The GCP project ID. |
| `region` | `str` | Yes | The GCP region. |
| `collection_id` | `str` | Yes | The collection ID. |
| `filter_` | `dict` | Yes | Filter dict to match datapoints. Examples: {"genre": {"$eq": "Drama"}},          {"$and": [{"year": {"$gte": 1990}}, {"genre": {"$eq": "Action"}}]} |
| `credentials` | `Optional[Credentials]` | No | Optional credentials to use. (default: `None`) |

## Returns

`List[str]`

List of datapoint IDs matching the filter.

---

[View source on GitHub](https://github.com/langchain-ai/langchain-google/blob/a3f016b2a6c4af535df275545f76fa7424aa39e5/libs/vertexai/langchain_google_vertexai/vectorstores/_v2_operations.py#L279)