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

# Working with Indexes

> Organize your knowledge into separate namespaces

## What are Indexes?

Indexes are namespaces for organizing your knowledge graph. Each index is a separate container for entities and their triples.

Think of indexes as separate databases or projects. Entities in one index are completely separate from entities in another.

## Why Use Indexes?

### Domain Separation

Keep different knowledge domains isolated:

* "Technology Companies" - Tesla, SpaceX, Apple
* "Historical Figures" - Einstein, Newton, Darwin
* "Food & Recipes" - Ingredients, dishes, cuisines

### Entity Disambiguation

The same name can mean different things:

* "Apple" in your tech index = Apple Inc.
* "Apple" in your food index = The fruit

### Access Control

Indexes can be public or private:

* **Private**: Only accessible with your API key
* **Public**: Visible in the [Explore](https://neode.ai/explore) section

### Project Organization

Create indexes for different projects or clients:

* "Client A - Market Research"
* "Client B - Competitor Analysis"
* "Personal - Reading Notes"

## Creating an Index

```bash theme={null}
curl -X POST https://neode.ai/api/indexes \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "name": "Technology Companies",
    "description": "Facts about major technology companies and their products"
  }'
```

Response:

```json theme={null}
{
  "success": true,
  "data": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "name": "Technology Companies",
    "description": "Facts about major technology companies and their products",
    "is_public": false,
    "item_count": 0,
    "created_at": "2026-01-27T10:00:00Z",
    "updated_at": "2026-01-27T10:00:00Z"
  }
}
```

<Note>
  Save the `id` - you'll need it when creating triples and entities.
</Note>

## Listing Indexes

### All Your Indexes

```bash theme={null}
curl "https://neode.ai/api/indexes" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

### Search Indexes

```bash theme={null}
curl "https://neode.ai/api/indexes?search=technology" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

## Using Indexes

### When Creating Triples

Always specify the index:

```bash theme={null}
curl -X POST https://neode.ai/api/triples \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "subject": "Tesla",
    "predicate": "industry",
    "object": "Electric Vehicles",
    "object_type": "entity",
    "index_id": "YOUR_INDEX_ID"
  }'
```

### When Creating Entities

```bash theme={null}
curl -X POST https://neode.ai/api/entities \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "name": "SpaceX",
    "index_id": "YOUR_INDEX_ID"
  }'
```

### When Generating Triples

```bash theme={null}
curl -X POST "https://neode.ai/api/triples/generate?format=json" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "query": "Facts about SpaceX Starship",
    "index_id": "YOUR_INDEX_ID",
    "triple_count": 10
  }'
```

## Public Indexes

### Making an Index Public

Currently, indexes are made public through the web dashboard:

1. Go to [Dashboard](https://neode.ai/dashboard)
2. Select your index
3. Enable "Make Public" in settings

### Exploring Public Indexes

Browse community-shared knowledge at [neode.ai/explore](https://neode.ai/explore).

## Index Properties

| Property      | Description              |
| ------------- | ------------------------ |
| `id`          | Unique identifier (UUID) |
| `name`        | Display name             |
| `description` | Optional description     |
| `is_public`   | Whether publicly visible |
| `item_count`  | Number of entities       |
| `created_at`  | Creation timestamp       |
| `updated_at`  | Last update timestamp    |

## Best Practices

### Naming Conventions

Use clear, descriptive names:

| Good                   | Avoid     |
| ---------------------- | --------- |
| "Technology Companies" | "Index 1" |
| "2026 Market Research" | "Stuff"   |
| "Elon Musk Companies"  | "EM"      |

### One Domain Per Index

Keep indexes focused on a single domain or project. This helps with:

* Entity disambiguation
* Easier querying
* Cleaner organization

### Description

Always add a description:

```json theme={null}
{
  "name": "SpaceX Research",
  "description": "Facts about SpaceX, its missions, rockets, and milestones. Updated January 2026."
}
```

<Card title="API Reference" icon="code" href="/api-reference/endpoint/indexes/list">
  See the complete Indexes API documentation.
</Card>
