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

# Info

Your index contains valuable information that may be useful to retrieve for various purposes.

Our SDK provides the capability to fetch detailed information about your index, including metadata,
ready and pending vectors, similarity function, and associated namespaces.

## Index Info

To fetch the information about your index you can use the `getInfo()` method as shown below.

```php theme={"system"}
use Upstash\Vector\Index;

$index = new Index(
  url: "<UPSTASH_VECTOR_REST_URL>",
  token: "<UPSTASH_VECTOR_REST_TOKEN>",
);

$info = $index->getInfo();
```

That call will return an instance of `Upstash\Vector\IndexInfo`.

We can use index info as follows:

```php theme={"system"}
// To know the number of vectors ready to query.
$info->vectorCount;

// To know the number of vectors that are getting indexed.
$info->pendingVectorCount;

// To know the size of the index in bytes.
$info->indexSize;

// To know the dimensions of your vector index.
$info->dimension;

// To know which similarity function is being used.
$info->similarityFunction;

// To get information about a specific index you can (More on next section):
$namespaceInfo = $info->namespace('my-namespace');
```

You can read more about [Namespaces](/vector/features/namespaces) and [Similarity Functions](/vector/features/similarityfunctions) on our docs.

## Namespace Info

Namespaces also contain vectors, which may be pending indexing.

As shown above, you can fetch information about the namespaces when making a `getInfo()` call on the index.

Additionally, you can use the `getNamespaceInfo()` method:

```php theme={"system"}
use Upstash\Vector\Index;

$index = new Index(
  url: "<UPSTASH_VECTOR_REST_URL>",
  token: "<UPSTASH_VECTOR_REST_TOKEN>",
);

// Fetch the information of the default namespace.
$defaultNamespaceInfo = $index->getNamespaceInfo();

// Fetch the information on a specific namespace.
$myNamespaceInfo = $index->namespace('my-namespace')->getNamespaceInfo();
```

The `getNamespaceInfo()` call will return an instance of `Upstash\Vector\NamespaceInfo`.

We can use namespace info as follows:

```php theme={"system"}
// To know the number of vectors ready to query.
$myNamespaceInfo->vectorCount;

// To know the number of vectors that are getting indexed.
$myNamespaceInfo->pendingVectorCount;
```
