Quickstart Guide

Get up and running with TaylorType in 5 minutes. By the end of this guide, you'll have a working search index.

Prerequisites: You'll need a TaylorType account. Sign up for free if you haven't already.

1

Install the SDK

Install the TaylorType SDK for your language of choice:

npm install @taylortype/sdk
# or
yarn add @taylortype/sdk
pip install taylortype
gem install taylortype
go get github.com/taylortype/taylortype-go
2

Get Your API Key

Navigate to your TaylorType Dashboard and create an API key. You'll find this under Settings → API Keys.

Security Note: Never expose your API key in client-side code. Use environment variables and server-side requests.

3

Initialize the Client

Create a TaylorType client instance with your API key:

import { TaylorType } from '@taylortype/sdk';

const client = new TaylorType({
  apiKey: process.env.TAYLORTYPE_API_KEY
});
from taylortype import TaylorType
import os

client = TaylorType(
    api_key=os.environ['TAYLORTYPE_API_KEY']
)
4

Create an Index

An index holds your searchable data. Create one for your content type:

const index = await client.createIndex({
  name: 'products',
  settings: {
    semantic: true,
    language: 'en'
  }
});

console.log(`Created index: ${index.id}`);
index = client.create_index(
    name='products',
    settings={
        'semantic': True,
        'language': 'en'
    }
)

print(f"Created index: {index.id}")
5

Add Documents

Push your data to the index. Each document needs a unique id:

await client.index('products').addDocuments([
  {
    id: '1',
    title: 'Wireless Noise-Canceling Headphones',
    description: 'Premium over-ear headphones with active noise cancellation',
    price: 299.99,
    category: 'Electronics'
  },
  {
    id: '2',
    title: 'Mechanical Keyboard',
    description: 'RGB backlit mechanical keyboard with Cherry MX switches',
    price: 149.99,
    category: 'Electronics'
  },
  {
    id: '3',
    title: 'Ergonomic Office Chair',
    description: 'Adjustable lumbar support chair for all-day comfort',
    price: 449.99,
    category: 'Furniture'
  }
]);

console.log('Documents indexed!');
client.index('products').add_documents([
    {
        'id': '1',
        'title': 'Wireless Noise-Canceling Headphones',
        'description': 'Premium over-ear headphones with active noise cancellation',
        'price': 299.99,
        'category': 'Electronics'
    },
    {
        'id': '2',
        'title': 'Mechanical Keyboard',
        'description': 'RGB backlit mechanical keyboard with Cherry MX switches',
        'price': 149.99,
        'category': 'Electronics'
    },
    {
        'id': '3',
        'title': 'Ergonomic Office Chair',
        'description': 'Adjustable lumbar support chair for all-day comfort',
        'price': 449.99,
        'category': 'Furniture'
    }
])

print('Documents indexed!')
6

Search!

Run your first search query. Try a natural language query to see semantic search in action:

const results = await client.index('products').search({
  query: 'comfortable chair for working from home',
  limit: 10
});

console.log(`Found ${results.total} results:`);
results.hits.forEach(hit => {
  console.log(`- ${hit.document.title} (score: ${hit.score})`);
});

// Output:
// Found 1 results:
// - Ergonomic Office Chair (score: 0.94)
results = client.index('products').search(
    query='comfortable chair for working from home',
    limit=10
)

print(f"Found {results.total} results:")
for hit in results.hits:
    print(f"- {hit.document['title']} (score: {hit.score})")

# Output:
# Found 1 results:
# - Ergonomic Office Chair (score: 0.94)

Notice: The query "comfortable chair for working from home" found the "Ergonomic Office Chair" even though those exact words weren't in the document. That's semantic search in action!

Congratulations!

You've just built your first TaylorType search implementation. From here, you can:

Explore Features

Learn about faceted search, autocomplete, and personalization.

View all features →

API Reference

Dive deep into all available endpoints and parameters.

Read the docs →

UI Components

Use our pre-built React and Vue components for instant search UI.

Explore components →

Best Practices

Learn how to optimize relevance and performance at scale.

Read the guide →