This is the full developer documentation for Typemo # What is Typemo > Search you add to a site or an app: one catalog, searched by visitors in a widget, by your code over an API and by AI. Source: https://docs.typemo.com/getting-started/introduction/ Typemo is search you add to a site or an app. You import your data once into a collection; visitors search it in a widget, your code searches it over an API, and AI answers from it. Everything below reads from that one catalog, so a fix you make shows up everywhere at once. Every source lands in the same collection — and the same collection answers the widget, the API and AI. ## One catalog, four ways in [Section titled “One catalog, four ways in”](#one-catalog-four-ways-in) | Way in | Who uses it | What it is | | ---------------- | -------------------------------------------- | --------------------------------------------------------------------- | | **Widget** | Visitors on your site | Search with filters, added with one script tag | | **AI Assistant** | Visitors who would rather ask than browse | A chat inside the widget that answers from your catalog | | **API and SDKs** | Your backend, your own UI, InstantSearch | REST search and data APIs, a TypeScript SDK, an InstantSearch adapter | | **MCP server** | AI agents such as Claude, ChatGPT and Cursor | Tools that search, read and update your collections | ## What happens to your data [Section titled “What happens to your data”](#what-happens-to-your-data) 1. **You import it.** Upload a file, point Typemo at a feed, a database, your store or your website, or push it over the API. Scheduled sources stay in sync on their own. 2. **You mark what the columns mean.** A role tells Typemo which column is the title, the price, the image. Your column names stay yours. 3. **Typemo searches it.** A query survives typos and odd wording, and a search that finds nothing still shows popular items. Clicks and sales move good results up over time. 4. **You shape the results.** Synonyms, boosting rules, pinned or hidden results and banners apply at once, with no deploy. 5. **You see what visitors look for.** Analytics show top searches, searches with no results and searches with no clicks, each with a way to fix it. ## What sets it apart [Section titled “What sets it apart”](#what-sets-it-apart) * **The AI Assistant sticks to your catalog.** It searches through the same search as the widget, so your boosts, pinned results and exclusions hold in the chat too. When your content has no answer, it says so instead of guessing. See [AI Assistant](/ai-assistant/overview/). * **You see what it learns, and can take it back.** Clicks, sales and searches tune the ranking on their own. The **AI Search improvements** card lists each change, and **Undo** on a learned word removes it for good. See [AI Insights](/analytics/insights/). * **Support bots answer from your live catalog.** Over MCP, Claude, ChatGPT, Cursor and help-desk bots such as Zendesk and Intercom Fin search your collections with your ranking and read the current price and stock. See [Connect an AI agent](/developers/mcp/). * **Switching keeps what you built.** A Shopify store keeps its Search & Discovery filters, in the same order and with the same labels. A Google Merchant feed you already publish works as the source. See [Connect Shopify](/integrations/shopify/) and [Product feeds](/import/feeds/#google-shopping). * **Search runs in Europe.** Your collections are indexed and searched in Europe, and analytics count searches with no cookies and no IP addresses. See [Project settings](/project/settings/) and [Analytics overview](/analytics/overview/). ## Where to start [Section titled “Where to start”](#where-to-start) * **An online store or a content site:** follow the [Quickstart](/getting-started/quickstart/). The setup wizard takes you from sign-up to search on your site. * **Your own backend or app:** the [API quickstart](/getting-started/api-quickstart/) creates a collection, fills it and searches it in four requests. * **A UI built on InstantSearch:** swap its search client, as in [InstantSearch](/developers/instantsearch/). Next: [Core concepts](/getting-started/concepts/) names the pieces you will meet in the dashboard and the API. # API quickstart > Fill a collection from your code and search it: a key, a push, a role and a query, with curl or the TypeScript SDK. Source: https://docs.typemo.com/getting-started/api-quickstart/ By the end of this page your code pushes documents into a collection and searches them. You need a Typemo account and a terminal; every step shows `curl` and the TypeScript SDK side by side. The management API lives at `https://api.typemo.com/v1`, search at `https://search.typemo.com/v1`. ## 1. Create a project and an empty collection [Section titled “1. Create a project and an empty collection”](#1-create-a-project-and-an-empty-collection) Sign up and create your project in the setup wizard, as in the [Quickstart](/getting-started/quickstart/). At the **Data** step, name the collection `products` and pick **API** under **Other**: the collection is created empty, waiting for your code. ## 2. Create a key [Section titled “2. Create a key”](#2-create-a-key) Open **Project & account → API keys** and create a **Write & Read** key. It can create and change documents, so it stays on your server; keep it in an environment variable. ```bash export TYPEMO_KEY=sq_your_write_key ``` ## 3. Find the collection’s id [Section titled “3. Find the collection’s id”](#3-find-the-collections-id) * curl ```bash curl -s https://api.typemo.com/v1/collections \ -H "Authorization: Bearer $TYPEMO_KEY" ``` * SDK * npm ```sh npm i @typemo-org/sdk ``` * pnpm ```sh pnpm add @typemo-org/sdk ``` * yarn ```sh yarn add @typemo-org/sdk ``` * bun ```sh bun add @typemo-org/sdk ``` ```ts import { Typemo } from '@typemo-org/sdk'; const typemo = new Typemo({ apiKey: process.env.TYPEMO_KEY }); const collections = await typemo.collections.list(); ``` * npm ```sh npm i @typemo-org/sdk ``` * pnpm ```sh pnpm add @typemo-org/sdk ``` * yarn ```sh yarn add @typemo-org/sdk ``` * bun ```sh bun add @typemo-org/sdk ``` The answer lists the project’s collections under `data`; copy the `id` of `products`. ## 4. Push documents [Section titled “4. Push documents”](#4-push-documents) Send up to 1,000 documents per request. `id` is the one field every document needs; the rest are yours. * curl ```bash curl -s https://api.typemo.com/v1/collections/COLLECTION_ID/documents \ -H "Authorization: Bearer $TYPEMO_KEY" \ -H "Content-Type: application/json" \ -d '{ "documents": [ { "id": "tee-001", "title": "Cotton T-shirt", "price": 29, "url": "/products/cotton-tee" }, { "id": "tee-002", "title": "Linen T-shirt", "price": 39, "url": "/products/linen-tee" } ] }' ``` * SDK ```ts await typemo.documents.upsert('COLLECTION_ID', { documents: [ { id: 'tee-001', title: 'Cotton T-shirt', price: 29, url: '/products/cotton-tee' }, { id: 'tee-002', title: 'Linen T-shirt', price: 39, url: '/products/linen-tee' } ] }); ``` The answer counts what was indexed: `{ "indexed": 2, "rejected": 0, … }`. ## 5. Name the roles [Section titled “5. Name the roles”](#5-name-the-roles) Roles tell the widget and the assistant which field is the title, the link and the price. Typemo never guesses them from field names, so set them once. * curl ```bash curl -s -X PATCH https://api.typemo.com/v1/collections/COLLECTION_ID \ -H "Authorization: Bearer $TYPEMO_KEY" \ -H "Content-Type: application/json" \ -d '{ "roles": { "title": "title", "url": "url", "price": "price" } }' ``` * SDK ```ts await typemo.collections.update('COLLECTION_ID', { roles: { title: 'title', url: 'url', price: 'price' } }); ``` ## 6. Search [Section titled “6. Search”](#6-search) * curl ```bash curl -sL "https://search.typemo.com/v1/collections/COLLECTION_ID/search?q=linen" \ -H "X-API-Key: $TYPEMO_KEY" ``` * SDK ```ts const results = await typemo.search('COLLECTION_ID', { q: 'linen' }); console.log(results.found, results.hits[0]?.title); ``` The answer holds `found`, the `hits` with your fields, and `facets` for any filters you set. Searching from a browser A browser gets a **Read only** key, never the Write & Read one. A Read only key answers only on the sites listed under [Security](/project/security/). You now have a collection your code fills and searches. Next: build a search UI on it with [InstantSearch](/developers/instantsearch/), or read [API basics](/developers/api-basics/) for regions, errors and rate limits. # Core concepts > Projects, collections, documents, roles and API keys: the pieces behind every Typemo screen and endpoint. Source: https://docs.typemo.com/getting-started/concepts/ Five ideas run Typemo: projects, collections, documents, roles and API keys. You meet them in the dashboard, the API and the SDKs alike. They nest in one direction, from the project down. | Concept | What it is | Example | | -------------- | ----------------------------------------------------- | ------------------------------- | | **Project** | One site or app. Holds its collections and API keys. | `Acme` | | **Collection** | One searchable catalog of one kind of content. | `products`, `articles`, `pages` | | **Document** | One record in a collection, with your fields. | a product, a help article | | **Role** | What a column means: the title, the price, the image. | `name` is the **Title** | | **API key** | The credential your widget or server sends. | a **Read only** key | ## Projects and collections [Section titled “Projects and collections”](#projects-and-collections) A typical store is one project with a few collections: ```plaintext Project: Acme ├── Collection: products ← the catalog, with prices and stock ├── Collection: articles ← blog posts and guides └── Collection: pages ← About, Shipping, FAQ ``` Each collection has its own fields, ranking, filters and analytics, which is why products and articles live apart. The widget shows a project’s collections as tabs in one search, so a visitor moves between products and guides without leaving it. Split collections by kind of content, not by budget: they cost nothing extra. Your first project and collection come from the setup wizard. To add more: * **A project:** open the project menu in the top bar and pick **Create project**. The wizard runs again for the new site. * **A collection:** click **Add collection** under **Collections** in the sidebar. A new collection joins the widget as a tab once it holds documents; **Tabs** on **Search → Look** hides or reorders tabs. ## Documents keep your shape [Section titled “Documents keep your shape”](#documents-keep-your-shape) A document is your record as you sent it. Typemo indexes the fields you provide and needs no template; the one field every document needs is a unique id, which is how an update finds the document it replaces. A collection takes its documents from one source at a time: [Choose how to import](/import/overview/) compares them. ## Roles [Section titled “Roles”](#roles) A role points at a column: this one is the title, that one the price. Roles are how one widget renders catalogs with entirely different column names, and how the assistant knows what it reads. A column can also carry a custom role: a sentence on what it holds, which AI reads beside the value. Roles are set on **Search → Setup**; [Roles](/fields/roles/) lists them all. ## API keys [Section titled “API keys”](#api-keys) An API key belongs to a project and reaches all of its collections. That is how one widget searches the `products` and `articles` tabs together. | Key type | Can | Where it goes | | ---------------- | ------------------------------------- | ---------------------------------- | | **Read only** | Search and read | The widget, browsers, public pages | | **Write & Read** | Also create collections and documents | Your server, scripts and CI only | Create one key per site or environment and rotate freely: see [API keys](/project/api-keys/). Next: the [Quickstart](/getting-started/quickstart/) puts these pieces together on your site. # Quickstart > From sign-up to search on your site: create a project, import your data, mark its columns, install the widget and try it. Source: https://docs.typemo.com/getting-started/quickstart/ By the end of this page your site has search over your own data, in a widget your visitors open with a button or `⌘K`. You need an email address, your data (a file, a feed, a store or a docs site) and a site where you can paste a script tag. The setup wizard does most of the work. ![The catalog widget searching lamp, with categories on the left and product cards in the grid](/_astro/preview.BggxCCil_1il2Dr.webp) Search over your own catalog 1. **Sign up.** Create an account at [typemo.com](https://typemo.com) with an email and password, or with Google. The free plan needs no card, and every new account starts with 30 days of Pro. The setup wizard opens right away, in three steps: **Project**, **Data** and **Mapping**. 2. **Create your project.** A project is one site. Give it a name and your website’s address: the widget and the assistant run only on that site, and **Security** adds more sites later. **Your site’s search field**, a CSS selector such as `.search-field`, is optional: search then opens from your own search box. Then pick the **Server region** your data lives in. Europe (Nuremberg, Germany) is live; the other regions are marked **Soon**. The region can’t change after creation. 3. **Connect your data.** Name the collection and pick its search language: the language decides how words and typos are understood. Then pick where the data comes from. Sources are grouped into **E-commerce**, **Docs & sites** and **Other**. * A file Pick **File upload** and drop your file: CSV, JSON, Excel and [more formats](/import/upload-file/). Check the preview of your rows, then import. No file at hand? **Download sample CSV** gives you one. * A store Pick **WooCommerce** or **Shopify** and paste your store’s address. Products sync on a schedule, and the store’s fields are mapped for you. On WordPress, the [plugin](/integrations/woocommerce/) also sends each edit within minutes. * A docs site Pick your docs platform, or **Website** for any other site, and give its address. Typemo crawls the pages and splits them into sections. Building a static site? [Index your build](/import/index-your-build/) instead. When the import finishes, the wizard says **Your data is now searchable**. ![The source cards grouped into E-commerce, Docs & sites and Other](/_astro/source-cards.CfRFG6Sq_Z2guOkc.webp) Pick where your data comes from 4. **Mark your columns.** Under **What you are building**, pick **Catalog** for a grid of products with filters, **Docs** for results grouped by page and section, or **API only** if you will build your own UI. A store or docs source has already picked one for you. Then point each role at a column: **Title** at least, and for a catalog the image, price and URL. A store, the WordPress plugin, a Google Shopping feed and the crawler fill the roles themselves. The preview beside the form shows the result in the real widget. [Map your fields](/fields/map-fields/) covers this screen in full. 5. **Install the widget.** Open **Install → Installation** and copy the snippet: it already carries your key. Paste it before `` on your site, then press **Verify** to check that the tag is live. index.html ```html ``` [Install the widget](/widget/install/) covers themes, site builders and troubleshooting. 6. **Search your catalog and fix the first miss.** Open your site, press the button and type what a visitor would, typo included. You can also search before installing: **Preview** in the dashboard runs the same widget on your data. Within a minute you will see something to improve: | You notice | Fix it with | | -------------------------------------- | ------------------------------------------------------------------------------------------------ | | A word your visitors use finds nothing | A [synonym](/search/synonyms/) | | The right result sits too low | A [boosting rule](/merchandising/boosting/) or a [custom result](/merchandising/custom-results/) | | Something shouldn’t appear at all | An [exclusion](/search/exclusions/) | Let analytics pick the next fix After a few days of traffic, [Search performance](/analytics/search-performance/) lists the real searches that found nothing or got no clicks, each with a **Fix** button. You now have a project, a collection kept in sync with its source, and search on your site. Next: [Choose how to import](/import/overview/) to keep your data current, or turn on the [AI Assistant](/ai-assistant/overview/). # Plans and billing > What each plan includes, what counts against its limits, and how trials, plan changes, payments and invoices work. Source: https://docs.typemo.com/account/billing/ What your plan includes, what counts against it, and what happens when you change plans or a payment fails. Open **Account → Billing**, or **Upgrade** in the top bar. ![Account → Billing: Usage & plan with the meters for searches this month, indexed documents, AI chat sessions this month and documents embedded this month beside the plan card, and Payment & billing below](/_astro/billing.B5yu3iq8_Z7C1gi.webp) Usage & plan on the Billing page ## Plans [Section titled “Plans”](#plans) | Plan | Monthly | Yearly | Searches a month | Documents | AI chat sessions a month | Projects | | -------- | ------- | ------ | ---------------- | --------- | ------------------------ | --------- | | Free | €0 | — | 10,000 | 5,000 | 50 | 1 | | Basic | €39 | €390 | 30,000 | 20,000 | 1,000 | Unlimited | | Pro | €99 | €990 | 150,000 | 50,000 | 4,000 | Unlimited | | Advanced | €299 | €2,990 | 500,000 | 200,000 | 10,000 | Unlimited | * Every plan has unlimited collections per project. * Yearly billing charges ten months for twelve. * Prices are final prices: Typemo charges no VAT. * Before the payment page, you say whether you buy as a consumer or for your business. As a consumer you ask for the plan to start at once and can withdraw from it within 14 days. * [Semantic search](/search/ranking/) needs a paid plan. * Every other feature is on every plan; the plans differ in volume. * For more than Advanced, [contact us](https://typemo.com/contact): Enterprise plans start at €599 a month, with an SLA, a data processing agreement and payment by invoice. ![The Plans section: the Basic, Pro and Advanced cards with their monthly prices and limits, the Monthly / Yearly — 2 months free switch, and Invoices below](/_astro/billing-plans.BXtKRHys_x5wR1.webp) Plans, monthly or yearly ## Trial [Section titled “Trial”](#trial) | What | Rule | | ------------ | --------------------------------------------------- | | Length | 30 days of Pro. | | Card | Not needed. | | Reminder | An email three days before the trial ends. | | Paying early | The paid plan starts at once, and the trial ends. | | At the end | The account moves to Free unless you picked a plan. | Document limit reached after 30 days? That is usually the trial ending: Free holds 5,000 documents. Search keeps answering from what is already indexed; pick a plan to add more. ## Limits [Section titled “Limits”](#limits) | Limit | What counts | Resets | At the limit | | ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Searches | Every search request answered: each one the widget sends as a visitor types, each API call, and dashboard previews. Opening the widget and suggestions don’t count. | The 1st of each month, UTC | Searches past the limit are never billed. On Free, search pauses until the 1st: the widget opens with **Search is paused until …** and sends nothing, and the API answers `429`. On a paid plan search keeps running, and the next plan applies from the following month. | | Documents | Every document in every collection of every project you own. | Never: it is what you hold | On Free, imports stop adding documents; deleting documents frees room. On a paid plan imports keep running, and the next plan applies from the following month. | | AI chat sessions | Each conversation a visitor has with the [AI assistant](/ai-assistant/overview/). | The 1st of each month, UTC | The assistant stops answering until the month resets. | | Projects | Every project you own. | — | You can’t create another one. | At 80 % of the searches or documents, the page shows **Approaching limit** and Typemo emails you. At 100 %, it shows **Monthly search quota reached** or **Document limit reached**, and you get a second email. **Documents embedded this month** appears once [semantic search](/search/ranking/) has embedded documents. It has no limit. ## Plan changes [Section titled “Plan changes”](#plan-changes) | Change | When it applies | What you pay | | ----------------------------------- | -------------------------------------------------------------- | ------------------------------------------------------------------------------------------------ | | A dearer plan, or monthly → yearly | At once | The difference for the rest of the period today, then the new price from your next billing date. | | A cheaper plan, or yearly → monthly | On your next billing date | Nothing today. **Keep current plan** calls the change off before then. | | **Cancel subscription** | At the end of the paid period | Nothing more. The account then moves to Free. **Resume subscription** undoes it before then. | | **Withdraw from contract** | At once; shown to consumers for 14 days after buying | The days used. The rest is refunded to your card, and the account moves to Free. | | A failed payment | The plan stays, marked **Past due**, while the card is retried | **Pay invoice** or **Update payment method** settles it. | **Cancel subscription** opens [typemo.com/cancel](https://typemo.com/cancel), which also works without signing in and says when a cancellation takes effect and what is refunded. Signed out, the cancellation takes effect once you confirm it with the link we email to the account’s address; the link works for 7 days. Both a cancellation and a withdrawal are confirmed by email at once. ## Payment and invoices [Section titled “Payment and invoices”](#payment-and-invoices) **Payment & billing** shows the card on file and the details printed on your invoices: email, name, address and **VAT ID**. **Edit in Stripe portal** changes any of them, so card numbers never reach Typemo. A card that expires within 60 days is marked **expires soon**. | Invoice column | What it shows | | -------------- | ----------------------------------------------------------------------------------- | | **Number** | The invoice number. | | **Date** | When it was issued. | | **Period** | The billing period it covers. | | **Amount** | The total charged. | | **Status** | **Paid**, **Open** with a **Pay** button, **Draft**, **Void** or **Uncollectible**. | | Download | The invoice as a PDF. | Add your VAT ID before your first payment: an invoice keeps the details it was issued with. Next: [Check your search analytics](/analytics/overview/), or set up [your account](/account/settings/). # Your account > Your profile and email, password and two-factor authentication, sign-in methods, the emails Typemo sends and the dashboard language. Source: https://docs.typemo.com/account/settings/ What belongs to you rather than to a project: your profile, how you sign in, the emails you get and the dashboard’s language. Open your avatar in the top bar, then **Account**. The **Account** page has four tabs: **Profile**, **Security**, **Connections** and **Billing**. Billing has its own page: [Plans and billing](/account/billing/). ![Account → Profile: Avatar, Name, Email with its Verified badge, and the Search reports switch](/_astro/profile.BN6DpXn4_2aeu59.webp) Account → Profile ## Profile [Section titled “Profile”](#profile) | Setting | What it does | | ------------------ | -------------------------------------------------------------------------------------------------------------------- | | **Avatar** | Generated from your account; there is nothing to upload. With Google connected, your Google picture is used instead. | | **Name** | Your name in the dashboard and in the emails Typemo sends you. | | **Email** | Where every email below goes. A badge shows **Verified** or **Not verified**. | | **Search reports** | Turns the twice-monthly search report on or off. See [Emails](#emails). | ### Email address [Section titled “Email address”](#email-address) | Situation | What happens | | ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | | **Change email**, address verified | The approval link goes to your current address, so a stolen session can’t move your account. Nothing changes until you open it. | | **Change email**, not verified | The link goes to the new address. | | Address not verified | You can sign in, but you can’t create a project. **Resend verification email** sends the link again. | ## Security [Section titled “Security”](#security) | Setting | What it does | Rule | | ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------- | | **Password** | Changes your password: **Current password**, then the new one twice, then **Update password**. | At least 8 characters. Other devices stay signed in. | | **Enable 2FA** | Asks for your password, shows a **Setup key** for your authenticator app, then asks for the app’s 6-digit code. | Any authenticator app: Google Authenticator, Authy, 1Password. | | Backup codes | Shown once, right after you enable 2FA. Each signs you in once if you lose your phone. **View backup codes** → **Regenerate codes** replaces them all. | Keep them somewhere other than the phone. | | **Disable 2FA** | Turns two-factor authentication off. | Asks for your password. | | **Active sessions** | Every device signed in to your account, with its IP address. **Sign out** ends one; **Sign out all other devices** ends the rest. | — | Typemo emails you whenever your password changes or two-factor authentication turns on or off. If you didn’t make the change, check **Active sessions** first. Changing phones? Move your codes with the authenticator app’s own transfer feature. Turning 2FA off and on again leaves a gap and replaces your backup codes. API keys are separate from your sign-in: see [Manage API keys](/project/api-keys/). ## Connections [Section titled “Connections”](#connections) Two ways to sign in, both into the same account: | Method | Status | Actions | | ------------ | ---------------------------------- | --------------------------------------------------------------------------------------------- | | **Google** | **Connected** or **Not connected** | **Connect** opens Google’s consent page. **Disconnect** works only while you have a password. | | **Password** | **Set** or **Not set** | **Change** or **Set password** opens the **Security** tab. | To add a password to an account you opened with Google, use **Forgot password?** on the sign-in page: the link it emails sets your first password. Keep both methods, so losing one never locks you out. ## Emails [Section titled “Emails”](#emails) | Email | When | Can you turn it off | | ---------------------------- | ----------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | | Search report | Twice a month, for the 1st–15th and the 16th to the month’s end. Skipped when nobody searched. | Yes: **Search reports** on **Profile**, or **Turn these off** in the email, which needs no sign-in. | | Security notice | Your password changed, or 2FA was turned on or off. | No | | Usage alert | Your searches or documents near your plan’s limit. See [Plans and billing](/account/billing/#limits). | No | | Sync paused | A scheduled sync failed five times in a row and stopped. See [An import failed](/troubleshooting/import-errors/). | No | | Trial ending | Three days before your trial ends. | No | | Verification, password reset | When you sign up, change your email or ask for a reset. | No | The search report covers all your projects in one email: searches, click-through against the previous half-month and the changes we suggest, each linking to its project. ## Dashboard language [Section titled “Dashboard language”](#dashboard-language) | What | Value | | ---------- | ------------------------------------------------------------------- | | Where | The language menu in the top bar, next to your avatar. | | Languages | English, Deutsch, Español, Français, Italiano, Nederlands, Русский. | | Default | Your browser’s language when it is one of these, otherwise English. | | Remembered | Per browser. | This sets the dashboard only. The widget’s language is set per project: see [Languages and currency](/widget/languages-currency/). Next: [See your plan and usage](/account/billing/), or [manage API keys](/project/api-keys/). # Your own Ask AI button > For developers: open the assistant from any element on your page with one script attribute, a method call or a window event. Source: https://docs.typemo.com/ai-assistant/ask-ai-button/ **For developers.** Typemo adds no chat button to your page. The chat opens from **Ask AI** in the search widget, or from your own element or code. This page lists the three ways to open it yourself. All three work only while the assistant is on, with or without the search widget. ## The `data-ai-trigger` attribute [Section titled “The data-ai-trigger attribute”](#the-data-ai-trigger-attribute) Add `data-ai-trigger` to your install snippet, with a selector for your button: ```html ``` | Behaviour | Detail | | -------------------- | ------------------------------------------------------------------------------------------------------------- | | Value | A CSS selector that starts with `#`, `.` or `[`, or a bare element id such as `ask-ai-button`. | | Click | Opens the chat; a second click closes it. The click’s default action, such as following a link, is cancelled. | | Several matches | Every element the selector matches opens the chat, such as a desktop and a mobile button. | | Elements added later | Not bound: the selector is read once, when the assistant loads. Open the chat from code instead. | | Hover or focus | The first one loads the chat in advance, so it opens without a wait. | | The search overlay | Stays closed until the visitor clicks a category link under an answer. | Every other script attribute is listed in [Embed options](/widget/embed-options/). ## Methods [Section titled “Methods”](#methods) | Call | What it does | | --------------------------------- | ---------------------------------------------------- | | `typemoAssistant.open(question?)` | Opens the chat. With a question, asks it right away. | | `typemoAssistant.close()` | Closes the chat. | | `typemoAssistant.toggle()` | Opens or closes it. | | `typemoInstance.openChat()` | The catalog search widget’s way to open the chat. | | `typemoDocsInstance.openChat()` | The docs search widget’s way to open the chat. | `window.typemoAssistant` exists once the assistant script has loaded. The loader adds that script only while the assistant is on. ## Events [Section titled “Events”](#events) The search widget and the assistant are separate scripts. They talk through events on `window`, and your page can send or hear each one. | Event | Sent by | Heard by | | ------------------------ | ------------------------------- | -------------------------------- | | `typemo:assistant:open` | The search widget, or your page | The assistant | | `typemo:assistant:close` | The search widget, or your page | The assistant | | `typemo:assistant:state` | The assistant | The search widget, and your page | | `typemo:search:open` | The assistant, or your page | The catalog search widget | ### `typemo:assistant:open` [Section titled “typemo:assistant:open”](#typemoassistantopen) ```js window.dispatchEvent( new CustomEvent('typemo:assistant:open', { detail: { query: 'Which size should I order?' } }) ); ``` | `detail` field | Type | What it does | | -------------- | ------ | ------------------------------------------------------------------ | | `query` | string | Optional. The question the chat asks as soon as it opens. | | `collectionId` | string | Optional. The collection the chat starts in, as a search tab does. | ### `typemo:assistant:close` [Section titled “typemo:assistant:close”](#typemoassistantclose) Closes the chat. It carries no `detail`. ### `typemo:assistant:state` [Section titled “typemo:assistant:state”](#typemoassistantstate) Sent each time the chat opens or closes. The search widget’s **AI Assistant** button shows itself pressed while the chat is open, and a second press closes it. Your own button can do the same. ```js window.addEventListener('typemo:assistant:state', (e) => { myButton.setAttribute('aria-pressed', String(e.detail.open)); }); ``` | `detail` field | Type | What it says | | -------------- | ------- | ------------------------------ | | `open` | boolean | `true` while the chat is open. | ### `typemo:search:open` [Section titled “typemo:search:open”](#typemosearchopen) A category link under an answer sends it. It opens the search overlay with exactly what it carries. | `detail` field | Type | What it does | | -------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------- | | `collectionId` | string | The collection to show. | | `pins` | string\[] | Item ids shown first. | | `pinsOnly` | boolean | `true` shows only the pinned items. | | `facets` | `Record` | Filter values to apply, by field. | | `price` | `{ field: string, min: number \| null, max: number \| null }` or `null` | A price range to apply. | | `query` | string | Optional. Opens search on this query instead of the pinned items. | ## Add to cart [Section titled “Add to cart”](#add-to-cart) Product rows in an answer fire the same `typemo:add-to-cart` event on `document` as the search results, so one cart handler serves both. See [Events](/widget/events/). Next: [Handle add to cart](/widget/events/), or [see every embed option](/widget/embed-options/). # AI Assistant > A chat in your widget that answers from your own catalog and content: how it finds an answer, what visitors see and what is stored. Source: https://docs.typemo.com/ai-assistant/overview/ The AI Assistant is a chat inside your widget that answers from your own catalog and content. It searches your collections, reads what comes back and answers from that alone. On a store it recommends and compares products; on a docs site it answers and cites the pages it used. ![The catalog search overlay for reading lamp with the assistant docked on the right: the shopper's question about a lamp under €80, the answer naming two lamps, and its list of recommended products with prices](/_astro/chat.moVAMPou_1jpk7n.webp) The assistant docked beside search ## How it finds an answer [Section titled “How it finds an answer”](#how-it-finds-an-answer) 1. **It searches.** It searches your collections through the same search as your widget, so your [boosting rules](/merchandising/boosting/), [custom results](/merchandising/custom-results/) and [exclusions](/search/exclusions/) apply. 2. **It reads.** It reads the items that come back, together with your [knowledge snippets](/ai-assistant/setup/#add-knowledge). 3. **It answers from what it read.** When your content doesn’t cover the question, it says so instead of guessing. [What the assistant reads](/ai-assistant/what-it-reads/) lists which collections it searches and which fields it reads. ### What shapes the search [Section titled “What shapes the search”](#what-shapes-the-search) * **The page.** The assistant knows the page the chat was opened on, so “how is this used?” on a product page is about that product. * **A budget.** “Under 50” becomes a price filter when a column has the **Price** role, and “the cheapest” sorts by price. * **Stock.** With a column marked **In stock**, products in stock come first among the matches. ### What it declines [Section titled “What it declines”](#what-it-declines) It writes no essays or poems, and it repeats instructions only when your content spells them out. Otherwise it points to the guide that has them. ## What the visitor sees [Section titled “What the visitor sees”](#what-the-visitor-sees) **AI Assistant** in the search field opens the chat with what the shopper typed, and so does `⌘`/`Ctrl`+`Enter`; a second press closes it. On docs sites, the **Ask AI Assistant** row above the results opens it with the question the reader just typed. The chat docks to the right and pushes the page aside; on phones it fills the screen. An answer can hold: * **The answer itself**, a few sentences that come first. * **Recommended products**, as one list in the order the answer names them: photo, price, a line on why each fits and an add-to-cart button. **Show more** lists further products that fit. * **A comparison table**, built from the items’ own data, when the visitor compares. * **One short question** with answers to tap, when the best item depends on something the visitor hasn’t said. The best matches still come first. * **Category links** that open the rest of the matches in search, when the widget has search. * **Sources**: links to the pages the answer used. * **Follow-up questions**, and thumbs to rate the answer. * **A contact form**, when the visitor asks for a person and you [turned the form on](/ai-assistant/setup/#let-visitors-contact-you). Before the first question, the empty chat shows your [starter questions](/ai-assistant/setup/#shape-its-answers). ![One answer in the chat: the question, the reply with linked product names, four recommended lamps with prices and Show 3 more, and category links below](/_astro/answer.fN2kPWJU_Z1gX7wB.webp) One answer and its products ## Language [Section titled “Language”](#language) The assistant answers in the visitor’s language, whatever language your catalog is in. It takes the language from the visitor’s first message; a message too short to tell keeps the browser’s language. The visitor can change it under the message box. ## What is stored [Section titled “What is stored”](#what-is-stored) | What | Where | Kept | | -------------------------------------------------------------------------------------- | --------------------- | ---------------------- | | The visitor’s last 20 chats, so they can return to one | The visitor’s browser | 30 days | | What a chat looked up (its searches and the items it read), so follow-ups have context | Typemo | 30 days after last use | | Each conversation, for **AI Assistant → Conversations** in your dashboard | Typemo | 3 months | | The email a visitor leaves in the contact form, with the conversation | Typemo and your inbox | 3 months at Typemo | From the chat’s menu, the visitor can download the chat as a JSON file: the easiest way for a customer to send you a conversation. **Conversations** shows each chat as the visitor saw it, with the searches the assistant ran and the visitor’s ratings. A chat still in progress is marked **Live**. **Export JSON** downloads the last 30 days. ## Transparency [Section titled “Transparency”](#transparency) The line under the message box tells the visitor that replies are AI-generated, and every assistant message carries `data-ai-generated="true"` in the page. Both follow article 50 of the EU AI Act. Try it here Press `⌘K` on this site and ask a question: these docs run the same assistant. Next: [Set up the assistant](/ai-assistant/setup/), or put an [Ask AI button](/ai-assistant/ask-ai-button/) anywhere on your page. # Set up the assistant > Turn the assistant on, then give it your rules, starter questions and the facts it can quote. Source: https://docs.typemo.com/ai-assistant/setup/ Turn the assistant on, then give it what only you know: your rules, your policies and the questions visitors ask first. One assistant serves the whole project, so every collection shares these settings. ## Before you start [Section titled “Before you start”](#before-you-start) * **Map a Content column** in each collection the assistant should read. Without one it has no descriptions to answer from. See [What the assistant reads](/ai-assistant/what-it-reads/#fields-per-item). * **Each conversation counts as an AI session** on your plan. See [Plans and billing](/account/billing/). ## Turn it on [Section titled “Turn it on”](#turn-it-on) 1. Open **AI assistant** in the dashboard sidebar. 2. Click **Turn on AI Assistant**. The assistant is now live in your widget. The same install snippet loads it, so there is nothing to add to your site. The chat takes its colours, font and corners from **Search → Look**, so it matches your search window. It has no theme settings of its own. ![The AI assistant page turned on: the Assistant card with its switch, Model, Guidance and Starter questions, and the Knowledge card below](/_astro/settings.BBDxAlAi_Z1hQ1zN.webp) AI assistant, turned on ## Shape its answers [Section titled “Shape its answers”](#shape-its-answers) 1. On the **AI assistant** page, set the fields in the **Assistant** card. Each is described in the table below. 2. Click **Save changes** in the bar at the bottom of the page. | Setting | What it does | Limit or default | | --------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------- | | **Assistant** | Turns the chat on or off for the whole widget. | Off until you turn it on | | **Model** | The model that writes the answers: Claude Haiku 5.5, GPT-6 Luna or DeepSeek V4.1 Flash. Every model is included in your plan; answers differ in speed and style. | Claude Haiku 5.5 | | **Guidance** | Rules only you know, one per line: what to suggest together, what never to recommend. Facts such as shipping and returns go in **Knowledge** instead. | 2,000 characters | | **Starter questions** | Buttons in the empty chat. One click asks the question. | Up to 4 questions, 120 characters each | | **Contact form** | Lets a visitor leave their email for an answer. See [Let visitors contact you](#let-visitors-contact-you). | Off | ### How guidance works [Section titled “How guidance works”](#how-guidance-works) The assistant follows your guidance in what it recommends and what it says about your store. For example: *Suggest the care kit with every leather bag.* Guidance can’t change the reply language or format. No rule makes the assistant state something your catalog or knowledge doesn’t say. ### Where starter questions show [Section titled “Where starter questions show”](#where-starter-questions-show) * **The empty chat** shows up to five questions: yours first, then the follow-up questions visitors click most. With neither, it shows your popular searches. * **On a docs site**, the same questions also show in the search panel. They appear on its start screen, and under **Ask AI Assistant** when they match what the reader types. ## Let visitors contact you [Section titled “Let visitors contact you”](#let-visitors-contact-you) The contact form lets a visitor reach you when the assistant can’t help: they leave their email, and you answer by email. 1. In the **Assistant** card, check **Contact form**. 2. Under **Send to**, enter the email that receives the messages. 3. Click **Save changes**. The assistant shows the form under its reply when a visitor asks for a person, or needs something only you can do. A visitor can also open it from the chat’s menu with **Contact form**. Each request arrives as an email from Typemo, with the conversation so far and a link that opens it under **Conversations**. Reply to it as to any email: the reply goes to the visitor. In **Conversations**, the conversation shows the visitor’s email. | Limit | Value | | -------------------- | --------------------------------------------- | | Sends per visitor | 3 an hour | | When the form works | Within an hour of the visitor’s last question | | Visitor email stored | 3 months, with the conversation | ## Add knowledge [Section titled “Add knowledge”](#add-knowledge) Knowledge snippets hold the facts the assistant can quote: shipping costs, return windows, contact details. It reads them with every answer. 1. In the **Knowledge** card, click **Add snippet**. 2. Enter a **Title** and the **Content**, then click **Add snippet**. To change or remove a snippet, open the **…** menu on its row and pick **Edit** or **Delete**. Snippets save on their own; they don’t wait for **Save changes**. | Limit | Value | | ---------------- | ------------------------------------------------------------------------ | | Snippets | 50 | | Title | 200 characters | | Content | 4,000 characters | | Read per answer | 8,000 characters of titles and content together, snippets in title order | | Past that budget | The snippet is marked **Not read**: shorten or remove a snippet above it | ![The Knowledge card with four snippets, Contact us, Returns, Shipping and delivery and Warranty, each with its update date and actions menu, and Add snippet at the top right](/_astro/knowledge.B6Ftg0Gb_ZGen7d.webp) The Knowledge card ## Run it without the search widget [Section titled “Run it without the search widget”](#run-it-without-the-search-widget) The install snippet loads the search widget and the assistant together. To run the assistant alone: 1. Open **Search → Setup**. 2. Under **What you are building**, pick **API only**, then save. The snippet now loads only the assistant. It reads the fields picked on **Search → Setup** and takes its theme, currency and cart button from **Search → Look**. Its answers have no category links, since there is no search to open. To open the chat from your own button, see [Your own Ask AI button](/ai-assistant/ask-ai-button/). ## Turn it off [Section titled “Turn it off”](#turn-it-off) 1. Turn off the **Assistant** switch and click **Save changes**. 2. Confirm with **Turn off**. Visitors stop seeing the chat. Your guidance, starter questions and snippets are kept for when you turn it on again. ## Check it worked [Section titled “Check it worked”](#check-it-worked) 1. Open **Preview** in the sidebar and click **Ask AI**. 2. Ask one of your starter questions, then a question a snippet answers. The answer should quote your snippet. The conversation then shows under **Conversations** on the **AI assistant** page. ## Tips [Section titled “Tips”](#tips) * **Leave the tone to the assistant.** It already answers warmly and briefly. Use guidance for what only you know, such as which products go together. * **Write one snippet per policy.** Shipping, returns and contact details each fit in one. * **Take starter questions from your top queries.** The **Top queries** tab in [Search performance](/analytics/search-performance/#top-queries) is a ready list. Next: [What the assistant reads](/ai-assistant/what-it-reads/), or [open the chat from your own button](/ai-assistant/ask-ai-button/). # What the assistant reads > Which collections the assistant searches, which language version it picks and which fields of an item it reads. Source: https://docs.typemo.com/ai-assistant/what-it-reads/ The assistant answers only from what it reads. This page lists which collections it searches, which language version of a collection it picks and which fields of an item it sees. ## Collections [Section titled “Collections”](#collections) The assistant can search every collection of the project, including collections hidden from the widget’s tabs. | Collection | When the assistant searches it | | -------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | | The collection the chat starts in | With every question. It is the search tab the visitor opened the chat from, else the first tab in the chat’s language. A hidden collection is never it. | | On a store, collections without a **Price** column, such as pages and FAQs | Beside every search of a collection in the same language. Their best matches show as source links under the answer, never as product cards. | | Every other collection | Only when the visitor asks for something the first collection can’t hold. | With several product collections, map **Category** in each one under **Search → Setup → Fields**, so the assistant can tell them apart. ## Besides your collections [Section titled “Besides your collections”](#besides-your-collections) | Source | What the assistant takes from it | | ------------------ | -------------------------------------------------------------------------------------------------------- | | Knowledge snippets | Read with every answer, within the budget in [Set up the assistant](/ai-assistant/setup/#add-knowledge). | | The page | The address of the page the chat is open on, without its query string, and the page’s title. | ## Language versions [Section titled “Language versions”](#language-versions) Link collections that hold the same content in different languages, such as an English help centre and its German translation. The assistant then answers from the translation in the chat’s language. AI assistant → Languages card while editing: an English collection with its German version linked as a badge, and the Add popover open on a search list of collections100% × 360px AI assistant → Languages card while editing: an English collection with its German version linked as a badge, and the Add popover open on a search list of collections | Rule | Detail | | ------------------------- | -------------------------------------------------------------------------------------------------------- | | Where you set it | **AI assistant → Languages**: click **Link translations**, then **Add** next to the original collection. | | When the card shows | Only when your collections are in more than one language. | | Which version answers | The one in the chat’s language. A collection without one is searched as it is. | | The chat’s own collection | Kept whatever the language: the tab the visitor came from stays the one searched first. | | What a version can be | A collection in another language than its original, one version per language. | | Depth | One level: a version can’t have versions, and a collection with versions can’t become one. | | Who reads it | Only the assistant. Search tabs and results don’t change. | To set a collection’s own language, see [Search language](/search/language/). ## Fields per item [Section titled “Fields per item”](#fields-per-item) The assistant reads the fields you map under **Search → Setup → Fields**, with the collection picked. It has no fields of its own. | Field | What the assistant does with it | Read when | | ------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------- | | **Title** | Names the item in the answer. | Always | | **Content** | Answers from it: the passages about what was asked. | Mapped | | **URL** | Where a product card or a source link leads. | Mapped | | **Image URL** | The picture on a product card. | Mapped | | **Price** | Quotes it, and filters by it when the visitor names a budget. | Mapped | | **Sale price** | Quotes it beside the price, only when it is a real reduction. | Mapped | | **In stock** | Puts products in stock first and calls the rest unavailable. An empty value counts as in stock. | Mapped | | **Rating** | Quotes and compares it. | Mapped | | [Filters](/fields/filters/) | Reads each item’s values under the filter’s name. The category links under an answer come from them too. | The first six on the **Filters** card | | [Custom roles](/fields/custom-roles/) | Reads the column with the meaning you wrote for it. | Every custom role | | Variants | Reads each variant’s price, reduction and stock, and gives the product a price range. | With [variant grouping](/fields/variant-grouping/) | A column that is both a filter and a custom role is read once, with its meaning. A comparison table shows the price, the rating, then every filter and custom role, under the names you gave them. If a fact lives in a column that is none of these, the assistant can’t cite it. Describe that column under **Custom roles**. Map Content first With no column marked **Content**, the assistant sees only titles, prices and filter values. It still finds the right products, but asked how one works, it has no description to answer from. Check **Content** under **Search → Setup → Fields** for each collection before anything else. ## Passages around the question [Section titled “Passages around the question”](#passages-around-the-question) In a long text, the assistant reads the passages about what the visitor asked, wherever they sit. A detail in the middle of a long description still reaches the answer. A custom role on a text column, such as a short description, is read the same way. When nothing it read holds a detail, the assistant says the detail isn’t in what it has. It doesn’t guess a figure. Next: [Set up the assistant](/ai-assistant/setup/), or [map your fields](/fields/map-fields/). # AI Insights > The AI Search improvements card: what Typemo changed in your search on its own, which queries it is watching, and how to undo a learned word. Source: https://docs.typemo.com/analytics/insights/ **AI Search improvements**, next to the [Search score](/analytics/overview/#search-score) on **Stats**, reports what Typemo changed in your search on its own. It also lists the queries Typemo is still watching. Nothing on the card waits for you; **Undo** takes back a learned word. ![AI Search improvements beside the Search score: under Changes, an Alternative names entry saying documents were made easier to find, and the Watching table with two queries, one with no results and one with low engagement](/_astro/insights.DBZPhIk8_1HOEwM.webp) AI Search improvements ## Changes [Section titled “Changes”](#changes) A timeline of what is in effect now in the page’s collection, whatever the date range. Each entry shows only once that kind of change has happened. | Entry | What changed | Where it comes from | | ------------------------------------ | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- | | **Put N frequent searches in order** | The best matches for these searches now come first. The latest few are listed, then **+N more**. | [Smart ranking](/search/ranking/#smart-ranking), while it is on | | **Made N documents easier to find** | They now show up for more of the words people search with. | [Alternative names](/search/ranking/#alternative-names) from your catalog | | **Learned words from searches** | Each word now finds the document visitors picked after searching it, listed as *word* → *document*. The newest five show. | Alternative names from searches | | **Dropped N learned words** | Learned words that nobody clicked were taken back. | Alternative names from searches | **Undo** on a learned word removes it for good: Typemo never learns that word for that document again. With no change yet, the timeline shows **No changes yet**. Typemo works through new searches every night. ## Watching [Section titled “Watching”](#watching) Queries that still underperform in the date range, with their reason and how many searches they had. | Reason | What it means | | -------------- | ------------------------------------- | | **No results** | Most of its searches find nothing. | | **Visibility** | Its clicks land far down the results. | | **Engagement** | Few of its searches end in a click. | | Rule | Detail | | -------------------- | ----------------------------------------------------------------------------------------------------------------------- | | Shown | The top three. **Watching · N** counts them all. | | Order | Biggest loss first: by estimated lost revenue when your order page reports purchases, else by searches without a click. | | Too few searches | A query needs five searches in the range. Below that it counts in **N more queries collecting data**. | | Handled queries | A query with a custom result or a synonym leaves the list. | | Period and filters | The page’s collection and device filters, and the last 90 days of the date range at most. | | **View all queries** | Opens **Top queries** in the [Queries card](/analytics/search-performance/). | | Nothing to watch | **Watching** shows **No queries to watch**. | When there are neither changes nor watched queries, the whole card shows **Nothing to change yet**. When to step in A watched query with **No results** is often something you don’t sell. If you do sell it, use **Fix** on the [Zero result](/analytics/search-performance/#zero-result) tab to add a synonym from the visitor’s word to yours. Next: [fix a query yourself](/analytics/search-performance/), or read about [alternative names](/search/ranking/#alternative-names). # Analytics overview > The Stats page: its filters, the search activity chart, the eight key metrics and the Search score. Source: https://docs.typemo.com/analytics/overview/ **Home** in the sidebar opens **Stats**: how much people search and whether they find what they type. This page defines every number in its top half. The query tables at the bottom are in [Search performance](/analytics/search-performance/). ![Home → Stats for the last 7 days: the Search activity chart with daily bars stacked by device and the total split into desktop, mobile and other, beside eight Key metrics cards, with the collection, device and date filters at the top right](/_astro/overview.XRcYdUW5_26BhMV.webp) Stats, top half ## How searches are counted [Section titled “How searches are counted”](#how-searches-are-counted) * **The widget counts one search per query** a visitor settles on, not one per keystroke. * **Every API search counts.** * **No cookies, no IP addresses.** A visitor session lives in the browser tab and ends when the tab closes. ## Filters [Section titled “Filters”](#filters) The controls at the top right apply to every number on the page. | Control | What it does | Default | | ----------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------- | | Collection | Which collection the page covers. Shows only when the project has two or more. | The first collection | | Devices | **Desktop**, **Mobile** and **Other**, in any mix. **Other** is a search without a browser, mostly your own server calling the API. | **All Devices** | | Date range | From **Last 24 hours** to **Last 24 months**, or dates on the calendar. Days run 00:00–24:00 UTC. **Last 24 hours** is the 24 hours up to now. | **Last 7 days** | | **Compare** | Compares the range with one you pick. | Off: the previous period of the same length | ## Search activity [Section titled “Search activity”](#search-activity) The chart shows searches over the range, stacked by device, with the total and each device’s share. | Range | One bar per | | ------------------- | ----------- | | Up to 2 days | Hour | | Up to 60 days | Day | | Longer than 60 days | Month | ## Key metrics [Section titled “Key metrics”](#key-metrics) A card with a change shows it against the comparison period, marked **vs previous**. The other cards show a hint instead. | Card | What it counts | Change shown | | ---------------- | ----------------------------------------------------------------------------------------- | --------------------------------- | | **CTR** | Clicks divided by the searches a visitor could click, capped at 100%. | Percentage points | | **Total clicks** | Clicks on search results. | None | | **Ø Results** | The share of all searches that found nothing. | Percentage points; a fall is good | | **Conversions** | Purchased items your order page reports. | None | | **Revenue** | The value of those items, one figure per currency. Currencies are never added up. | None | | **Sessions** | Visitor sessions with at least one search. | Percent | | **Per session** | Searches per session. A high value can mean visitors keep rephrasing. | None | | **Avg position** | The average place of the clicked results. 1.0 means every click went to the first result. | Places; a fall is good | ### Searches a visitor could click [Section titled “Searches a visitor could click”](#searches-a-visitor-could-click) These are the widget’s searches and API searches that carry a visitor session. An API search without one, such as a call that fills a block on your pages, can’t be clicked. It stays out of **CTR** and the Search score but counts in **Ø Results**. ### Conversions and revenue [Section titled “Conversions and revenue”](#conversions-and-revenue) **Conversions** and **Revenue** stay at zero until your order page reports purchases. The call is described in [Reporting purchases](/widget/events/#report-purchases). A reported item that was clicked in search in the 48 hours before the order is also tied to the query. ## Search score [Section titled “Search score”](#search-score) The gauge next to **AI Search improvements** turns the range into one number from 0 to 100. It weighs click-through, how high in the results visitors click, and the share of searches that find nothing. The **?** beside its title shows each signal’s value and score. | Status | Score | | ------------------- | ----------------------------------------------------------------------------------- | | **Collecting data** | Fewer than 20 searches in the range besides **Not counted** ones; no score is shown | | **Needs attention** | Under 40 | | **On track** | 40 to 69 | | **Healthy** | 70 or more | Under the gauge, the range’s searches are split by how they ended. The four lines add up to the range’s searches. | Line | What it counts | | --------------- | ------------------------------------------------------------------------------------------ | | **Clicked** | Searches with results that got a click. | | **No click** | Searches with results that got none. | | **No results** | Searches that found nothing. | | **Not counted** | API searches without click tracking. Shown only when there are any; left out of the score. | Next: find the queries behind a number in [Search performance](/analytics/search-performance/), or see what Typemo changed on its own in [AI Insights](/analytics/insights/). # Search performance > The Queries tables on Stats: top queries, the most-clicked documents, searches that found nothing or got few clicks, and what Fix does. Source: https://docs.typemo.com/analytics/search-performance/ The **Queries** card at the bottom of **Stats** shows what visitors type and what they click. Its four tabs list the queries behind the numbers in the [overview](/analytics/overview/), and two of them carry a **Fix** button. ![The Queries card on the Top queries tab: ten queries with Searches, Clicks, CTR, Avg pos and Growth, one with a growth badge, the Filter… box at the top right and pagination below](/_astro/top-queries.qkVH7gc8_Z1D7v4w.webp) Queries → Top queries ## What every tab shares [Section titled “What every tab shares”](#what-every-tab-shares) | Rule | Detail | | ----------- | -------------------------------------------------------------------------------------------------------- | | Filters | The page’s collection, device and date filters apply. | | Period | The last 90 days of the date range at most. A longer range shows its last 90 days here. | | Queries | Queries of three characters or more. | | Rows | Up to 1,000 per tab. | | **Filter…** | Keeps the queries that contain your text. On **Documents**, it matches the document’s id, not its title. | ## Top queries [Section titled “Top queries”](#top-queries) The most-searched queries in the range. A handful usually carries most of your traffic, so a fix to a top row reaches the most visitors. | Column | What it shows | | ------------ | ------------------------------------------------------------------------------------------------------ | | **Searches** | How often the query was searched. | | **Clicks** | Clicks on its results. | | **CTR** | Clicks divided by the searches a visitor could click, capped at 100%. | | **Avg pos** | The average place of its clicked results. | | **Growth** | Searches per day against the period of the same length just before. A query new in the range has none. | A top query with a **CTR** far below your average deserves a run in [Test your search](/search/test/). A query that grows fast is worth a [custom result](/merchandising/custom-results/) before it peaks. ## Documents [Section titled “Documents”](#documents) The most-clicked documents, with the queries that sent the clicks. | Column | What it shows | | ---------------- | ----------------------------------------------------------------------------------- | | **Document** | The document’s title. | | **Clicks** | Clicks on it from search. | | **Avg pos** | The average place it held when clicked. | | A click on a row | Opens **Search queries that led to this document**, each with its clicks and place. | ![The Documents tab with one product expanded into Search queries that led to this document: three queries, each with its clicks and average place](/_astro/documents.BJO3zHHH_ZUf88u.webp) Queries → Documents, one row open | What you see | What it means | What to do | | ----------------------------------------- | --------------------------------------- | ----------------------------------------------------------------------------- | | Many clicks near place 1 | It ranks where people expect it. | Nothing. | | Many clicks at place 4 or further down | People scroll past other results to it. | [Boost](/merchandising/boosting/) it, or pin it with a custom result. | | An expected bestseller missing | It isn’t being found. | Search for it, and check that its title and text use the words visitors use. | | A query you never thought of sends clicks | Visitors use another word for it. | Add a [synonym](/search/synonyms/) so the rest of the catalog matches it too. | | A query’s clicks land on the wrong item | Ranking puts another item first. | Pin the right item with a [custom result](/merchandising/custom-results/). | ## Zero result [Section titled “Zero result”](#zero-result) Queries that found nothing, with how often they were searched. **Fix** opens a new synonym for the page’s collection, with the query filled in. Add the word your catalog uses for it. Typemo also learns [alternative names](/search/ranking/#alternative-names) from searches that end in a click, so some rows fix themselves. Some queries are things you don’t sell. They are feedback on your range, not a search problem. ## No clicks [Section titled “No clicks”](#no-clicks) Queries that show results but rarely get a click. **Fix** opens a new [custom result](/merchandising/custom-results/) for the query in the page’s collection, so you can put the right items first. Before you fix one, run the query in [Test your search](/search/test/). Sometimes the results are right and the items don’t appeal, from photos to prices. No ranking change solves that. A query you fix on either tab also leaves **Watching** in [AI Insights](/analytics/insights/). Next: see what Typemo already fixed on its own in [AI Insights](/analytics/insights/), or [add a synonym](/search/synonyms/). # API basics > Base URLs and regions, how each API takes a key, key types, the error format, rate limits and paging. Source: https://docs.typemo.com/developers/api-basics/ Typemo has two HTTP APIs: the management API for collections, documents and settings, and the search API that answers searches. This page lists what they share and where they differ. To write data, start with [Push over the API](/import/api-push/) or [Index your build](/import/index-your-build/). ## Base URLs [Section titled “Base URLs”](#base-urls) | API | Base URL | What it serves | | ---------- | ------------------------------ | ----------------------------------------------------------------------------------------------- | | Management | `https://api.typemo.com/v1` | Collections, documents, synonyms, stopwords, custom results, boost rules, knowledge, analytics. | | Search | `https://search.typemo.com/v1` | Search, suggestions and analytics events. See [Search API](/developers/search-api/). | | MCP | `https://api.typemo.com/mcp` | AI agents. See [Connect an AI agent](/developers/mcp/). | Every endpoint, with its request and response schemas, is in the [API reference](/api-reference/). Its OpenAPI document is at `https://api.typemo.com/v1/openapi.json`. ## Regions [Section titled “Regions”](#regions) A project’s search runs in one region, chosen when the project is created. **Project settings** shows it as **Search region**. Moving a project to another region takes a migration by Typemo. The management API has one address for every region. `search.typemo.com` reaches every region. When your project runs in another region than the one that answers, the request gets a `307` redirect to your region’s address. | Caller | What to do | | ----------------------------- | ---------------------------------------------------------------------------------------------------- | | Your server, a script, `curl` | Follow the redirect. Most HTTP clients do; `curl` needs `-L`. | | A browser | Call your region’s address directly. `searchUrl` in `https://search.typemo.com/init/{key}` names it. | A browser sends `Origin: null` after a cross-site redirect, and no [allowed domains](/project/security/#widget-allowed-domains) list admits it. The widget reads `searchUrl` for this reason. ## Authentication [Section titled “Authentication”](#authentication) Every request carries an API key from [API keys](/project/api-keys/). Keys start with `sq_`. | How you send it | Management API | Search API | MCP | | ----------------------------------- | -------------- | --------------------------------------------- | ----------------------------------------------- | | `X-API-Key: sq_…` header | Yes | Yes | Yes | | `Authorization: Bearer sq_…` header | Yes | Yes | Yes | | `?key=sq_…` query parameter | No | Read only keys; a Write & Read key gets `401` | No: a Read only key goes at the end of the path | | A sign-in (OAuth access token) | Yes | No | Yes | When a request carries more than one, `X-API-Key` wins, then the `Authorization` header, then `?key=`. Never put a Write & Read key in a URL URLs end up in proxy, CDN and server logs. Send a Write & Read key in a header, and keep it on your server. ### Key types [Section titled “Key types”](#key-types) | Key | It can | Where it belongs | | ------------ | --------------------------------------------------------------------------------------------------------------------------- | ------------------------------------- | | Read only | Search, read suggestions, send analytics events, read synonyms, stopwords, custom results, boost rules and knowledge. | Browsers, apps, the widget: anywhere. | | Write & Read | All of that, plus push and delete documents, change merchandising, read analytics, and call the AI assistant from a server. | Your server only. | A key can also be limited to one collection; any other collection refuses it. Project settings and collection settings are never editable with a key. [API keys](/project/api-keys/#pick-the-scope) has the full table. A request from a browser carries an `Origin` header. The search API answers it only when the site is on the project’s [allowed domains](/project/security/#widget-allowed-domains). A request without an `Origin`, from your server, needs the key alone. ## Errors [Section titled “Errors”](#errors) Every error has the same shape. `param` names the input at fault, when there is one: ```json { "error": { "code": "BAD_REQUEST", "message": "sort: Expected \"field:asc\" or \"field:desc\"", "param": "sort" } } ``` | Status | `code` | When | | ------ | --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `400` | `BAD_REQUEST` | An input is missing, has the wrong type, or names a field the collection doesn’t have. | | `400` | `VALIDATION_FAILED` | A document push holds an invalid document. Nothing is indexed, and `report` lists each document’s problem. | | `401` | `UNAUTHORIZED` | No key, an unknown or revoked key, a Read only key on a write, or a Write & Read key in a URL. On the search API, also a key that can’t reach the collection. | | `403` | `FORBIDDEN` | The browser’s site is not on the allowed domains, an IP or country rule blocks the caller, or a plan limit is reached. | | `404` | `NOT_FOUND` | The collection or document doesn’t exist. On the management API, also a collection the key can’t reach. | | `409` | `CONFLICT` | A sync or another import is writing to the collection. Retry shortly. | | `413` | `PAYLOAD_TOO_LARGE` | A snapshot is over 50 MB unzipped. | | `429` | `RATE_LIMITED` | Over the rate limit. `Retry-After` says how many seconds to wait. | | `503` | `SERVICE_UNAVAILABLE` | The project’s search is unavailable. | ## Rate limits [Section titled “Rate limits”](#rate-limits) The two APIs count differently and name their headers differently. | API | What is counted | Headers | | ---------- | ------------------------------------------------------- | -------------------------------------------------------------------------------------- | | Search | Requests per minute from one IP address, per collection | `X-RateLimit-Limit`, `X-RateLimit-Reset`; on a `429`, `Retry-After` | | Management | Requests per caller (key, user or IP), per endpoint | `RateLimit-Limit`, `RateLimit-Remaining`, `RateLimit-Reset`; on a `429`, `Retry-After` | `X-RateLimit-Reset` and `RateLimit-Reset` are Unix times in seconds. The search limit is the same for every project, and a cached answer counts like any other: see [Rate limiting](/project/security/#rate-limiting). The management endpoints that write documents have their own limits: | Endpoint | Limit | | ---------------------------------------------------------- | ------------------- | | `POST /collections/{id}/documents` (push) | 100 a minute | | `POST /collections/{id}/documents/delete` | 100 a minute | | `GET /collections/{id}/documents/{documentId}` | 200 a minute | | `DELETE /collections/{id}/documents/{documentId}` | 200 a minute | | `PUT /collections/{id}/documents` (replace every document) | 15 every 10 minutes | | `POST /collections/{id}/source/sync` | 5 every 10 minutes | ## Paging [Section titled “Paging”](#paging) | API | Parameters | Response | | ---------- | ----------------------------------------------------- | ----------------------------------------------- | | Management | `page` from 1, default 1; `perPage` 1–100, default 20 | `{ "data": [...], "page", "perPage", "total" }` | | Search | `page` from 1, default 1; `perPage` 1–100, default 10 | `found` is the total; `hits` holds the page | Analytics lists add a `meta` object to the management shape. Next: [Search API](/developers/search-api/) to query a collection, or the [TypeScript SDK](/developers/sdk/) to call both APIs from one client. # InstantSearch > Run InstantSearch.js, React, Vue or Svelte InstantSearch on a Typemo collection by swapping the search client. Source: https://docs.typemo.com/developers/instantsearch/ To build your own search UI from InstantSearch widgets, give InstantSearch Typemo’s search client. The adapter `@typemo-org/instantsearch-adapter` turns InstantSearch’s requests into Typemo searches and its click and purchase events into Typemo analytics. If your UI already runs on InstantSearch, the search client is the only thing that changes. ## Before you start [Section titled “Before you start”](#before-you-start) * A collection with documents, and its id. * A **Read only** key from [API keys](/project/api-keys/). The key rides in the request URL, so the adapter refuses a Write & Read key. * Your site listed under [Security](/project/security/): a Read only key answers only there. * Every attribute you filter by set as a filter on **Search → Setup** ([Filters](/fields/filters/)). ## 1. Install the adapter [Section titled “1. Install the adapter”](#1-install-the-adapter) Install it next to your InstantSearch flavour. * InstantSearch.js * npm ```sh npm i @typemo-org/instantsearch-adapter instantsearch.js ``` * pnpm ```sh pnpm add @typemo-org/instantsearch-adapter instantsearch.js ``` * yarn ```sh yarn add @typemo-org/instantsearch-adapter instantsearch.js ``` * bun ```sh bun add @typemo-org/instantsearch-adapter instantsearch.js ``` * React ```sh npm i @typemo-org/instantsearch-adapter instantsearch.js ``` * Vue ```sh pnpm add @typemo-org/instantsearch-adapter instantsearch.js ``` * Svelte ```sh yarn add @typemo-org/instantsearch-adapter instantsearch.js ``` * npm ```sh bun add @typemo-org/instantsearch-adapter instantsearch.js ``` * pnpm * npm ```sh npm i @typemo-org/instantsearch-adapter react-instantsearch ``` * pnpm ```sh pnpm add @typemo-org/instantsearch-adapter react-instantsearch ``` * yarn ```sh yarn add @typemo-org/instantsearch-adapter react-instantsearch ``` * bun ```sh bun add @typemo-org/instantsearch-adapter react-instantsearch ``` * yarn ```sh npm i @typemo-org/instantsearch-adapter react-instantsearch ``` * bun ```sh pnpm add @typemo-org/instantsearch-adapter react-instantsearch ``` * npm ```sh yarn add @typemo-org/instantsearch-adapter react-instantsearch ``` * pnpm ```sh bun add @typemo-org/instantsearch-adapter react-instantsearch ``` * yarn * npm ```sh npm i @typemo-org/instantsearch-adapter vue-instantsearch ``` * pnpm ```sh pnpm add @typemo-org/instantsearch-adapter vue-instantsearch ``` * yarn ```sh yarn add @typemo-org/instantsearch-adapter vue-instantsearch ``` * bun ```sh bun add @typemo-org/instantsearch-adapter vue-instantsearch ``` * bun ```sh npm i @typemo-org/instantsearch-adapter vue-instantsearch ``` * npm ```sh pnpm add @typemo-org/instantsearch-adapter vue-instantsearch ``` * pnpm ```sh yarn add @typemo-org/instantsearch-adapter vue-instantsearch ``` * yarn ```sh bun add @typemo-org/instantsearch-adapter vue-instantsearch ``` * bun * npm ```sh npm i @typemo-org/instantsearch-adapter @typemo-org/svelte-instantsearch instantsearch.js ``` * pnpm ```sh pnpm add @typemo-org/instantsearch-adapter @typemo-org/svelte-instantsearch instantsearch.js ``` * yarn ```sh yarn add @typemo-org/instantsearch-adapter @typemo-org/svelte-instantsearch instantsearch.js ``` * bun ```sh bun add @typemo-org/instantsearch-adapter @typemo-org/svelte-instantsearch instantsearch.js ``` `@typemo-org/svelte-instantsearch` needs Svelte 5.25 and SvelteKit 2.12 or later. * npm ```sh npm i @typemo-org/instantsearch-adapter @typemo-org/svelte-instantsearch instantsearch.js ``` * pnpm ```sh pnpm add @typemo-org/instantsearch-adapter @typemo-org/svelte-instantsearch instantsearch.js ``` * yarn ```sh yarn add @typemo-org/instantsearch-adapter @typemo-org/svelte-instantsearch instantsearch.js ``` * bun ```sh bun add @typemo-org/instantsearch-adapter @typemo-org/svelte-instantsearch instantsearch.js ``` ## 2. Create the search client [Section titled “2. Create the search client”](#2-create-the-search-client) Create it once, outside your components. ```ts import { instantTypemo } from '@typemo-org/instantsearch-adapter'; const { searchClient, insights } = instantTypemo({ apiKey: 'sq_your_read_only_key', highlightFields: ['title'] }); ``` `highlightFields` names the text fields that come back highlighted. Every option is in the [adapter reference](/developers/instantsearch-adapter/). ## 3. Build the page [Section titled “3. Build the page”](#3-build-the-page) Pass `searchClient` and `insights` to InstantSearch, with your collection id as the index name. * InstantSearch.js ```js import instantsearch from 'instantsearch.js'; import { hits, pagination, refinementList, searchBox } from 'instantsearch.js/es/widgets'; const search = instantsearch({ indexName: 'your-collection-id', searchClient, insights }); search.addWidgets([ searchBox({ container: '#searchbox' }), refinementList({ container: '#brand', attribute: 'brand' }), hits({ container: '#hits', templates: { item: (hit, { html, components }) => html`${components.Highlight({ hit, attribute: 'title' })}` } }), pagination({ container: '#pagination' }) ]); search.start(); ``` * React ```jsx import { Highlight, Hits, InstantSearch, Pagination, RefinementList, SearchBox } from 'react-instantsearch'; function Hit({ hit, sendEvent }) { return ( sendEvent('click', hit, 'Result clicked')}> ); } export function Search() { return ( ); } ``` * Vue ```vue ``` * Svelte ```svelte {#snippet hit({ hit, sendEvent })} sendEvent('click', hit, 'Result clicked')}> {/snippet} ``` To render the first page of results on the server, add a `+page.server.js` next to this page: ```js import { getServerState } from '@typemo-org/svelte-instantsearch'; import Page from './+page.svelte'; export const load = ({ url }) => getServerState(Page, url); ``` The page that holds `` must not read `data` for anything else; put other data in a layout. The other components and `connect()` for your own UI are in the [package README](https://www.npmjs.com/package/@typemo-org/svelte-instantsearch). ## 4. Report purchases [Section titled “4. Report purchases”](#4-report-purchases) Clicks on results are sent on their own once `insights` is passed. Send a purchase as a conversion with its prices and currency, so revenue shows in analytics: ```js sendEvent('conversion', hit, 'Product purchased', { eventSubtype: 'purchase', objectData: [{ price: 29, quantity: 1 }], currency: 'EUR' }); ``` ## Check it worked [Section titled “Check it worked”](#check-it-worked) * Typing in the search box shows your documents, with the typed words highlighted. * A filter lists its values with counts, and picking one narrows the results. * The searches you ran appear in [Search performance](/analytics/search-performance/) within a few minutes. Next: sorting, Typemo-only parameters and what the adapter refuses are in the [adapter reference](/developers/instantsearch-adapter/). # InstantSearch adapter > Options, index names, sorting, Typemo parameters, refused parameters and events of @typemo-org/instantsearch-adapter. Source: https://docs.typemo.com/developers/instantsearch-adapter/ `@typemo-org/instantsearch-adapter` gives InstantSearch a `searchClient` and an `insights` option that run on Typemo. It works with InstantSearch.js, React InstantSearch, Vue InstantSearch and `@typemo-org/svelte-instantsearch`, and needs no other search client. The walkthrough is in [InstantSearch](/developers/instantsearch/). ## `instantTypemo(options)` [Section titled “instantTypemo(options)”](#instanttypemooptions) | Option | Default | What it does | | ----------------- | --------------------------- | --------------------------------------------------------------------------- | | `apiKey` | required | A **Read only** key. It rides in the URL, so a Write & Read key is refused. | | `url` | `https://search.typemo.com` | The search host. | | `highlightFields` | none | Text fields to highlight when a request sets no `attributesToHighlight`. | | `onSearchIntent` | none | Called with the query and collection id when a visitor settles on a search. | It returns: | Property | What it is | | -------------- | -------------------------------------------------------------------------------------------- | | `searchClient` | The InstantSearch search client. | | `insights` | The value for InstantSearch’s `insights` option: clicks and conversions reach Typemo. | | `flushIntent` | Records the pending search now. A result click or closing the search does it on its own. | | `dispose` | For a search removed from a page that stays: records the pending search and drops listeners. | ## Index names and sorting [Section titled “Index names and sorting”](#index-names-and-sorting) An index name is a collection id. A sorted view is `::asc|desc`, so the items of a `SortBy` widget look like `your-collection-id` and `your-collection-id:price:asc`. Any other shape throws an error. ## Requests [Section titled “Requests”](#requests) * **One action, one request.** InstantSearch’s per-facet sub-requests are answered from the same search. * **Facet counts are always disjunctive**, lists with `operator: 'and'` included; their hits are right. Picking two or more values on a decimal field applies every selection to the counts too. * **Facet values come in Typemo’s order** (by count) through `renderingContent.facetOrdering`. A widget’s own `sortBy` overrides it. * **A redirect** from a [custom result](/merchandising/custom-results/#send-a-query-to-a-page) arrives as `renderingContent.redirect.url`, where Algolia sends one. Open it when the visitor submits the search. * **Ranges** (`RangeInput`, `RangeSlider`) need the field set as a range filter on the collection. * **Searchable lists** match the typed text among the first 1,000 values of the field. ## Typemo parameters [Section titled “Typemo parameters”](#typemo-parameters) Parameters InstantSearch has no name for go through `configure({ typemo: { … } })`: | Parameter | What it does | | ------------------------ | ---------------------------------------------------------------------- | | `groupBy` | Groups variants into one result by a field. | | `unavailableFacetValues` | Returns the facet values the current filters rule out, marked as such. | | `lang` | Searches the collection’s version in that language. | | `mode` + `documentId` | Finds items similar to one document. | | `pinIds` + `pinsOnly` | Pins documents to the top, or returns only them. | | `autocomplete` | Adds query completions. | Pins and completions go with a query’s first page only, and completions only with a typed query. What Typemo returns beyond InstantSearch’s shape is in `results.typemo`: `autocomplete`, `fallback` (popular items for a search that found nothing) and `facets` with their statuses. ## Refused parameters [Section titled “Refused parameters”](#refused-parameters) These would change which documents match, and Typemo has no equivalent, so the adapter throws an error instead of returning unfiltered results: | Parameter | Use instead | | ---------------------------------------------------- | -------------------------------- | | `filters` (the filter string) | `facetFilters`, `numericFilters` | | `tagFilters` | `facetFilters` on a filter field | | `aroundLatLng`, `insideBoundingBox`, `insidePolygon` | None: geo search isn’t supported | The standard widgets send `facetFilters` and `numericFilters`, so they work as they are. ## Pages that aren’t a visitor’s search [Section titled “Pages that aren’t a visitor’s search”](#pages-that-arent-a-visitors-search) A start screen or another page your code fetches for itself shouldn’t count as a search. Call `searchClient.search(requests, { intent: false })`: it records no search and doesn’t replace a newer one. ## Events [Section titled “Events”](#events) With `insights` passed, these reach Typemo’s analytics: | Event | Recorded as | | -------------------------------------------- | ----------------------------------------------------------------- | | A click on a result | A click, tied to the search it came from | | A conversion | An add-to-cart | | A conversion with `eventSubtype: 'purchase'` | A purchase, with `objectData` prices or a `value`, and `currency` | | The query a visitor settled on | A search, the way the Typemo widget records it | Views and filter events are not recorded. Recorded searches and clicks count in your analytics and [popularity](/search/ranking/) the same way the widget’s do. Next: [Search API](/developers/search-api/) for the parameters behind each request. # Connect an AI agent > Connect Claude, ChatGPT, Cursor, a support bot or an automation platform to your catalog over MCP, with a key or a sign-in. Source: https://docs.typemo.com/developers/mcp/ Typemo runs a remote MCP server at `https://api.typemo.com/mcp`. Connect an AI agent to it and the agent searches your catalog with your ranking, reads each result’s price, stock and details, and cites it. With write access, it can also push and delete documents or sync your source. ## Choose what the agent may do [Section titled “Choose what the agent may do”](#choose-what-the-agent-may-do) The key, or the access you grant when you sign in, decides which tools the agent gets. | Access | Tools | Use it for | | ------------------------------------------------------ | ----------------------------------------------------------------------------------------------- | ------------------------------------------- | | A **Read only** key | `list_collections`, `describe_collection`, `search`, `fetch` | Support bots and anything customers talk to | | A **Write & Read** key, or a sign-in with write access | The four above, plus `create_collection`, `upsert_documents`, `delete_documents`, `sync_source` | Your own coding agent or automations | Every `search` and every `fetch` counts as one API request on your plan. Create keys on [API keys](/project/api-keys/). [MCP tools](/developers/mcp-tools/) describes each tool. ## Connect Claude Code [Section titled “Connect Claude Code”](#connect-claude-code) To sign in with your Typemo account: ```bash claude mcp add --transport http typemo https://api.typemo.com/mcp ``` To use a key instead: ```bash claude mcp add --transport http typemo https://api.typemo.com/mcp --header "Authorization: Bearer sq_your_key" ``` ## Connect Cursor [Section titled “Connect Cursor”](#connect-cursor) Add the server to `.cursor/mcp.json`: ```json { "mcpServers": { "typemo": { "url": "https://api.typemo.com/mcp", "headers": { "Authorization": "Bearer sq_your_key" } } } } ``` ## Connect claude.ai or ChatGPT [Section titled “Connect claude.ai or ChatGPT”](#connect-claudeai-or-chatgpt) Add a custom connector with the URL `https://api.typemo.com/mcp`, then sign in with your Typemo account when asked. There is no client to register: an MCP client identifies itself when it signs in. ## Connect your AI platform [Section titled “Connect your AI platform”](#connect-your-ai-platform) A support bot or automation platform that calls tools can answer from your live catalog. It searches, reads the price, stock and other details from the result, and replies to the shopper. Use a **Read only** key, so the bot can read and change nothing: your project’s **Public search key**, or a key limited to the one collection the bot answers from. To limit a key, choose its **Collections** when you [create it](/project/api-keys/#create-a-key). A key limited to one collection also tells the model that collection’s filterable fields before its first call. Paste these where the platform asks for an MCP server: | Field | Value | | ---------------------------- | ------------------------------------------------------------------------------------- | | Server URL | `https://api.typemo.com/mcp` | | Authentication | A header: `Authorization: Bearer sq_your_public_key` | | A URL field and nothing else | `https://api.typemo.com/mcp/sq_your_public_key`, see [below](#put-the-key-in-the-url) | The platform’s own documentation has the exact screen; menus move faster than this page. | Platform | Send the key as | Note | | ----------------------------------------- | --------------------------------- | --------------------------------------------------------------------------------------------------------- | | **Zendesk** | The header, or the key in the URL | | | **Intercom** (Fin) | The header | Fin makes one tool call per turn, so the answer must come from `search` alone. US-hosted workspaces only. | | **Tidio** (Lyro) | The header, or the key in the URL | | | **Freshdesk** (Freddy) | The header, or the key in the URL | Early access. | | **Copilot Studio** | The header | | | **Gemini Enterprise** | The header, or the key in the URL | | | **Claude** | A sign-in | A custom connector: see [Connect claude.ai or ChatGPT](#connect-claudeai-or-chatgpt). | | **ChatGPT** | A sign-in | A custom connector on Business and Enterprise plans. | | **n8n**, **Make**, **Zapier** | The header | They call your catalog as MCP clients inside a workflow. | | **Gorgias**, **HubSpot** (customer agent) | An HTTP action, not MCP | See [Use an HTTP action](#use-an-http-action). | Platform availability is as of October 2026 and is the platform’s to change. ### Put the key in the URL [Section titled “Put the key in the URL”](#put-the-key-in-the-url) When a platform takes a server URL and nothing else, put a **Read only** key at its end: ```plaintext https://api.typemo.com/mcp/sq_your_public_key ``` This address serves the four read tools only. A Write & Read key, an unknown key and a revoked key all get the same `401`. The key’s project and collection limits apply as they do in a header. Never put a write key in a URL Proxies, CDNs and the platform’s own logs keep URLs. A Read only key is safe there: it can only read, and the widget already puts one in your storefront’s page. Send a Write & Read key only in a header. ### Use an HTTP action [Section titled “Use an HTTP action”](#use-an-http-action) Gorgias and HubSpot’s customer agent call a web address from an HTTP action instead of an MCP server. Point the action at the [Search API](/developers/search-api/) with a Read only key and the customer’s question as `q`: ```bash curl -sL "https://search.typemo.com/v1/collections/{collectionId}/search" \ -H "X-API-Key: sq_your_public_key" \ -H "Content-Type: application/json" \ -d '{ "q": "running shoes size 43", "perPage": 3 }' ``` `hits` holds your documents with your own column names. The standard fields, `attributes` and `variants` that [MCP search](/developers/mcp-tools/#what-a-search-returns) adds are not there. ## Check it worked [Section titled “Check it worked”](#check-it-worked) Look at the tool list your client or platform shows: * A Read only key gives four tools: `list_collections`, `describe_collection`, `search` and `fetch`. * A longer list means the key can write. For a bot that customers talk to, swap it for a Read only key. Then ask the agent for a product you know is in your catalog. It should come back with its link. Next: [MCP tools](/developers/mcp-tools/) for every tool and what a search returns, or [Describe fields for AI](/fields/custom-roles/) so agents understand your columns. # MCP tools > Every tool the Typemo MCP server offers: its inputs, what it returns, and what a search result holds. Source: https://docs.typemo.com/developers/mcp-tools/ The Typemo MCP server offers eight tools: four that read and four that write. This page lists what each one takes and returns, and what a search result holds. To connect a client, see [Connect an AI agent](/developers/mcp/). ## Tools at a glance [Section titled “Tools at a glance”](#tools-at-a-glance) | Tool | Access | What it returns | | --------------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------- | | `list_collections` | Read | `collections`: each one’s `id`, `name`, `documents`, `locale` and `projectId`. | | `describe_collection` | Read | The collection’s `fields`, `roles`, `unmappedRoles` and `source`, with its `id`, `name`, `documents`, `locale` and `projectId`. | | `search` | Read | `results`, `found`, `facets`, and `nextCursor` when there is another page. | | `fetch` | Read | `id`, `title`, `url`, `text` and `metadata`. | | `create_collection` | Write | The new collection’s `id`, `name` and `locale`. | | `upsert_documents` | Write | `accepted`, `failed`, `errors` and the collection’s new `documentCount`. | | `delete_documents` | Write | `deleted`, `notFound` and the collection’s new `documentCount`. | | `sync_source` | Write | `status`: `queued`, or `busy` when a sync is already running. | Read tools work with any key or sign-in. Write tools need a Write & Read key, or a sign-in that granted write access. | Returned field | What it holds | | ---------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- | | `fields[]` (`describe_collection`) | Each field’s `name`, `type`, `role`, `label` and `description`, and whether it is `filterable` and `sortable`. Fields Typemo keeps for itself are left out. | | `unmappedRoles` | Which of `title`, `url` and `content` no field fills yet. Search results cite those three. | | `source` | The collection’s source `type`, sync `status`, `lastSyncAt` and `lastError`. | | `text` (`fetch`) | The whole content field. Without one, every field as `name: value` lines. | | `metadata` (`fetch`) | Every other field of the document. | ## What a search returns [Section titled “What a search returns”](#what-a-search-returns) Each result keeps `id`, `title`, `url` and `text`, the first 300 characters of the content. It adds what a bot needs to answer without a second call. A field the collection doesn’t map, or a document leaves empty, is left out. | Field | What it holds | | ----------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `price`, `salePrice` | The **Price** and **Sale Price** roles. `salePrice` appears only when it is below the price. | | `currency` | The project’s currency symbol, the one the widget shows. A project has one, so collections that sell in different currencies share it. | | `inStock` | `true` or `false` from the **In Stock** role: a flag, or a count above zero. | | `image`, `category`, `rating` | The **Image**, **Category** and **Rating** roles. | | `attributes` | The value of each of your filters and [custom roles](/fields/custom-roles/), under the column’s name. A column a field above already returns isn’t repeated. | | `variants`, `variantCount` | On a collection that groups [variants](/fields/variant-grouping/): up to 10 variants per product, and how many pass your filters. | One result (abridged) ```json { "id": "products:1001", "title": "Court Sneakers", "url": "https://example.com/court-sneakers", "text": "Low-profile leather sneakers with a cushioned insole…", "price": 79.99, "salePrice": 64.99, "inStock": true, "category": "Footwear > Sneakers", "rating": 4.6, "currency": "€", "attributes": { "Size": 42 }, "variantCount": 3, "variants": [ { "id": "products:1001", "title": "Court Sneakers", "url": "https://example.com/court-sneakers?size=42", "price": 79.99, "salePrice": 64.99, "inStock": true, "attributes": { "Size": 42 } }, { "id": "products:1002", "title": "Court Sneakers", "url": "https://example.com/court-sneakers?size=43", "price": 79.99, "inStock": false, "attributes": { "Size": 43 } }, { "id": "products:1003", "title": "Court Sneakers", "url": "https://example.com/court-sneakers?size=44", "price": 79.99, "inStock": true, "attributes": { "Size": 44 } } ] } ``` That one result answers “is it in size 43”: it is not. | Variant rule | What happens | | -------------------- | ----------------------------------------------------------------------------------------------------------------------- | | The result’s own row | Always one of the `variants`. When the list is cut at 10 and would leave it out, it comes first. | | A variant’s `id` | Fetchable like a result id. | | A variant’s fields | Its own price, sale price, availability and `attributes`. With a Size filter set up, the size comes with every variant. | | `filters` | Narrow the variants as well as the products. | | The query’s words | Don’t narrow the variants. | ### Custom roles in results and filters [Section titled “Custom roles in results and filters”](#custom-roles-in-results-and-filters) A column you described under [Describe fields for AI](/fields/custom-roles/) is explained to every AI that reads your catalog. | Where | What the AI gets | | --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `describe_collection` | Each field’s `label` and `description`. | | `search` results | The value in `attributes`, keyed by the label, else the column’s header in your file, else the column name. Your filters come under their names too. | | Two columns, one key | The first keeps the key, and the others are keyed ` ()`, such as `Size (size_us)`, so no value is lost. | | `search` `filters` | Take the column name, the label, the header, or a key `attributes` shows: `{ "field": "Size", "op": "eq", "value": 43 }`. A column name wins over a label, and a label over a header. | | An ambiguous name | A label or header that names two columns is refused with both column names listed. Filter on a column name, or on the `Size (size_us)` form. | | `create_collection` | Takes the same `fieldMeta` as the API, next to `roles`. | When a key reaches exactly one collection, the `search` tool’s description lists that collection’s filterable fields and what its custom roles mean. That holds for a key limited to one collection, and for a key whose project has just one. With a sign-in, which can reach several projects, the description stays general. ## Ids, paging and limits [Section titled “Ids, paging and limits”](#ids-paging-and-limits) | Rule | Value | | ---------------------- | ------------------------------------------------------------------------------------------------------------------------------- | | Result ids | `:`, where `` is Typemo’s document id. `fetch` takes the whole result id. | | `delete_documents` ids | The `` part of a result id, or the `id` you pushed. | | `collection` | Optional on read tools when the key reaches one collection. Otherwise the tool lists the collections to pick from. | | `limit` | 1–50 results per page, default 10. | | `cursor` | The `nextCursor` of the previous page. | | `list_collections` | Lists the first 100 collections. | | `upsert_documents` | Up to 1,000 documents a call, each with a string `id`. One invalid document rejects the whole batch with a per-document report. | | `delete_documents` | Up to 1,000 ids a call. | | `create_collection` | A name of up to 100 characters; at most 12 custom roles in `fieldMeta`. Roles are never guessed from field names. | | `sync_source` | For a collection fed by a feed, a store, a plugin or a crawl. A collection you push to has nothing to sync. | Document limits and column roles are the same as on [Push over the API](/import/api-push/). ## Tool reference [Section titled “Tool reference”](#tool-reference) ### `list_collections` [Section titled “list_collections”](#list_collections) Every collection this credential can reach, with its document count. Start here. No parameters. ### `describe_collection` [Section titled “describe_collection”](#describe_collection) Fields with their types and roles, which fields can filter or sort a search, roles no field fills yet, and the sync status of its source. A field the merchant described carries a label and a description: its meaning, which makes it a custom role. Call before filtering. | Parameter | Type | Required | Description | | ------------ | ------ | -------- | ------------------------------------------------------------- | | `collection` | string | no | Collection id. Omit when the key reaches only one collection. | ### `search` [Section titled “search”](#search) Full-text search over a collection, ranked by relevance and popularity. Results carry a citable url and a short text, plus the price, availability and image where the collection maps them, and under `attributes` the value of each of its filters and each custom role the merchant described, by label. A collection that groups its variants returns products with up to 10 of their variants (each with its own price, availability and attributes, such as size and colour) and how many there are (variantCount), so one result answers “is it in size 43”; filters narrow the variants too. fetch returns the whole document. Sort only on fields describe_collection marks sortable; filter on fields it marks filterable, by name or label, or match a phrase in a text field with `contains`. | Parameter | Type | Required | Description | | ----------------- | ------------------------------------ | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `query` | string | yes | What to look for. `*` matches every document. | | `collection` | string | no | Collection id. Omit when the key reaches only one collection. | | `filters` | array | no | Every filter must match. | | `filters[].field` | string | yes | A field describe_collection marks filterable, by its name, its label or the key `attributes` shows it under; for `contains`, a text field. | | `filters[].op` | string | yes | eq, neq, gt, gte, lt, lte, in, nin, or contains (a phrase in a text field). | | `filters[].value` | string or number or boolean or array | yes | What to compare with; `in` and `nin` take an array. | | `sort` | string | no | `field:asc` or `field:desc`. Default: relevance. | | `limit` | integer | no | Results per page, default 10. | | `queryType` | string | no | `question` when the query is a sentence or a question: documents are ordered by how well they cover its words, none needs every word. `keywords` for names and short terms: every word must match first. Default: `keywords`. | | `cursor` | string | no | nextCursor from the previous page. | ### `fetch` [Section titled “fetch”](#fetch) The whole document behind a search result id. | Parameter | Type | Required | Description | | --------- | ------ | -------- | ------------------------------------------------------ | | `id` | string | yes | A result id from search: `:`. | ### `create_collection` [Section titled “create_collection”](#create_collection) A new, empty collection to push documents into. **Needs write access.** | Parameter | Type | Required | Description | | ----------- | ------ | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `name` | string | yes | Collection name, up to 100 characters. | | `locale` | string | no | Language of the content, e.g. en, de. Default en. | | `project` | string | no | Project id; needed only when your account has several. | | `roles` | object | no | The field each role reads: title, url and content are what search results cite; also image, price, salePrice, inStock, category, rating, id. Nothing is guessed from field names. | | `fieldMeta` | object | no | What you say about a field: a `label` (its name for shoppers and AI) and a `description` (what it means). A field with a description is a custom role, at most 12: search returns its value under the label and filters accept the label. | ### `upsert_documents` [Section titled “upsert_documents”](#upsert_documents) Create or replace up to 1000 documents, matched by `id`. The whole batch is validated first; one invalid document rejects it with a per-document report. Roles (title, url, content…) are set with create_collection, never guessed from field names; describe_collection shows roles still unmapped. **Needs write access.** | Parameter | Type | Required | Description | | ------------ | ------ | -------- | --------------------------------------------------------------------------------------------------- | | `collection` | string | yes | Collection id. | | `documents` | array | yes | Each document needs a unique string `id`. At most 1000 per call; the batch is validated as a whole. | ### `delete_documents` [Section titled “delete_documents”](#delete_documents) Delete up to 1000 documents by id. **Needs write access.** | Parameter | Type | Required | Description | | ------------ | ------ | -------- | ---------------------------------------------------------------------------------------------- | | `collection` | string | yes | Collection id. | | `ids` | array | yes | Ids to delete: the id part of a search result id, or the id you pushed. At most 1000 per call. | ### `sync_source` [Section titled “sync_source”](#sync_source) Pull the collection’s URL feed or platform integration now, or re-crawl a crawled site. Progress shows in describe_collection. Push-fed collections have nothing to sync. **Needs write access.** | Parameter | Type | Required | Description | | ------------ | ------ | -------- | -------------- | | `collection` | string | yes | Collection id. | Next: [Connect an AI agent](/developers/mcp/), or [Describe fields for AI](/fields/custom-roles/) so agents read your columns right. # TypeScript SDK > The @typemo-org/sdk client: its options, every method by resource, typed search and the error it throws. Source: https://docs.typemo.com/developers/sdk/ `@typemo-org/sdk` is a typed client for both Typemo APIs. Search, suggestions and events go to the search API; everything else goes to the management API. One object covers both, and its types come from the same OpenAPI document as the [API reference](/api-reference/). * npm ```sh npm i @typemo-org/sdk ``` * pnpm ```sh pnpm add @typemo-org/sdk ``` * yarn ```sh yarn add @typemo-org/sdk ``` * bun ```sh bun add @typemo-org/sdk ``` ```ts import { Typemo } from '@typemo-org/sdk'; const typemo = new Typemo({ apiKey: process.env.TYPEMO_API_KEY }); ``` It runs on Node 18 or later and in browsers. In a browser, use a Read only key and set `searchUrl` to your region’s address: see [Regions](/developers/api-basics/#regions). ## Options [Section titled “Options”](#options) | Option | What it does | Default | | ------------- | ----------------------------------------------------------------------------------------------- | ------------------------------ | | `apiKey` | The key, sent as `X-API-Key`. | None | | `baseUrl` | The management API. | `https://api.typemo.com/v1` | | `searchUrl` | The search API: search, suggestions and events. In a browser, your region’s address plus `/v1`. | `https://search.typemo.com/v1` | | `fetch` | A `fetch` of your own, such as SvelteKit’s `event.fetch`. | The global `fetch` | | `credentials` | Passed to `fetch`. `include` sends cookies. | None | ## Search [Section titled “Search”](#search) ```ts interface Product { title: string; price: number; brand: string; } const results = await typemo.search('products', { q: 'sneakers', filter: { AND: [ { field: 'brand', op: 'eq', value: 'Stride' }, { field: 'price', op: 'lte', value: 100 } ] }, sort: 'price:asc', perPage: 20 }); results.found; // total matches results.hits[0]?.title; // your document fields, typed, plus id and _score results.facets.category; // [['Footwear', 3]] results.fallback?.hits; // on a miss: popular items to show instead ``` The type parameter types the hits’ fields. Every parameter is optional and matches the [Search API](/developers/search-api/#parameters) one to one. A search goes out as `GET`, so a repeat is answered from the one-minute cache; a search with a `vector` goes out as `POST`. ## Methods [Section titled “Methods”](#methods) Collection ids and project ids are the first argument. Lists take `{ page, perPage }` and return `{ data, page, perPage, total }`. | Method | What it does | | ----------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | | `search(collectionId, params)` | Searches a collection. | | `suggestions(collectionId, { q, limit, locale })` | Popular searches, optionally those that match `q`. | | `events.track(collectionId, event)` | Records a search, click, add-to-cart or purchase. See [Analytics events](/developers/search-api/#analytics-events). | | `collections.list` · `get` · `create` · `update` · `delete` | Manages collections. | | `collections.sync(collectionId)` | Re-reads the collection’s source now: a feed, a store or a crawl. | | `documents.list(collectionId, query)` | Lists documents. Takes `q`, `filter`, `sort` and `grouped` besides paging. | | `documents.get` · `delete` | Reads or deletes one document by id. | | `documents.upsert(collectionId, { documents })` | Creates or updates documents by `id`. Takes any number and sends them 1,000 per request; the counts add up. | | `documents.deleteMany(collectionId, ids)` | Deletes up to 1,000 documents. Ids that don’t exist count in `notFound`. | | `documents.truncate(collectionId)` | Deletes every document. | | `curations.list` · `get` · `create` · `update` · `delete` | Manages [custom results](/merchandising/custom-results/). | | `boostRules.list` · `get` · `create` · `update` · `delete` | Manages [boost rules](/merchandising/boosting/). | | `synonyms.list` · `get` · `upsert` · `delete` | Manages [synonyms](/search/synonyms/). `upsert` creates or replaces the set with that id. | | `synonyms.batch(collectionId, input)` | Creates or replaces up to 500 synonym sets in one request. | | `stopwords.get` · `update` | Reads or replaces the collection’s stopword list. | | `knowledge.list` · `create` · `update` · `delete` | Manages the AI assistant’s knowledge snippets, per project. | | `analytics.topQueries` · `zeroResults` · `topClicked` | Reads search analytics, per project. `from` and `to` are required. | | `raw` | The underlying [openapi-fetch](https://openapi-ts.dev/openapi-fetch/) client, typed for every route. | Writes need a **Write & Read** key, so keep that key on your server. Document limits are the same as on every import path: see [Formats and limits](/import/limits/). The SDK has no method to replace every document at once. Send that snapshot with `PUT /v1/collections/{id}/documents`, described in [Push over the API](/import/api-push/#replace-everything). ## Errors [Section titled “Errors”](#errors) Every method throws a `TypemoError` on a response that isn’t `2xx`. | Property | What it holds | | ------------ | ------------------------------------------------------------------------------------------ | | `status` | The HTTP status. | | `code` | The [error code](/developers/api-basics/#errors), such as `BAD_REQUEST` or `RATE_LIMITED`. | | `message` | What went wrong. | | `param` | The input the API refused, when it names one. | | `body` | The parsed response. A refused push carries its per-document `report` here. | | `retryAfter` | On a `429`, the seconds to wait. | | `rateLimit` | `{ limit, remaining, reset }` from the response headers, each only when the API sent it. | ```ts import { TypemoError } from '@typemo-org/sdk'; try { await typemo.search('products', { q: 'sneakers', sort: 'colour:asc' }); } catch (err) { if (!(err instanceof TypemoError)) throw err; console.log(err.status, err.code, err.param); // 400 'BAD_REQUEST' 'sort' } ``` Next: [Search API](/developers/search-api/) for every search parameter, or [Push over the API](/import/api-push/) to keep your catalog current. # Search API > The search endpoint: its parameters, response, filters, similar items, suggestions, analytics events and headers. Source: https://docs.typemo.com/developers/search-api/ One endpoint answers every search, the widget’s and yours: from your server, a native app or a UI you build yourself. This page lists its parameters, what it returns and the endpoints beside it. Keys, regions, errors and rate limits are on [API basics](/developers/api-basics/). ```plaintext POST https://search.typemo.com/v1/collections/{collectionId}/search GET https://search.typemo.com/v1/collections/{collectionId}/search ``` Use a **Read only** key. From a browser, call your region’s address, not `search.typemo.com`: [Regions](/developers/api-basics/#regions) explains why. ## A first request [Section titled “A first request”](#a-first-request) ```bash curl -sL "https://search.typemo.com/v1/collections/{collectionId}/search" \ -H "X-API-Key: sq_your_key" \ -H "Content-Type: application/json" \ -d '{ "q": "sneakers", "perPage": 5 }' ``` Response (abridged) ```json { "q": "sneakers", "found": 3, "page": 1, "perPage": 5, "hits": [{ "id": "1001", "title": "Court Sneakers", "price": 79.99, "_score": 5.34 }], "facets": { "category": [["Footwear", 3]] }, "facetStats": { "price": { "min": 49.99, "max": 79.99 } }, "fallback": null, "correctedQuery": null, "redirect": null, "banner": null } ``` Typo tolerance, synonyms, your merchandising and the rest of [how search works](/search/how-it-works/) apply exactly as in the widget. Every request counts in [analytics](/analytics/overview/) like any other search. ## Parameters [Section titled “Parameters”](#parameters) `POST` takes them as a JSON body. `GET` takes the same names as query parameters: lists comma-separated, `filter` as URL-encoded JSON. | Name | Type | What it does | Default | | ------------------------ | --------- | -------------------------------------------------------------------------------------------------------------------------------------- | ------------------------- | | `q` | string | The search text. Empty or `*` browses the whole collection. Only the first 32 words, up to 200 characters, are searched. | `*` | | `filter` | object | Conditions on document fields. See [Filters](#filters). | None | | `sort` | string | `field:asc` or `field:desc`, such as `price:asc`. | Relevance | | `page` | integer | The page, from 1. | 1 | | `perPage` | integer | Results per page, 1–100. | 10 | | `facets` | string\[] | Fields to count values of, on top of the filters set in the dashboard. Unknown names are ignored. | The dashboard’s | | `maxFacetValues` | integer | Values returned per facet. | 100 | | `unavailableFacetValues` | boolean | Keeps the facet values the other filters rule out, marked `"unavailable"`. Costs more per search; ignored on a field that holds lists. | `false` | | `groupBy` | string | One result per value of this field, such as one card per product across its variants. Each hit carries `_groupFound`. | None | | `includeFields` | string\[] | The fields to return. `id` and `_score` always come back. Keeps responses small when documents carry long text. | Every field | | `highlightFields` | string\[] | Text fields to highlight. Each hit carries `_highlight` with the matches marked up. | None | | `mode` | string | `auto`, `text`, `hybrid` or `vector`. `vector` needs `vector` (POST only), `documentId` or `q`. | `auto` | | `queryType` | string | `keywords` or `question`: how the query’s words are matched. See [Questions](#questions). | `keywords` | | `documentId` | string | With `mode: "vector"`: return [similar items](#similar-items). | None | | `pinIds` | string\[] | Document ids shown first, in this order. With `pinsOnly: true`, only they come back. | None | | `autocomplete` | boolean | Adds query completions to the response. See [Autocomplete and suggestions](#autocomplete-and-suggestions). | `false` | | `lang` | string | The query’s language tag, for analytics and suggestions. | The collection’s language | | `session` | string | Your visitor’s session id, so analytics can tie this search to that visitor’s clicks. Also accepted as an `X-Session-Id` header. | None | ## Response [Section titled “Response”](#response) | Field | What it holds | | ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `q`, `page`, `perPage` | The request, as searched. | | `found` | How many documents match. | | `hits` | The page of documents, with the fields you indexed. | | `hits[]._score` | How well the hit matches, with your boosts and popularity counted in. Compare scores within one response, not across queries. | | `facets` | Each categorical field’s values as `[value, count]` pairs. With `unavailableFacetValues`, a third element `"unavailable"` marks a value the other filters rule out. | | `facetStats` | Each numeric field’s `{ min, max }`. | | `fallback` | On a search that finds nothing: your popular items as `{ hits, found }`, to show instead. Otherwise `null`. | | `correctedQuery` | The corrected words when a typo was fixed to find the results. Otherwise `null`. | | `redirect` | The page a [custom result](/merchandising/custom-results/#send-a-query-to-a-page) sends this query to: open it when the visitor submits the search. Otherwise `null`. | | `banner` | The [banner set for this search](/merchandising/banners/#how-banners-show), shown above the results: `title`, `imageUrl`, `mobileImageUrl`, `link`, `openInNewTab`. Otherwise `null`. | | `autocomplete` | Only with `autocomplete: true`. | Without a `sort`, hits that match every word come first, and hits that match part of the query follow. ## Filters [Section titled “Filters”](#filters) A condition is `{ field, op, value }`. Group conditions with `AND`, `OR` and `NOT`: ```json { "q": "sneakers", "filter": { "AND": [ { "field": "brand", "op": "in", "value": ["Stride", "Acme"] }, { "field": "price", "op": "lte", "value": 100 }, { "NOT": { "field": "title", "op": "contains", "value": "kids" } } ] } } ``` | `op` | Meaning | | ---------- | ---------------------------------- | | `eq` | Equals | | `neq` | Doesn’t equal | | `gt` | Greater than | | `gte` | Greater than or equal | | `lt` | Less than | | `lte` | Less than or equal | | `in` | Any of a list | | `nin` | None of a list | | `contains` | The phrase appears in a text field | | Rule | What happens | | ----------------------------------------------------------------------------------- | -------------------------------------------------------- | | A value of another type than the field, such as `"10"` on a number field | It is read as the field’s type: `"10"` becomes `10`. | | A field that holds a list | It takes `eq`, `in` and `nin`. | | `contains` inside an `OR` or a `NOT` group | `400`. Use it at the top level or inside `AND`. | | An unknown field, an operator the field type doesn’t take, a value that doesn’t fit | `400`, so a typo never comes back as unfiltered results. | ## Questions [Section titled “Questions”](#questions) By default a search treats the query as keywords: documents with every word come first. Send `queryType: "question"` when the query is a sentence, from a person or from an AI agent, and the documents are long: articles, help pages, a knowledge base. ```bash curl -sL "https://search.typemo.com/v1/collections/{collectionId}/search" \ -H "X-API-Key: sq_your_key" \ -H "Content-Type: application/json" \ -d '{ "q": "how do I move my shop to another domain without losing rankings", "queryType": "question" }' ``` | Rule | What happens | | ---------------- | ----------------------------------------------------------------------------------------------------- | | Order | Documents are ordered by how well they cover the question’s words. No document needs every word. | | `found` | Counts every document with at least one of the words, so it is larger than with `keywords`. | | One-word query | The same results as `keywords`. | | Product catalogs | Keep `keywords`: with `question`, a product with one word of three can rank above one with all three. | | `mode` | Combines with it: `hybrid` adds matches by meaning to either type. | | Everything else | Typo correction, synonyms, filters, facets and your rules work the same. | ## Similar items [Section titled “Similar items”](#similar-items) On a collection with [semantic search](/search/ranking/), `mode: "vector"` with a `documentId` returns the products that look most like that one, for a “similar products” row: ```bash curl -sL "https://search.typemo.com/v1/collections/{collectionId}/search" \ -H "X-API-Key: sq_your_key" \ -H "Content-Type: application/json" \ -d '{ "mode": "vector", "documentId": "1001", "perPage": 6 }' ``` | Rule | What happens | | -------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | | What it compares | First photos, once the collection has photo vectors: the **Image** field mapped and the vectors regenerated since. Otherwise the meaning of the text. | | The document itself | Left out. | | `groupBy` with your variant field | The document’s other variants are left out too, and each other product comes back once. | | `filter` | Applies. | | Order | By closeness alone, with no boosts. | | An unknown id, or a product without a photo vector | An empty `hits`. | ## Autocomplete and suggestions [Section titled “Autocomplete and suggestions”](#autocomplete-and-suggestions) With `autocomplete: true` and a non-empty `q`, the response carries an `autocomplete` object: completions based on what your visitors search for, plus a `related` group of related terms. Before the visitor types, show popular searches from their own endpoint. It isn’t billed as a search: ```plaintext GET https://search.typemo.com/v1/collections/{collectionId}/suggestions ``` | Parameter | What it does | | --------- | ------------------------------------------------------- | | `q` | Only the searches that start with or contain this text. | | `limit` | How many to return. | | `locale` | The language whose searches to return. | ## Analytics events [Section titled “Analytics events”](#analytics-events) The widget reports clicks and purchases for you. A UI of your own reports them here, so [analytics](/analytics/overview/) and popularity reflect your visitors: ```plaintext POST https://search.typemo.com/v1/collections/{collectionId}/events ``` Every event carries `type` and `sessionId`, and optionally `deviceType`. | `type` | Fields | | ------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `search` | `query`, `resultsCount`. Send it for the query the visitor settled on. | | `click` | `docId`, `position`; optionally `query`, `docTitle` and `searchEventId`, the `X-Search-Event-Id` of the search the click came from. | | `add_to_cart` | `docId`; optionally `clickEventId`. | | `purchase` | `docId`, `value` as a decimal string such as `"79.99"`, `currency` as a three-letter code; optionally `clickEventId` and `purchaseId`. One `purchaseId` counts once per document. | An event with a field that is missing, too long or of the wrong type gets `400`, and nothing is recorded. ## Response headers [Section titled “Response headers”](#response-headers) | Header | What it holds | | ---------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | | `X-Search-Time-Ms` | How long the search took. | | `X-Search-Count` | How many documents match, the same as `found`. | | `X-Search-Event-Id` | This search’s id. Send it as `searchEventId` with a click. | | `X-RateLimit-Limit`, `X-RateLimit-Reset` | Requests one IP may make per minute, and when the minute ends. See [Rate limits](/developers/api-basics/#rate-limits). | | `X-Typemo-Stale` | `1` when a `GET` search was answered from a saved copy because search was briefly unavailable. | GET works too A repeated `GET` is answered from a one-minute cache, and you can type one into a browser’s address bar: `…/search?q=sneakers&perPage=5&key=sq_your_key`. `POST` is never cached. ## Errors [Section titled “Errors”](#errors) Errors follow the shape on [API basics](/developers/api-basics/#errors). A search answers `400` for a bad `filter`, `sort`, `perPage`, `groupBy` or `highlightFields`, and for a `POST` body that isn’t a JSON object. Next: [Push over the API](/import/api-push/) to send your catalog, or the [TypeScript SDK](/developers/sdk/) for a typed client. # FAQ > Short answers to the questions asked most often, each with a link to the page that covers it. Source: https://docs.typemo.com/faq/ Short answers to the questions we hear most. Each one links to the page with the details. Does Typemo work on my platform? Yes, on any site where you can add a script tag: a store, a CMS, a static site or a web app. Shopify and WooCommerce stores connect by store address, and WordPress also has a plugin. See [Shopify](/integrations/shopify/), [WooCommerce](/integrations/woocommerce/) and [Install the widget](/widget/install/). Do I need a developer to set it up? No. The setup wizard takes you from sign-up to a working search, and the widget is one snippet pasted where you would paste an analytics tag. See the [Quickstart](/getting-started/quickstart/). What does the trial include? 30 days of the Pro plan, with no card needed. When it ends, the account moves to the Free plan unless you pick one. See [Plans and billing](/account/billing/#trial). How fast does search show a change to my catalog? It depends on how your data arrives: a change pushed over the API shows within seconds, a sync follows its schedule, and an uploaded file changes when you upload it again. See [Choose how to import](/import/overview/). If search looks behind, see [Results are out of date](/troubleshooting/stale-results/). Can I use my own search box? Yes. Point the widget at your own button or field, and clicking it opens Typemo’s search. See [Embed options](/widget/embed-options/), or the [WordPress plugin](/integrations/wordpress-plugin/) on WordPress. What do you record about my visitors? Searches, clicks and cart events, linked by a random ID that lasts as long as the browser tab. The widget sets no cookies, and analytics store no IP addresses. AI assistant chats are kept for three months: see [What is stored](/ai-assistant/overview/#what-is-stored) and our [privacy policy](https://typemo.com/privacy). Can several sites share one account? Yes: one project per site, each with its own collections, keys, widget and analytics, under one sign-in. The Free plan holds one project. See [Core concepts](/getting-started/concepts/) and [Plans and billing](/account/billing/#plans). What languages are supported? Search works in the language you pick for each collection: see [Search language](/search/language/). The widget and the assistant show their buttons and labels in nine languages: see [Languages and currency](/widget/languages-currency/). The assistant answers in the visitor’s language. Is there an API? Yes. A REST API covers search and your data: collections, documents, synonyms and rules. A TypeScript SDK wraps it, and AI agents reach the same collections over [MCP](/developers/mcp/). Start at [API basics](/developers/api-basics/) or the [API reference](/api-reference/). Something's broken. Where do I start? Pick the symptom: [the widget doesn’t load](/troubleshooting/widget-not-loading/), [a product isn’t showing up](/troubleshooting/product-not-showing/), [results are out of date](/troubleshooting/stale-results/) or [an import failed](/troubleshooting/import-errors/). # Describe fields for AI > Tell the AI assistant and AI agents what a column holds, in your own words, with a custom role. Source: https://docs.typemo.com/fields/custom-roles/ A custom role tells the AI assistant and AI agents what a column holds, in a sentence you write. Use one when a column’s name doesn’t say it: a `size` column holding `43` is clear to a person and ambiguous to a model. *EU shoe size* next to it settles it. ## What a custom role changes [Section titled “What a custom role changes”](#what-a-custom-role-changes) * **The AI assistant** and **AI agents** on the [MCP server](/developers/mcp/) read the column with your sentence beside it. In a long text, the assistant finds the part that answers the question. * **Semantic search** also reads a custom role on a text column, once you regenerate the vectors: see [Semantic search](/search/ranking/#semantic-search). * **Nothing else changes.** Keyword ranking and the widget’s cards stay as they are, and saving a custom role never rebuilds the index. ## Add a custom role [Section titled “Add a custom role”](#add-a-custom-role) 1. Open **Search → Setup** and pick the collection under **Collection**. **Custom roles** sits in the **Fields** card, between the roles and **Searchable fields**. 2. Click **Add role** and pick a column. A column that already holds a role, **Unique ID** included, isn’t listed. 3. Under **Meaning**, say what the column holds in one sentence. ![The end of the Fields card: Custom roles with its Add role button, then Searchable fields with the columns search reads](/_astro/custom-roles.CJNjqDMQ_Z14Nga.webp) Custom roles and Searchable fields close the Fields card 4. Under **Name**, type the name AI should use for the column, if its own name won’t do. Left empty, the column’s name is used. 5. Click **Save changes** in the bar at the bottom of the page. ## Limits [Section titled “Limits”](#limits) | What | Limit or behaviour | | ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | Custom roles | 12 per collection. At 12, **Add role** gives way to *12 of 12*. | | **Meaning** | Up to 200 characters. A row without one isn’t saved: its field turns amber and says so. | | **Name** | Up to 100 characters | | Columns | Any column without a standard role | | A column that’s a filter | Has one name. The **Name** here and the filter’s **Name** on the **Filters** card are the same field. Removing the custom role keeps the filter’s name. | | Moving a row | Picking another column in the row’s **Column** moves the name and the meaning with it. | | Set for you | Nothing is guessed. A WooCommerce store connected through the WordPress plugin starts with its short description as **Summary**; edit or remove it like any other. | ## Check it worked [Section titled “Check it worked”](#check-it-worked) Ask the AI assistant a question that only this column answers. Its answer should use the column’s values. ## Set custom roles over the API [Section titled “Set custom roles over the API”](#set-custom-roles-over-the-api) For developers. `fieldMeta` on `POST /v1/collections` and `PATCH /v1/collections/{id}` sets custom roles, and `GET /v1/collections/{id}` returns them. Each column takes a `label` (its **Name**) and a `description` (its **Meaning**); a column with a `description` is a custom role. PATCH /v1/collections/{id} ```http PATCH /v1/collections/{id} Authorization: Bearer sq_your_api_key { "fieldMeta": { "size": { "label": "Size", "description": "EU shoe size" } } } ``` | Rule | Behaviour | | ------------- | ----------------------------------------------------------------------------------------------------------------------------------- | | `PATCH` | Merges into each column’s current entry. `null` removes a column’s entry; an empty string clears one key. | | Column names | Each key names a column as `fields[].name` in `GET /v1/collections/{id}` lists it. An unknown column is a `400` naming `fieldMeta`. | | Before import | Before the first import, any column name is accepted as the coming column. | | Limits | The limits above. Past them, the request fails with `400`. | | MCP | The `create_collection` tool takes the same `fieldMeta`. | Next: see [what the assistant reads](/ai-assistant/what-it-reads/), or [look up the standard roles](/fields/roles/). # Set up filters > Turn a column into a filter in the widget and the API, and choose how its values show. Source: https://docs.typemo.com/fields/filters/ Filters are what shoppers click to narrow results: a category, a size, a price range. Each filter is one column of your data. You add it on **Search → Setup**, and it shows in the widget’s filter panel and in `facets` in the search API’s response. ## Before you start [Section titled “Before you start”](#before-you-start) **What you are building** is **Catalog** or **API only**. The docs widget shows no filters, so with **Docs** there is no **Filters** card. ## Add a filter [Section titled “Add a filter”](#add-a-filter) 1. Open **Search → Setup** and pick the collection under **Collection**. 2. In the **Filters** card, click **Add filter** and pick the column. It joins the end of the list. ![The Filters card: Category, Brand, Material and Availability as checkboxes, Color as swatches, Price and Rating as range sliders](/_astro/filters.8h7kKjW2_2tC8NQ.webp) The Filters card lists filters in the order the widget shows them 3. On its row, set the **Name** shoppers see and how it is **Shown as**. 4. Drag the row by its handle, or use the arrows, to put it in place. The widget shows filters in this order. 5. Click **Save changes** in the bar at the bottom of the page. A filter on a searched column rebuilds the index: see [Save your changes](/fields/map-fields/#save-your-changes). ## Filter settings [Section titled “Filter settings”](#filter-settings) | Setting | What it does | Default | | ----------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------- | | Column | **Add filter** offers every column except links and the columns that hold **Unique ID**, **Title**, **URL**, **Image URL** or **Content**. | — | | **Name** | The filter’s title in the widget. AI reads the same name: see [custom roles](/fields/custom-roles/). Up to 100 characters. | The column’s name; the price filter reads *Price* | | **Shown as** | **Checkboxes**, **Buttons** or **Swatches**. A number column shows as a **Range slider** or **Checkboxes**. | **Checkboxes**, or **Range slider** for a number | | Labels, colours and pictures (the sliders icon) | Renames values, picks each swatch’s colour and gives each value a picture: see [Rename values](#rename-values-and-pick-colours). Not on a range slider. On a filter added to a searched column, it shows after the save. | — | | Order | The drag handle or the arrows | A new filter goes last | | Remove (the bin icon) | Takes the filter off. The column stays as it is. On a searched column, saving rebuilds the index. | — | Several values picked in one filter match any of them. Values picked in different filters must all match. ## Built-in: price and category [Section titled “Built-in: price and category”](#built-in-price-and-category) Two filters follow a role instead of a column you add: * **Price.** Giving a column the **Price** role adds the price slider. It is always a **Range slider**. * **Category.** Giving a column the **Category** role adds the category filter. It can’t show as **Swatches**. Both start on in a new collection. In the list they are ordinary rows: rename, move or remove them for that collection. The roles are on [Map your fields](/fields/map-fields/). ## Rename values and pick colours [Section titled “Rename values and pick colours”](#rename-values-and-pick-colours) The sliders icon on a filter’s row lists every value of the filter. Use it when your source data is messy and you’d rather not clean it at the source. 1. Click the sliders icon on the filter’s row. 2. Under **Label**, type the name shoppers should see for a value: `l` becomes `Large`. 3. On a **Swatches** filter, pick each value’s colour under **Color**. **Magic fill** picks one for every value whose name says a colour, in any language (`Rosso`, `Blu Tiffany`). Values it can’t place stay blank, and colours you set stay as they are. 4. Under **Picture**, click a value’s square to upload a picture or paste a link to one. [Category tiles](/widget/blocks/#category-tiles) show it. 5. Click **Apply**, then **Save changes**. A store connected by its address fills in its own pictures on every sync: WooCommerce category images and Shopify collection images. A sync only fills values without a picture, so one you set stays. Through the API, send the pictures as `imageMap` in the filter’s settings. The list shows values once the collection has data. A new filter on a searched column lists them after the save that rebuilds the index. ## Keep values that would find nothing [Section titled “Keep values that would find nothing”](#keep-values-that-would-find-nothing) A filter value disappears once the shopper’s other choices rule it out: pick *Blue*, and sizes nobody stocks in blue drop off the list. Values of the filter being used stay, so shoppers can pick several. To keep the panel’s shape steady, turn on **Keep all filter values** under **Search → Look → Overlay**. Values that would find nothing then stay in place, greyed out. The setting applies to the whole widget, and each search costs a little more. A filter on a list column, such as the one with the **Category** role, can’t grey its values. While one is in the panel, values that would find nothing disappear as usual. ## Check it worked [Section titled “Check it worked”](#check-it-worked) The preview on the right of **Search → Setup** shows the filters with your unsaved changes. A filter that waits on a rebuild appears after you save. **API** above the preview shows `facets` in the search API’s answer, with your saved settings. Next: [group variants](/fields/variant-grouping/) if your data has one row per size or colour, or decide what shoppers see first with [custom results](/merchandising/custom-results/). # Map your fields > Tell Typemo which column is the title, the price or the image, and which columns search reads, on Search → Setup. Source: https://docs.typemo.com/fields/map-fields/ Mapping tells Typemo what each column of a collection is: which one is the title, the image, the price. It also sets which columns search reads. You map each collection once on **Search → Setup**, and your columns keep their own names. ## Before you start [Section titled “Before you start”](#before-you-start) * The collection needs its first import: its columns show up on **Search → Setup** after it. See [Choose how to import](/import/overview/). * If you mapped columns in the setup wizard’s **Mapping** step, this page edits the same mapping. ## Map the roles [Section titled “Map the roles”](#map-the-roles) 1. Open **Search** in the sidebar. On the **Setup** tab, check **What you are building**: **Catalog**, **Docs** or **API only**. It decides which roles you see. 2. Under **Collection**, pick the collection. ![Search → Setup for a store: What you are building set to Catalog, the collection picker, the Fields card with roles mapped to columns, and the widget preview on the right](/_astro/search-setup.CYkYdBmu_JvtvL.webp) Search → Setup: the roles on the left, the live preview on the right 3. In the **Fields** card, click the column next to **Title** and pick the column that names each result. Results need a title. 4. Pick a column for each other role your data has. Leave the rest at **Not mapped**. Leave **Unique ID** at **Auto** to let the import [choose the id](/fields/prepare-your-data/#every-document-has-an-id). 5. Under **Searchable fields**, keep the columns whose words visitors type. **Add column** adds a text column, and the × on a column takes it out. The **Title** column always stays. 6. Click **Save changes** in the bar at the bottom of the page. What each role does, and the values it needs, is on [Roles](/fields/roles/). Some sources set the roles for you, and a crawled collection keeps them locked: see [Roles set for you](/fields/roles/#roles-set-for-you). ## Save your changes [Section titled “Save your changes”](#save-your-changes) Your edits stay a draft until you save. The bar at the bottom counts the pending changes and offers **Discard** and **Save changes**. One save covers every tab and every collection on **Search**. | Change | When it takes effect | | --------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | | Roles, custom roles, filter names, order and display, variant grouping | As soon as you save | | **Unique ID** | At the next import | | A column added to or taken out of **Searchable fields** | After a rebuild of the index, which the save starts | | A filter added to or removed from a searched column | After a rebuild of the index, which the save starts | | What semantic search reads, after a change to **Title**, **Content**, **Image URL** or custom roles | After you click **Regenerate vectors**: see [Semantic search](/search/ranking/#semantic-search) | Before a save that rebuilds, the page warns **Saving rebuilds N documents**. A rebuild re-creates the index from the documents already indexed: nothing is fetched from your source again. Search keeps answering from the current index until the rebuild finishes, and the collection picker shows its progress. Later syncs and imports keep the columns you chose. Some saves stop before they start: | What happened | What to do | | --------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | | A role’s icon turned amber, and Save names the collection | The column holds the wrong kind of value for the role. Pick another column, or **Not mapped**. | | A sync or rebuild is running for the collection | Save again once it finishes. | | One collection failed to save | The save stops there and names it. That collection keeps its unsaved changes. | Leaving the page with unsaved changes asks you first. ## Check it worked [Section titled “Check it worked”](#check-it-worked) * The **Fields** card’s header reads **N of M mapped**, with a green check while **Title** is mapped. * The preview on the right shows the open collection in the widget, with your unsaved changes applied. A filter that waits on a rebuild appears after you save. * **API** above the preview shows the search API’s answer. It uses your saved settings. Map Content in a store too Pick your product description for **Content**. Product cards never show it, but search matches its words and the AI assistant answers from it. Next: look up what each role drives in [Roles](/fields/roles/), or [set up filters](/fields/filters/). # Prepare your data > What a record is, which fields to keep, how ids work, and why your columns keep their own names. Source: https://docs.typemo.com/fields/prepare-your-data/ A document in Typemo is one flat record: field names and values, nothing nested. How you shape those records decides what search can find, show and filter. This page explains the shape before your first import. ## What a record is [Section titled “What a record is”](#what-a-record-is) One record is one thing a visitor can find: a product, an article, a page. ```json { "id": "tee-001", "title": "Cotton T-shirt", "price": 29.0, "category": "Apparel", "in_stock": true } ``` A CSV row, a feed item and a JSON object over the API all end up in this shape. So the rules on this page hold for every [import method](/import/overview/). ## Index only what search needs [Section titled “Index only what search needs”](#index-only-what-search-needs) An export usually carries more than search needs: internal flags, warehouse codes, audit dates. Keep a field when it passes one of three tests: * **Visitors search it:** titles, descriptions, brands. * **You show it:** prices, images, links, stock. * **You filter or boost by it:** ratings, colours, sale flags. Every other field makes records bigger and the column lists on **Search → Setup** longer. Records also have a size limit, listed in [Formats and limits](/import/limits/). Three habits pay off: * **One record per thing people find.** To find articles by author, send article records that carry the author’s name. Repeating a value across many records is fine: flat beats nested here. * **Compute signals at export.** A `bestseller` flag or a sales count gives a [boosting rule](/merchandising/boosting/) something to act on. * **Send text, not HTML.** Markup in a title, content or category column is indexed as sent, and visitors see the tags. The import report warns you when it finds some. ## Every document has an id [Section titled “Every document has an id”](#every-document-has-an-id) The id is how an update finds the document it replaces. It comes from the first of these that your data has: 1. **The column with the Unique ID role**, if you picked one on **Search → Setup**. Every row must fill it: a row with it empty is rejected. 2. **A field named `id`.** 3. **The row’s content.** A file or feed with no id gets one made from each row’s values. The same file imported again updates its documents instead of duplicating them. An API push always needs its own `id`, a string or a number. It is the only field the API requires. Give rows an id when you can. Without one, a row whose values change becomes a new document. A whole-number id is kept as it is. Any other id, such as `tee-001` or `0042`, gets a numeric `id` in search results, and your own comes back beside it as `_source_id`. Updates and deletes by your id keep working. Ids are compared as text: `0123` and `123` are two documents, and so are `SKU-1` and `sku-1`. What happens to an id that repeats within one import is on [Formats and limits](/import/limits/#error-codes). ## Title is a role, not a column name [Section titled “Title is a role, not a column name”](#title-is-a-role-not-a-column-name) You don’t need a column called `title`. Title is a **role**, and any column can hold it: `name`, `headline`, `product_name`, whatever your system exports. The same goes for the price, the image and every other [role](/fields/roles/). A role points at a column and leaves its name alone. If your CMS calls the title `headline`, the widget reads `headline` as the title. Move to a CMS that calls it `name`, and you change one choice on **Search → Setup** instead of reshaping your export. When we index your data, each column name gets a stored form without spaces or punctuation. The dashboard keeps showing the names from your export, and nothing in your source is renamed. A role also decides the kind of value its column must hold: a price must be a number. Those checks run on every import, and [Roles](/fields/roles/#value-formats) lists the accepted formats. Next: [Map your fields](/fields/map-fields/) once your data is imported, or [choose how to import](/import/overview/) first. # Roles > Every role a column can hold, what it drives in the widget and AI, and the values it accepts. Source: https://docs.typemo.com/fields/roles/ A role tells Typemo what a column is: the title, the price, the image. It points at the column and leaves its name alone. This page lists every role, what it drives and the values it needs. You set them on [Map your fields](/fields/map-fields/). ## Roles [Section titled “Roles”](#roles) **Search → Setup** shows the roles of the type picked under **What you are building**. | Role | Shown for | What it drives | Needs | | ---------------------- | ----------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------ | | **Unique ID** | Catalog, Docs, API only | The column that identifies a document. On **Auto**, the import picks one. A change applies at the next import. | A value in every row | | **Title** | Catalog, Docs, API only | The first line of each result. The **Title** column is always searched. | Text | | **Image URL** | Catalog, API only | The product card’s photo. With semantic search on, the photo that **Similar** compares. | A link, or several: the first one is shown | | **URL** | Catalog, Docs, API only | Where a click on a result goes, and the link the AI assistant and AI agents cite. | A link | | **Content** | Catalog, Docs, API only | The main text: search matches its words and the AI assistant answers from it. Docs results show it as the excerpt; product cards don’t show it. | Text | | **Category** (catalog) | Catalog | The built-in category filter. In the filter, a path such as `Furniture > Sofas` shows as its last part. | Text, or a list | | **Price** | Catalog | The card’s price, formatted by your [currency setting](/widget/languages-currency/). The built-in price slider and sorting by price. | A number | | **Sale price** | Catalog | The sale price, with the price crossed out beside it. Shown only when it is above 0 and below **Price**. | A number | | **In stock** | Catalog | An out-of-stock product gets a badge and no add-to-cart button. | True or false, or a number column | | **Rating** | Catalog | The stars on the product card. | A number | | **Category** (docs) | Docs | The header results are grouped under. | Text | | **Parent** | Docs | What a result belongs to, such as a section’s page or an article’s subcategory. It shows in the path under the result’s title. | Text | The AI assistant reads the same roles: see [What it reads](/ai-assistant/what-it-reads/). To tell AI what any other column means, give it a [custom role](/fields/custom-roles/). ## Rules [Section titled “Rules”](#rules) * **One column per role.** A column can hold several roles. **Not mapped** clears a role. * **The kind must fit.** Save refuses **Price**, **Sale price** or **Rating** on a column that isn’t a number. It refuses **In stock** on a column that is neither true/false nor a number. The role’s icon turns amber. * **Title is required, with one exception.** On **API only**, with semantic search on and **Image URL** mapped, **Title** can stay empty. Results then come with their id and image. * **An unmapped role hides its part of the result.** A catalog without a price, stock or rating shows cards without them, and is searched the same way. * **Nothing is guessed from a column’s name.** You set each role, or a source with a fixed format sets it: see [Roles set for you](#roles-set-for-you). ## Value formats [Section titled “Value formats”](#value-formats) A role sets the kind of its column at import: **Price** becomes a number, **In stock** true or false. Every value is checked then. A value that doesn’t fit rejects the import with a report naming the row, and search keeps the previous version: see [How syncs work](/import/how-syncs-work/). | Kind | For roles | Accepted | Rejected | | ------- | ------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------- | | number | **Price**, **Sale price**, **Rating** | A plain number with a dot as the decimal separator: `149`, `19.99` | `15,90 €`, `call us` | | boolean | **In stock** | `true`/`false`, `yes`/`no`, `on`/`off`, `1`/`0`, in any case. An empty cell is not an error. | `in stock`, `available` | | link | **URL**, **Image URL** | `https://…`, `//host/…`, or a path from your site root such as `/products/tee`. **Image URL** also takes a list, or links separated by commas. | `products/tee`, a bare number | | list | **Category** (catalog) | A list of values, or a single value | — | | text | **Title**, **Content**, **Category** (docs), **Parent** | Any text. HTML tags are kept and shown as typed; the import report warns about them. | — | A [Google Shopping feed](/import/feeds/#google-shopping) is read in its own notation: prices like `15.00 USD` and availability like `in stock` are understood as they are. A column without a role gets its kind from its values. A column of numbers becomes a number you can filter by range. A column that mixes numbers and text becomes text. A code with a leading zero, such as `0012345`, stays text with its zeros. ## Roles set for you [Section titled “Roles set for you”](#roles-set-for-you) Sources whose format fixes the field names set the roles themselves. You can change them on **Search → Setup**, except on a crawled collection. | Source | Roles it sets | | ------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | [Website crawl](/import/crawler/) | **Title**, **Content** and **URL**, locked as **Set by the crawler**. The crawler also fills the category and the path above each section. Custom roles and **Searchable fields** stay yours. | | Shopify or WooCommerce store, by its address | **Unique ID**, **Title**, **Content** (the description), **URL**, **Image URL**, **Price**, **Sale price**, **In stock** | | [WordPress plugin](/integrations/wordpress-plugin/), WooCommerce products | The store roles plus **Category**. The short description starts as a [custom role](/fields/custom-roles/) named **Summary**. | | WordPress plugin, posts and pages | **Unique ID**, **Title**, **Content**, **URL**, **Image URL**, **Category** | | [Google Shopping feed](/import/feeds/#google-shopping) | **Unique ID**, **Title**, **Content**, **URL**, **Image URL**, **Price**, **Sale price**, **In stock**, **Category**, from Google’s own field names. A feed URL sets them on its first sync, when the collection has no roles yet; an uploaded feed file, in its preview. | ## Docs collections [Section titled “Docs collections”](#docs-collections) The docs widget groups results by a section hierarchy, which it reads from fixed column names: * `hierarchylvl0`: the category, shown as the group header. * `hierarchylvl1`: the parent, such as the page a section belongs to. * `hierarchylvl2` to `hierarchylvl6`: the headings between the parent and the result. A [website crawl](/import/crawler/) and [Index your build](/import/index-your-build/) fill these columns for you. Mapping **Category** and **Parent** points the widget at columns of your own instead. For developers: docs records over the API On an [API push](/import/api-push/), put each record’s own heading in `title`. Put the path **above** it in `hierarchylvl0` to `hierarchylvl6`, broadest first: the category, then the parent, then any headings between. A record never repeats its own heading in the hierarchy. Give a section of a page that page’s URL with its `#anchor`. Records without these columns still work: results show the title and the excerpt, without grouping. ## Roles over the API [Section titled “Roles over the API”](#roles-over-the-api) For developers. `roles` on `POST /v1/collections` and `PATCH /v1/collections/{id}` sets the roles, and `GET /v1/collections/{id}` returns them. The MCP `create_collection` tool takes the same `roles`. A walkthrough with an example is on [Push over the API](/import/api-push/). | Key | Role | | ----------------------------------------- | --------------------------------------------------- | | `id` | **Unique ID** | | `title`, `url`, `image`, `content` | **Title**, **URL**, **Image URL**, **Content** | | `category` | **Category** (catalog) | | `price`, `salePrice`, `inStock`, `rating` | **Price**, **Sale price**, **In stock**, **Rating** | | `hierarchylvl0`, `hierarchylvl1` | **Category** (docs), **Parent** | | `hierarchylvl2` to `hierarchylvl6` | The docs path between the parent and the record | | Rule | Behaviour | | -------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `PATCH` | Merges into the current roles. An empty string clears one. | | Column names | A role names the column as `fields[].name` in `GET /v1/collections/{id}` lists it. That stored name can differ from your header: `Product Name` becomes `product_name`, `in_stock` becomes `instock`. | | Unknown column | `400` naming `roles`. Before the first import, any name is accepted as the coming column. | | Wrong kind | `400` naming `roles`: `price`, `salePrice` and `rating` need a number column; `inStock` a boolean or a number column. | Next: [map your fields](/fields/map-fields/), or [describe a column for AI](/fields/custom-roles/). # Group variants > Show one result per product when your catalog has one row per size or colour. Source: https://docs.typemo.com/fields/variant-grouping/ Many catalogs have one row per variant: a T-shirt in three sizes is three rows. Variant grouping shows them as one result per product. Every variant stays indexed, so a search still finds the size or colour that only one variant has. ## Before you start [Section titled “Before you start”](#before-you-start) * **What you are building** is **Catalog**. The **Variant grouping** card shows only there. * Your data has a column that every variant of one product shares, such as `parent_sku` or `product_id`. If your export has none, build it at export time: the SKU without its size suffix often works. A store connected by its address or through the WordPress plugin starts with grouping on. It groups by its `variant_group` column, and `is_parent` marks the product’s own row. A [Google Shopping feed](/import/feeds/#google-shopping) with `item_group_id` turns grouping on at its first sync and groups by that column. Turn **Group variants** off and every variant is a result of its own; later syncs keep your choice. ## Turn on grouping [Section titled “Turn on grouping”](#turn-on-grouping) 1. Open **Search → Setup** and pick the collection under **Collection**. 2. In the **Variant grouping** card, turn on **Group variants**. ![The Variant grouping card under the Filters card, with Group variants off](/_astro/filters.8h7kKjW2_2tC8NQ.webp) Variant grouping sits under the Filters card 3. Under **Group by field**, pick the column the variants share. 4. Under **Parent marker field**, pick the column that marks the product’s own row, if your data has one. Otherwise leave **Auto (most relevant)**. 5. Click **Save changes** in the bar at the bottom of the page. | Setting | What it does | Default | | ----------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------- | | **Group variants** | Turns grouping on for this collection. | Off; on for a connected store or a grouped Google feed | | **Group by field** | The column the variants of one product share. | — | | **Parent marker field** | A true/false or text column that marks the product’s own row. When variants match equally well, as on the start screen, that row fills the card. The AI assistant describes a product from that row. | **Auto (most relevant)**: the best match, then the most popular variant | A column that is searched but isn’t a filter isn’t offered for either field. To use one, take it out of **Searchable fields** on [Map your fields](/fields/map-fields/) and save first. ## How grouped results look [Section titled “How grouped results look”](#how-grouped-results-look) * **One card per product.** Search matches every variant, then shows the product once. * **The best match fills the card.** A search for *blue tee* shows the blue variant, with its own photo, price and link. * **A badge counts the other matches.** **+N** on a card counts the variants that matched besides the one shown, and the price reads *from*. A search for *blue tee* on a shirt with three blue variants and five red ones shows **+2**. ## Check it worked [Section titled “Check it worked”](#check-it-worked) Search the preview on the right of **Search → Setup** for something your catalog has many variants of, such as *shirt*. With grouping on, you see distinct products; off, the same product several times. The preview applies your unsaved changes. If shoppers compare your variants as separate items, such as the colourways of a sofa, leave grouping off and let [filters](/fields/filters/) do the narrowing. Next: [set up filters](/fields/filters/) for size and colour, or [boost](/merchandising/boosting/) the products you want first. # Glossary > The terms used in the dashboard and these docs, in one alphabetical list. Source: https://docs.typemo.com/glossary/ The words the dashboard and these docs use, A to Z. Each links to the page that covers it. | Term | What it means | | ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | Allowed domains | The sites where the widget and the AI assistant may run. See [Security](/project/security/#widget-allowed-domains). | | Alternative names | Other words people use for each item, written by Typemo so a search in those words finds it. A switch on the collection’s **Settings**: see [Ranking settings](/search/ranking/). | | API key | The credential the widget, your server or an AI agent sends. **Read only** searches; **Write & Read** also changes data. See [Manage API keys](/project/api-keys/). | | Boosting rule | A rule that moves results matching a condition up or down. See [Boosting](/merchandising/boosting/). | | Collection | One searchable set of one kind of content, such as products, articles or pages. It belongs to a project and shows as a tab in the widget. See [Core concepts](/getting-started/concepts/). | | Custom result | A rule that pins or hides documents for specific searches. See [Custom results](/merchandising/custom-results/). | | Custom role | A column you describe in a sentence, so the AI assistant and AI agents know what it holds. See [Describe fields for AI](/fields/custom-roles/). | | Document | One record in a collection: a product, an article, a page. It keeps your fields; `id` is the only one required. | | Exclusion | A condition that hides every matching document from search. The documents stay in the collection. See [Exclusions & stop words](/search/exclusions/). | | Facet | The API’s name for a filter. | | Feed | A URL to a CSV, JSON, XML, Excel or Parquet file that Typemo reads on a schedule. See [Product feeds](/import/feeds/). | | Filter | A column people narrow results by in the widget, such as category, price or stock. See [Filters](/fields/filters/). | | Knowledge | Text the AI assistant reads with every answer, next to your collections. See [Set up the assistant](/ai-assistant/setup/). | | Project | The container for one site or app: its collections, API keys, widget and security settings. See [Project settings](/project/settings/). | | Role | What a column is to the widget and the assistant: the title, the image, the price, the link. See [Roles](/fields/roles/). | | Search language | The per-collection setting for how text is split into words and matched. See [Search language](/search/language/). | | Search region | Where a project’s collections are indexed and searched. See [Project settings](/project/settings/#search-regions). | | Search score | A 0–100 number on **Home**, from how searches ended. See [Analytics overview](/analytics/overview/#search-score). | | Searchable fields | The columns search looks for words in. See [Map your fields](/fields/map-fields/). | | Semantic search | Search that also matches by meaning, not only by words. Paid plans. See [Ranking settings](/search/ranking/). | | Snippet | The script tag that puts the widget on your site. See [Install the widget](/widget/install/). | | Source | Where a collection’s documents come from: a file, a feed, a database, a store, a crawl or the API. See [Choose how to import](/import/overview/). | | Stop word | A word search ignores, such as *the* or *and*. See [Exclusions & stop words](/search/exclusions/). | | Sync | One run that reads a source and replaces the collection with what it found. See [How syncs work](/import/how-syncs-work/). | | Sync log | A collection’s list of runs, each with its counts and a report. **Sync log**, next to **Last sync** on the collection’s **Data** page. | | Synonym | Words search treats as the same, so a search for one finds the others. See [Synonyms](/search/synonyms/). | | Variant group | The sizes and colours of one product, shown as one result. See [Variant grouping](/fields/variant-grouping/). | | Widget | The search interface you put on your site with one script tag, in a catalog and a docs variant. See [Widget](/widget/overview/). | | Zero-result search | A search that found nothing, listed under **Zero result** with a **Fix** button. See [Search performance](/analytics/search-performance/). | Next: [Core concepts](/getting-started/concepts/) shows how projects, collections and documents fit together. # Push over the API > Send documents to a collection from your server as they change, or replace the whole set in one request. Source: https://docs.typemo.com/import/api-push/ For developers This page is for teams whose own backend holds the catalog. To manage data in the dashboard instead, start at [Choose how to import](/import/overview/). Your server sends each change the moment it happens: a new product, a price, a deletion. Search has it within seconds, without waiting for a scheduled sync. To send the whole set at once instead, from a build or a nightly job, [replace everything](#replace-everything). ## Before you start [Section titled “Before you start”](#before-you-start) * **A Write & Read key** from [API keys](/project/api-keys/). Send it as `X-API-Key: sq_…` or as `Authorization: Bearer sq_…`, and keep it on your server. * **A collection with the API as its source.** On a collection that syncs from a feed, a store, a database or a crawl, the next sync replaces what you pushed. ## Send documents [Section titled “Send documents”](#send-documents) Send up to 1,000 documents per request in a `documents` array: POST /v1/collections/{id}/documents ```http POST /v1/collections/{id}/documents X-API-Key: sq_your_write_key Content-Type: application/json { "documents": [ { "id": "tee-001", "title": "Cotton T-shirt", "price": 29.0 }, { "id": "tee-002", "title": "Linen T-shirt", "price": 39.0 } ] } ``` Documents are matched by `id`: an existing one is updated, a new one is created. `id` is the only field the API requires; every other field is stored as sent. | Answer | When | | ------ | ----------------------------------------------------------------------------------------------------------------------------------- | | `200` | Indexed. The body counts the result: `{ "indexed": 2, "rejected": 0, "errors": [], "warnings": [], "documentCount": 1250 }`. | | `400` | A document is invalid. Nothing from the request is indexed, and the body reports each problem. Fix the listed documents and resend. | | `403` | The documents would pass your plan’s document limit. | | `409` | A sync or another import is writing to the collection. Retry shortly. | `warnings` lists documents indexed with a change, such as a text field cut to fit 100 KB (`record_too_large`). Every code is in [Formats and limits](/import/limits/#error-codes). ## Set the roles [Section titled “Set the roles”](#set-the-roles) A push never sets roles from field names. Name them yourself, when you create the collection or later. `PATCH` merges into the current roles, and an empty string clears one: PATCH /v1/collections/{id} ```http PATCH /v1/collections/{id} X-API-Key: sq_your_write_key Content-Type: application/json { "roles": { "title": "title", "url": "link", "content": "description", "price": "price" } } ``` A role must name a column the collection already has. `price`, `salePrice` and `rating` need a column of numbers, and `inStock` one of booleans or numbers. Otherwise the answer is `400`, naming `roles`. `POST /v1/collections` takes the same `roles` before the first push. [Roles](/fields/roles/) lists every role, and [Describe fields for AI](/fields/custom-roles/) covers `fieldMeta`. ## Delete documents [Section titled “Delete documents”](#delete-documents) A push never deletes on its own. To remove documents, send their ids, up to 1,000 per request: POST /v1/collections/{id}/documents/delete ```http POST /v1/collections/{id}/documents/delete X-API-Key: sq_your_write_key Content-Type: application/json { "ids": ["tee-001", "tee-002"] } ``` The answer reports `deleted`, `notFound` (ids the collection didn’t hold) and the new `documentCount`. While a sync or an import is writing to the collection, it answers `409`: retry shortly. * **One document:** `DELETE /v1/collections/{id}/documents/{documentId}`. * **Every document:** `DELETE /v1/collections/{id}/documents?truncate=true`. Without the flag, the request is refused. ## Replace everything [Section titled “Replace everything”](#replace-everything) To swap the whole collection for one snapshot, send `PUT` with one JSON document per line (NDJSON). Documents the snapshot doesn’t list are deleted. PUT /v1/collections/{id}/documents ```http PUT /v1/collections/{id}/documents X-API-Key: sq_your_write_key Content-Type: application/x-ndjson {"id": "tee-001", "title": "Cotton T-shirt", "price": 29.0} {"id": "tee-002", "title": "Linen T-shirt", "price": 39.0} ``` * **Size:** at most 50 MB unzipped. The body may be gzipped with `Content-Encoding: gzip`. A larger one answers `413`. * **Roles:** the snapshot is imported under the collection’s saved roles. Without any, it answers `400`: [set the roles](#set-the-roles) first. * **All or nothing:** a snapshot that fails validation changes nothing, and search keeps the previous documents. * **The answer** is a stream of server-sent events: progress, then `complete` or `error`. `complete` carries `status`, `uploaded`, `diff` (`added`, `updated`, `removed`) and `report`. * **Refusals:** while a sync is running, the answer is `409`. A collection that syncs from a feed, a store, a database or a crawl answers `400`. For a static site, [index your build](/import/index-your-build/) sends this request for you. ## Check it worked [Section titled “Check it worked”](#check-it-worked) Each push shows in the collection’s **Sync log** on the **Data** page as **Incremental sync**, with the count it indexed. `GET /v1/collections/{id}/documents/{documentId}` returns a document as stored. Next: [Map your fields](/fields/map-fields/), or open the [API reference](/api-reference/) for every endpoint. # Crawl a website > Index your site's pages by section: set the scope, the schedule and what each page contributes. Source: https://docs.typemo.com/import/crawler/ The crawler indexes content that lives on your site as pages: documentation, a help centre, a blog. Give it a start URL and it reads your pages, splits each one into sections by heading and indexes every section. A result then links to the exact heading that matched. Paired with the [docs widget](/widget/docs/), it needs nothing mapped by hand. ## Before you start [Section titled “Before you start”](#before-you-start) * Your pages are served over `https://`. * Your `robots.txt` lets the crawler in. See [If the crawl comes back empty](#if-the-crawl-comes-back-empty). ## Set up the crawl [Section titled “Set up the crawl”](#set-up-the-crawl) 1. In the setup wizard, pick your docs platform’s card, or **Website** for any other site. For an existing collection, open its **Data** page and click **Change source type**. Switching deletes the documents the collection holds. 2. In **Website URL**, paste the root of what you want indexed, such as `https://example.com/docs`. 3. Fill in the other settings you need (see the table below), and pick a **Schedule**. 4. Click **Continue**, or **Open dashboard** when you add a collection later. The first crawl starts right away. ![Data → Configure on a crawled blog: Website URL, Sitemap URL, Schedule set to Daily, the Only include and Skip pages pattern fields, the Content and Exclude selector fields, and Preview a page](/_astro/crawler-form.SHQ8y6uX_Z1B4CGM.webp) The crawl settings under Configure Later, under **Configure** on the **Data** page, the line under **Website URL** shows what the crawl covers: *Crawls example.com/docs/ — 412 pages in the sitemap.* If it names one page, you pasted a page instead of the root. | Setting | What it does | | ------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | **Website URL** | Where the crawl starts and what it covers: pages on the same host, under the same path, taken from where the URL lands after redirects. `/docs` covers `/docs` and below, never `/blog`. A root URL covers the whole host. | | **Sitemap URL** | Optional. Without it, Typemo finds a sitemap in the usual places, such as `/sitemap.xml` or your `robots.txt`. With no sitemap, the crawler follows links. | | **Schedule** | **Manual only** (default), **Every 6 hours**, **Daily** or **Weekly**. | | **Only include pages matching** | Paths to crawl instead of the start URL’s path, one glob pattern per line. | | **Skip pages matching** | Paths to leave out even when they’re in scope, one glob pattern per line. | | **Content selectors** | CSS selectors, one per line. Only text inside them is indexed. See [Choose what the crawler reads](#choose-what-the-crawler-reads). | | **Exclude selectors** | CSS selectors, one per line. Matching elements are never indexed. | Tag pages, paginated archives and filtered listings are the usual pages to skip. They repeat content the real pages already carry: Skip pages matching ```text /blog/tag/** /docs/archive/** ``` ## Crawl again [Section titled “Crawl again”](#crawl-again) On the collection’s **Data** page, click **Recrawl now**. After a failed crawl, the notice on the same page offers **Crawl again**. To change a setting, click **Configure**, edit it and click **Save settings**. The next crawl reads every page again under the new settings. A re-crawl reads only the pages that changed, and an unchanged page keeps its results, boosts included. For that, give your pages a `` in the sitemap, or have your server send `ETag` or `Last-Modified`. Without either, every page is read in full each time. ### Crawl after a deploy [Section titled “Crawl after a deploy”](#crawl-after-a-deploy) For developers Your deploy pipeline can start a crawl once the new pages are live, without waiting for the schedule. ```bash curl -s -X POST "https://api.typemo.com/v1/collections/{collectionId}/source/sync" \ -H "X-API-Key: sq_your_write_key" ``` The call needs a **Write & Read** key from [API keys](/project/api-keys/). It answers `202` with `{ "status": "queued" }`, and the run appears in the sync log. While a crawl is queued or running, it answers `409`: call again once it finishes. Rate limits are in [Formats and limits](/import/limits/#request-limits). ## What gets indexed from each page [Section titled “What gets indexed from each page”](#what-gets-indexed-from-each-page) Every heading starts a result that carries all the text under it. A long section is split into several results, so no text is lost. A result links to its heading when the heading has an anchor on your page, and to the page otherwise. The crawler reads the page’s main content. It takes the first of these that the page has: 1. Your **Content selectors**. 2. Elements marked `data-pagefind-body`. 3. `
`, then an element with `role="main"`, then `
`. 4. The whole ``, with headers and sidebars outside an article left out. Navigation, footers, buttons, forms, dialogs, screen-reader-only text, a header outside an article that holds no `

`, a heading’s `#` or `¶` link and anything marked `data-pagefind-ignore` are always left out. So is a block of nothing but links next to the page title (a breadcrumb before it, previous and next links after the content), and a heading in the header that holds the `

`, such as an author’s name, reads as text rather than starting a section. Text in tabs, collapsed blocks and callouts inside the content stays in. ## Choose what the crawler reads [Section titled “Choose what the crawler reads”](#choose-what-the-crawler-reads) Use selectors when a page has no `
` or `
`, or when its theme puts a sidebar inside the content. 1. On the collection’s **Data** page, click **Configure**. 2. In **Content selectors**, list the elements that hold your content. In **Exclude selectors**, list the parts to drop inside them, such as a table of contents or a feedback box: Content selectors ```text .docs-content ``` Exclude selectors ```text .table-of-contents .feedback ``` 3. Under **Preview a page**, paste any address on your site and click **Preview**. You see the results a crawl would index there with the selectors as typed, saved or not. **Not indexed** lists every block left out and why. ![Preview a page on a blog: the last results with their heading trails, and the open Not indexed list naming each left-out block and the rule that excluded it](/_astro/crawler-preview.DO7D6rZK_ZjRwfC.webp) Preview a page, with Not indexed open 4. Click **Save settings**, then **Recrawl now** to apply the change to every page. ## Pages the crawler skips [Section titled “Pages the crawler skips”](#pages-the-crawler-skips) * **Pages in another language.** A page whose `` names another language than the collection’s is skipped. An English collection keeps `en` and `en-US` pages; a page without `lang` is kept. To index another language, create a collection in that language and start it at that language’s root. * **Older docs versions.** Docusaurus marks pages of older and unreleased versions with a version banner. Those pages are skipped, so results point at the current docs. * **Pages that are gone.** A page that answers `404` or `410` leaves the index. Each skip reason shows as one warning in the sync log, for example *Skipped 312 page(s) in another language*. The page and depth limits of one crawl are in [Formats and limits](/import/limits/#crawl-limits). ## The crawler’s identity [Section titled “The crawler’s identity”](#the-crawlers-identity) The crawler obeys your `robots.txt`, only follows links on the host you gave it, and always sends this User-Agent: User-Agent ```text TypemoCrawler/1.0 (+https://typemo.com/bot) ``` [typemo.com/bot](https://typemo.com/bot) tells the owner of a crawled site the same, with the `robots.txt` lines that allow or block the crawler. ## If the crawl comes back empty [Section titled “If the crawl comes back empty”](#if-the-crawl-comes-back-empty) A crawl that finishes with 0 pages, or says the site blocked it, means your site or the firewall in front of it turned the crawler away. Search keeps the documents it had. 1. **Check `robots.txt`.** Make sure the pages you want indexed aren’t disallowed for `*` or for `TypemoCrawler`. A pre-launch site often has `User-agent: *` with `Disallow: /`, which blocks every crawl. 2. **Allow the User-Agent.** In your firewall or bot-protection rules, let requests whose User-Agent contains `TypemoCrawler` through. 3. **Crawl again.** On the **Data** page, click **Recrawl now**, then check the **Sync log**. Next: [Set up the docs widget](/widget/docs/), or read [How syncs work](/import/how-syncs-work/). # Database > Keep a collection in sync with a table or view in your PostgreSQL or MySQL database. Source: https://docs.typemo.com/import/database/ Typemo can read one table or view from your PostgreSQL or MySQL database on a schedule. Each row becomes a document, and every run replaces the collection with the rows the table holds now. You don’t need to build an export or a feed. ## Before you start [Section titled “Before you start”](#before-you-start) * **The database is reachable from the internet.** Typemo connects from its own servers, and the host name must resolve to a public address. Private and internal addresses are refused. * **A user that can only read the table.** Typemo opens the database read-only and only for as long as it takes to copy the table. A read-only user makes sure of it on your side too. To create that user: PostgreSQL ```sql CREATE ROLE typemo_reader LOGIN PASSWORD '…'; GRANT CONNECT ON DATABASE shop TO typemo_reader; GRANT USAGE ON SCHEMA public TO typemo_reader; GRANT SELECT ON public.products TO typemo_reader; ``` MySQL ```sql CREATE USER 'typemo_reader'@'%' IDENTIFIED BY '…'; GRANT SELECT ON shop.products TO 'typemo_reader'@'%'; ``` ## Connect the table [Section titled “Connect the table”](#connect-the-table) 1. Pick **Database** in the setup wizard. For an existing collection, open its **Data** page and click **Change source type**. Switching deletes the documents the collection holds. 2. In **Connection URL**, paste the address with the user and password: `postgres://user:password@host:5432/database` or `mysql://user:password@host:3306/database`. 3. In **Table or view**, name the table: `products`, or `public.products` with its schema. 4. Click **Check connection**. Typemo shows the table’s row count, its columns and its first rows, so you see the values before the first sync. 5. Under **Sync**, pick how often to read the table: **Every 2 hours**, **Every 6 hours**, **Daily** (the default) or **Weekly**. 6. Click **Continue**, or **Open dashboard** when you add a collection later. The first sync starts right away. ![The setup wizard with the Database card picked: Connection URL and Table or view filled in, the Check connection button, and Sync set to Daily](/_astro/database-form.VYKaBBb-_rmjvY.webp) The Database card in the setup wizard Once the first sync lands, mark which column is the title, the price and the rest on **Search → Setup**. See [Map your fields](/fields/map-fields/). Shape the rows with a view To join tables, rename columns or leave rows out, create a view in your database and name the view in **Table or view**. ## Edit the source later [Section titled “Edit the source later”](#edit-the-source-later) On the collection’s **Data** page, click **Configure**. Click **Save** to keep your changes, or **Sync now** to read the table at once. The password is stored encrypted and never shown again. The form shows the address without the user and password, and the saved ones keep working while the address stays the same. To change the password, paste the full URL again. ## How values arrive [Section titled “How values arrive”](#how-values-arrive) Values are typed the way CSV cells are: `24.90` becomes a number and `0042` stays text. Arrays and JSON columns arrive as text. The full rules are in [How values are typed](/import/limits/#how-values-are-typed). ## Check it worked [Section titled “Check it worked”](#check-it-worked) On the **Data** page, click **Sync log** next to **Last sync**. Each run shows how many documents it indexed. If the database can’t be reached or the read fails, search keeps the previous version and **Details** shows the reason. A table that hasn’t changed since the last sync leaves search untouched. Next: [Map your fields](/fields/map-fields/), or read [How syncs work](/import/how-syncs-work/). # Product feeds > Keep a collection in sync with a file at a URL, including a Google Shopping feed. Source: https://docs.typemo.com/import/feeds/ A feed is a URL that returns your whole catalog as one file. Typemo fetches it on your schedule and replaces the collection with what it finds. Use a feed when a store platform, a PIM or your own build already publishes such a file. ## Before you start [Section titled “Before you start”](#before-you-start) You need a public `https://` URL that returns the catalog in a [supported format](/import/limits/#file-formats), up to 50 MB. Typemo tells the format from the file, so there is nothing to pick. ## Connect the feed [Section titled “Connect the feed”](#connect-the-feed) 1. Pick **Data feed** in the setup wizard. For an existing collection, open its **Data** page and click **Change source type**. Switching deletes the documents the collection holds. 2. Paste the URL into **Feed URL**. 3. Click **Check feed**. Typemo fetches the file and shows its row count, its columns and its first rows, so you see the values before the first sync. 4. Under **Auto Sync**, pick how often to fetch the feed. See [Choose a schedule](#choose-a-schedule). 5. Click **Continue**, or **Open dashboard** when you add a collection later. The first sync starts right away. ![Data feed picked under Change source type: the warning that switching deletes the documents, the Feed URL with Check feed, the result with 40 rows, 7 columns and the first five rows, and Auto Sync set to Daily](/_astro/feed-form.Csy9vWfz_Z2kPhHs.webp) A checked feed before its first sync Once the first sync lands, mark which column is the title, the price and the rest on **Search → Setup**. See [Map your fields](/fields/map-fields/). ## Choose a schedule [Section titled “Choose a schedule”](#choose-a-schedule) **Auto Sync** offers: * **Manual only**, the default: the feed syncs only when you click **Sync**. * **Every 2 hours**, **Every 6 hours**, **Daily** or **Weekly**, counted from the last sync. Pick by how fast your catalog changes. Prices that move daily want a short interval; a list that changes monthly is fine on **Manual only**. Every run reads the whole feed, and a feed that hasn’t changed since the last sync is skipped. ## Change the URL or the schedule [Section titled “Change the URL or the schedule”](#change-the-url-or-the-schedule) On the collection’s **Data** page, click **Configure**. Edit **Feed URL** or **Auto Sync**, then click **Sync**: it saves your changes and runs a sync at once. ## Google Shopping [Section titled “Google Shopping”](#google-shopping) If you already publish a Google Merchant feed, pick **Google Shopping** instead of **Data feed** and paste its URL: XML, or a TSV or CSV file headed by Google’s columns (`id`, `title`, `link`, `price`, `availability`). On the first sync, when the collection has no roles yet, Google’s field names set them: | Google field | Role | | -------------- | -------------- | | `id` | **Unique ID** | | `title` | **Title** | | `description` | **Content** | | `link` | **URL** | | `image_link` | **Image URL** | | `price` | **Price** | | `sale_price` | **Sale price** | | `availability` | **In stock** | | `product_type` | **Category** | Roles you change later stay yours. Typemo also reads the feed’s own notation: * A price such as `15.00 USD` becomes the number `15.00`. * `in stock`, `preorder` and `backorder` count as in stock; `out of stock` does not. * Items that share an `item_group_id` are variants of one product: the first sync turns on **Variant grouping** by it, so search shows one result per product. An item without one is a product of its own. A variant’s title loses the size, colour or other variant attribute Google asks you to add (“Shirt - S” reads “Shirt”), and keeps it in `variant_title`: map **Title** to that column if you turn grouping off and want each variant’s own title. Any XML feed is read this way, as a Google Shopping, RSS or Atom product feed, and so is a text file with Google’s columns. It syncs on the same schedule as any other feed. ## From a store platform [Section titled “From a store platform”](#from-a-store-platform) Magento, BigCommerce and PrestaShop have no built-in feed at a URL: their own Google tools send products straight to Google Merchant Center, and their product export is a one-off file. To connect one of them, install a Google Shopping feed extension, app or module that publishes the feed at a public URL, then paste that URL under [Google Shopping](#google-shopping). Many stores already run one for Google Ads. ### Magento [Section titled “Magento”](#magento) Magento Open Source and Adobe Commerce no longer bundle a Google Shopping channel ([Adobe’s FAQ](https://experienceleague.adobe.com/en/docs/commerce-knowledge-base/kb/faq/google-shopping-ads-channel-faqs)). Pick a Google Shopping feed extension that writes the feed to a URL on your store. The free [Mage-OS Shopping Feed](https://packagist.org/packages/mage-os/module-shopping-feed) installs with Composer and writes a TSV under `/media/mageos-shopping-feed/`; configurable products come out as one row per variant. ### BigCommerce [Section titled “BigCommerce”](#bigcommerce) The Google app syncs your catalog into Merchant Center without a feed URL ([BigCommerce’s guide](https://support.bigcommerce.com/articles/en_US/Knowledge/Google-Shopping)). Use a feed app from the BigCommerce App Marketplace that publishes a Google Shopping feed URL. ### PrestaShop [Section titled “PrestaShop”](#prestashop) The PrestaShop Marketing with Google module sends products to Merchant Center without a feed URL. Pick a Google Shopping feed module that publishes the feed at a URL, such as the free [Google Shopping Flux](https://github.com/d1m007/gshoppingflux), which writes `/googleshopping-s1--.xml` at the shop’s root. In its settings, turn on **Export non-available products** and **Export attributes**, and set the root category’s availability to follow stock: by default it leaves out products out of stock, drops the sale prices of combinations and marks every product in stock. ### Then, on every platform [Section titled “Then, on every platform”](#then-on-every-platform) 1. Paste the feed URL under **Google Shopping** and pick a schedule. 2. Add the widget to your theme with its [script tag](/widget/install/). 3. For the cart button and purchases, connect the two [events](/widget/events/) from your theme. ## Check it worked [Section titled “Check it worked”](#check-it-worked) On the **Data** page, click **Sync log** next to **Last sync**. Each run shows how many documents it indexed. A failed run leaves search on the previous version; **Details** shows the reason. [How syncs work](/import/how-syncs-work/) explains what a run does when the feed breaks. ## No feed yet? [Section titled “No feed yet?”](#no-feed-yet) * **A static site:** [`typemo index --output`](/import/index-your-build/#write-a-feed-file-instead) writes a feed file from your build output. * **A PostgreSQL or MySQL table:** Typemo can [read the table](/import/database/) directly. * **Your own backend:** [push changes over the API](/import/api-push/). Next: [Map your fields](/fields/map-fields/), or read [How syncs work](/import/how-syncs-work/). # How syncs work > Why a failed sync never breaks live search, why one bad record stops a sync, when an unchanged source is skipped and when a schedule pauses. Source: https://docs.typemo.com/import/how-syncs-work/ Search keeps serving the previous catalog until a sync finishes cleanly. If a sync fails, nothing changes, so visitors never see a half-updated or empty catalog. This holds for an upload, a feed, a database, a store, a crawl, an API replace and `typemo index`. A push over the API changes only the documents it names. ## Why one bad record stops a sync [Section titled “Why one bad record stops a sync”](#why-one-bad-record-stops-a-sync) Typemo checks the values in every column that has a role: a price must be a number, a stock flag a boolean. [Roles](/fields/roles/) lists what each role accepts. One record that fails stops a scheduled sync, and one document that fails rejects a whole push request. Your catalog stays in one of two known states: the previous one or the new one. The report tells you exactly what to fix. Each problem names the column, the value it expected, the line or record, and how many rows share it. Fix those rows in your source, or set that role to **Not mapped** on **Search → Setup**, and the next sync goes through. Two methods differ: * **An upload lets you choose.** You’re there to decide, so **Import N valid rows** indexes the rest and skips the listed rows. It isn’t offered when a column with a role is missing: skipping rows can’t fix that, and you’d quietly lose a whole field. A scheduled sync runs unattended, so it has no such override. * **A crawl skips a page it can’t read.** A website always has a few broken pages, so the crawl lists them in the report and indexes the rest. A record over 100 KB is never rejected for its size alone. Its longest text field is cut to fit, and the report carries a warning. ## Why a failed read deletes nothing [Section titled “Why a failed read deletes nothing”](#why-a-failed-read-deletes-nothing) A document leaves the catalog only when a complete, successful read of the source no longer contains it. None of these delete anything: * a feed that comes back empty or broken; * a fetch that dies halfway; * a file with an unreadable row that hides the rows after it; * a crawl that gets blocked, or where most pages fail. A first crawl still publishes what it read, since there is nothing older to protect. A source that really dropped items is followed, and those documents go. Replaced the wrong data with an upload or a sync you started yourself? [Contact us](mailto:info@typemo.com): we may be able to restore the previous catalog. ## Syncs that run on their own [Section titled “Syncs that run on their own”](#syncs-that-run-on-their-own) A feed, a database, a store or a crawl on a schedule follows the same rules unattended, with two more: * **An unchanged source is skipped.** When nothing changed, search is left alone, and the sync log shows the run with 0 indexed. A change to the roles or the source’s settings makes the next run rebuild once, even from an unchanged source. * **Five failures in a row pause the schedule.** Automatic syncs stop and the project owner gets an email. Search keeps serving the last good version the whole time; only updates stop. A successful run turns the schedule back on. So does starting a sync yourself on a feed, store or database, or dismissing the failure notice on the **Data** page. ## Updates during a sync [Section titled “Updates during a sync”](#updates-during-a-sync) While a sync runs, single changes wait for it. A push or a delete through the API answers `409`, and the WordPress plugin keeps the edit and sends it again on its next run. ## The sync log [Section titled “The sync log”](#the-sync-log) Every run is logged: an import, a sync, a crawl, a push, successful or not. On the collection’s **Data** page, click **Sync log** next to **Last sync**. ![The Data page with the Sync log opened from the Last sync cell](/_astro/sync-log.DrofuYnN_1jxWQ7.webp) Data → Sync log, next to Last sync Each entry shows the run’s type, such as **Full sync** or **Incremental sync** for a push, how many documents it indexed, failed and skipped, and when it started. **Details** opens the run’s report: every problem with its line, record or page. Nothing is dropped silently: if a record isn’t in your index, its run’s report says why. What each problem means and how to fix it is in [Formats and limits](/import/limits/#error-codes). Next: [Look up an error code](/import/limits/#error-codes), or follow [An import failed](/troubleshooting/import-errors/). # Index your build > Index a static site from its build output with one command after each build, in the same sections the crawler makes. Source: https://docs.typemo.com/import/index-your-build/ For developers This page is for sites built into HTML files: Astro, Docusaurus, Hugo, VitePress, Jekyll and the like. To manage data in the dashboard instead, start at [Choose how to import](/import/overview/). `typemo index` reads the HTML pages your build wrote and replaces a collection’s documents with them. It splits each page into sections exactly as the [crawler](/import/crawler/) does, with the same record ids, so a collection can move between the two. Nothing is fetched from your site, and a page you delete leaves search with the next deploy. ## Before you start [Section titled “Before you start”](#before-you-start) * **Node.js 20.18.1 or newer** in your build. * **A Write & Read key** from [API keys](/project/api-keys/), stored as `TYPEMO_KEY` in your CI secrets. * **A collection that doesn’t sync on its own.** One that syncs from a feed, a store, a database or a crawl refuses the command: its next sync would replace what you sent. ## Run it after every build [Section titled “Run it after every build”](#run-it-after-every-build) 1. Install the package in your site’s project: * npm ```sh npm i -D @typemo-org/cli ``` * pnpm ```sh pnpm add -D @typemo-org/cli ``` * yarn ```sh yarn add -D @typemo-org/cli ``` * bun ```sh bun add -d @typemo-org/cli ``` 2. Run `typemo index` on the build output right after the build: package.json ```json { "scripts": { "build": "astro build", "postbuild": "typemo index dist --site https://docs.example.com" } } ``` 3. Build. The command prints what it skipped and how many records it read, then waits for the import. It ends with `Indexed N records in ; M removed`. The whole set is replaced in one step: until the import succeeds, search keeps the previous documents. A collection without roles gets the crawler’s: **Title**, **Content** and **URL**. | Option | What it does | | ------------------- | ---------------------------------------------------------------------------------------------------------- | | `--site ` | Where the build is served. Needed for any page without its own absolute canonical link. | | `--collection ` | The collection to replace. Needed when the key reaches more than one. | | `--clean-urls` | Your host serves `about.html` at `/about`. | | `--output ` | Write the records to a file and send nothing. See [Write a feed file instead](#write-a-feed-file-instead). | | `--api-url ` | Another API base, ending in `/v1`. Also read from `TYPEMO_API_URL`. | ## Which pages are read [Section titled “Which pages are read”](#which-pages-are-read) Every `.html` file under the directory, except these. For each reason, the command prints how many pages it skipped and the first three paths. | Skipped | Why | | ---------------------------- | ----------------------------------------------------------------------------------------- | | `404.html` | It’s your not-found page. | | `noindex` | The page carries ``. | | Redirect stub | The page carries ``, which static hosts write for moved pages. | | In another language | Its `` differs from the collection’s language. | | Older docs version | A Docusaurus page of an older or unreleased version. | | Without `data-pagefind-body` | Some page marks its content with `data-pagefind-body`, and this one doesn’t. | | Without a URL | No `--site` and no absolute canonical link. | | Without text | The page holds nothing to index. | Within a page, what becomes a record follows the crawler’s rules: see [What gets indexed from each page](/import/crawler/#what-gets-indexed-from-each-page). A site that already marks its content with `data-pagefind-body` needs no other setup. ## Where each result links [Section titled “Where each result links”](#where-each-result-links) A page’s own `` wins when it’s on the same site. Otherwise the link is `--site` plus the file’s path: | File in the build | Link | With `--clean-urls` | | ------------------ | ------------------- | ------------------- | | `index.html` | `/` | `/` | | `guide/index.html` | `/guide` | `/guide` | | `guide/setup.html` | `/guide/setup.html` | `/guide/setup` | `--site` may carry a base path, such as `https://example.com/docs/`. ## Write a feed file instead [Section titled “Write a feed file instead”](#write-a-feed-file-instead) Without an API key in your build, write the records to a file: Terminal ```bash typemo index dist --site https://docs.example.com --output dist/typemo.ndjson ``` `--output` writes one record per line and sends nothing. Deploy the file with your site and point a [product feed](/import/feeds/) at its URL. The command doesn’t know the collection here, so it keeps pages in every language. ## Check it worked [Section titled “Check it worked”](#check-it-worked) The command exits `0` once the import has succeeded, and `1` on any error, so a broken build fails your CI. Errors include: * `TYPEMO_KEY` isn’t set and there’s no `--output`; * the key reaches several collections and `--collection` is missing; * no pages found in the directory; * the records are over 50 MB, the [size limit](/import/limits/#size-limits), and nothing was sent; * a sync of the collection is running: run the command again once it finishes; * the import was refused: the command prints each reason, and the collection is unchanged. Next: [Set up the docs widget](/widget/docs/) to search the collection. # Formats and limits > The file formats Typemo reads, the size, request and crawl limits of every import method, and the error codes an import reports. Source: https://docs.typemo.com/import/limits/ The formats, limits and error codes that apply to every import method, on every plan. Only the total number of documents depends on your plan: see [Plans and billing](/account/billing/). Search traffic has its own limit, under [Rate limiting](/project/security/#rate-limiting). ## File formats [Section titled “File formats”](#file-formats) An upload takes every format below. A feed takes every format but SQLite. Typemo tells the format from the file’s name and content, so there is nothing to pick. | Format | Extensions | How it’s read | | -------- | ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | CSV, TSV | `.csv`, `.tsv`, `.txt` | The first row is the header. Quote values that contain the separator. | | JSON | `.json` | An array of objects, or one object per line. An API answer such as `{"products": [...], "count": 40}` is read from its one array of items, unless it says it is one page of a longer list; any other single object is refused. | | NDJSON | `.jsonl`, `.ndjson` | One object per line. | | XML | `.xml` | A Google Shopping, RSS or Atom product feed: one product per `` or ``. Other XML is refused. | | Excel | `.xlsx` | The first sheet; its first row is the header. The older `.xls` isn’t read. | | Parquet | `.parquet` | Column names come from the file. Nested columns arrive as text. | | SQLite | `.sqlite`, `.sqlite3`, `.db` | One table or view: the one with the most rows, or the one you pick under **Table**. A `.sql` dump isn’t read. | Text files may be UTF-8, or UTF-16 with a byte-order mark. Any other text is read as Windows-1252, the encoding of Excel on Windows. A binary file sent under a text name is refused. ## How values are typed [Section titled “How values are typed”](#how-values-are-typed) CSV, Excel, Parquet, XML, SQLite and database values arrive as text and are typed one value at a time. JSON keeps the types it has. | Value | Stored as | | ------------------------------------------ | ----------------------- | | Empty | No value | | `true`, `false`, any case | Boolean | | A number, such as `24.90` | Number | | A code with a leading zero, such as `0042` | Text, so the zeros stay | | Anything else | Text | A role can ask for more, such as a number for **Price**: [Roles](/fields/roles/) lists what each role accepts. ## Size limits [Section titled “Size limits”](#size-limits) | Limit | Value | | ---------------------------------------- | ------------------------------------------------------------ | | Uploaded file or fetched feed | 50 MB | | API replace (`PUT …/documents`) | 50 MB unzipped | | One document, serialized as JSON | 100 KB: the longest text field is cut to fit, with a warning | | Fields per document | 256 | | Documents per API request (push, delete) | 1,000 | | Distinct problems listed in one report | 20; repeats of a problem are counted, not listed | ## Request limits [Section titled “Request limits”](#request-limits) Counted per API key. A request over the limit answers `429` with a `Retry-After` header. | Request | Limit | | ---------------------------------------------- | -------------------------------- | | Push documents (`POST …/documents`) | 100 per minute | | Delete documents (`POST …/documents/delete`) | 100 per minute | | Get or delete one document | 200 per minute each | | Replace every document (`PUT …/documents`) | 15 per 10 minutes | | Start a sync or a crawl (`POST …/source/sync`) | 5 per 10 minutes, per collection | ## Sync limits [Section titled “Sync limits”](#sync-limits) | Limit | Value | | ----------------------------------- | -------------------------------------------------------------------------------------------- | | Feed URL | `https://` on the default port, at a public address, with up to 3 redirects | | Feed fetch | 60 seconds; a feed that doesn’t answer fails the sync, and search keeps the previous version | | Time for one sync | Feed: 5 minutes. Database: 15 minutes. Store: 60 minutes | | Shortest schedule | Every 2 hours for a feed, database or store; every 6 hours for a crawl | | Failures before the schedule pauses | 5 in a row | ## Crawl limits [Section titled “Crawl limits”](#crawl-limits) | Limit | Value | | -------------------------------- | ------------------------------------------ | | Pages indexed per crawl | 2,000 | | Page loads per crawl | 10,000 | | Link depth, when following links | 5 clicks from the start URL | | Sitemap file | 50 MB; sitemap indexes nest up to 2 levels | | A crawl where many pages fail | Search keeps the previous version | Reaching the page, load or depth limit stops the crawl. It publishes what it read and names the limit in a `source_truncated` warning. On Free, when the document limit runs out mid-crawl, the crawl publishes what fits. ## Error codes [Section titled “Error codes”](#error-codes) Every problem an import reports carries one of these codes. The API response and `typemo index` print the code; the dashboard’s report shows its message with the line, record or page. Codes marked *warning* leave the record indexed. | Code | What it means | What to do | | -------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------ | | `parse_error` | A row couldn’t be read, such as a JSON line that isn’t an object. | Fix the file around the reported line. | | `parser_fatal` | The file can’t be read as a whole: broken JSON or XML, a single JSON object instead of a list, or a binary file. | Fix the file near the reported line, or export it again. | | `missing_id` | A document sent over the API has no `id`, or a row leaves the column marked **Unique ID** empty. | Add the id, or mark a column that every row fills as **Unique ID**. | | `invalid_id` | `id` isn’t a string or a number. | Send the id as a plain string or number. | | `duplicate_id` | *Warning.* The same id appears more than once; the last row wins. Identical rows without ids merge into one. | Remove the duplicates at the source if that’s not what you meant. | | `record_too_large` | *Warning.* The document is over 100 KB. Its longest text field was cut to fit. Only a document text can’t shrink is rejected. | Nothing, unless the cut text mattered for search: shorten that field at the source. | | `too_many_fields` | The document has more than 256 fields. | Drop the fields you don’t search, show or filter on. | | `invalid_field_type` | A value doesn’t fit its column, such as text in a **Price** column, or a **URL** or **Image URL** column holding something that isn’t a link. | Fix the value, or change the column’s role or type on **Search → Setup**. | | `missing_mapped_column` | A column that has a role is missing from the incoming data. | Restore the column at the source, or give the role to another column on **Search → Setup**. | | `html_in_text` | *Warning.* A text column with a role, such as **Content**, holds HTML tags. They are indexed and shown as plain text. | Strip the markup at the source. | | `excluded_by_source` | The source left the record out: the WordPress plugin’s rules, or crawled pages in another language or an older docs version. | Change the source’s rules if the record should be indexed. | | `source_truncated` | *Warning.* A store product has more than 100 variants or collections, or a crawl reached a limit. What fit was imported. | Nothing, unless the missing part matters: then contact us. | | `file_too_large` | The file is over 50 MB. | Split the file, or drop the fields search doesn’t need. | | `too_many_documents` | The request carries more than 1,000 documents. | Send smaller batches. | | `unsupported_format` | The file isn’t in a [format Typemo reads](#file-formats). | Export it in one of those formats. | | `empty_feed` | The source returned no records. | Check that the URL returns your data, not an empty or error page. | | `feed_unreachable` | The feed URL couldn’t be fetched. | Check that the URL is public and answers. | | `plan_limit_reached` | The Free plan’s document total is used up. Paid plans keep importing past their limit. | See [Plans and billing](/account/billing/). | | `index_rejected` / `index_unavailable` | Search refused the write. In a collection of images only, a record without a photo that can be downloaded is refused too. | Retry, and contact us if it persists. For a photo, check that its URL is public and loads. | | `image_not_embedded` | *Warning.* A product’s photo couldn’t be downloaded, so it has no **Similar** results. Its text search works. | Check that the photo URL is public and loads; the next sync tries again. | | `crawl_page_failed` | A page couldn’t be fetched. | Check that the page loads publicly; the sync log gives the reason. | | `crawl_blocked` | The site or its firewall turned the crawler away. | Let the crawler in: see [If the crawl comes back empty](/import/crawler/#if-the-crawl-comes-back-empty). | | `crawl_no_landmark` | *Warning.* The page has no `
` or `
`, so its whole body was indexed, menus included. | Add a content selector: see [Choose what the crawler reads](/import/crawler/#choose-what-the-crawler-reads). | | `crawl_empty_page` | *Warning.* The page gave nothing to index. | Preview the page to see what was left out and why. | | `crawl_js_rendered` | *Warning.* The page draws its text with JavaScript, and the server sent an empty shell. | Serve the content as HTML, with server-side rendering or prerendering. | Next: [How syncs work](/import/how-syncs-work/) explains when a problem stops a sync. # Choose how to import > The five ways data reaches a collection, how each keeps search current, and which one fits your data. Source: https://docs.typemo.com/import/overview/ A collection gets its documents in one of five ways. They differ in who starts an import, how fresh the data stays and what happens to documents your source no longer has. Pick the one that matches where your data lives today. ![The source cards grouped into E-commerce, Docs & sites and Other, with the current source marked](/_astro/source-cards.CfRFG6Sq_Z2guOkc.webp) The source cards, grouped by where your data lives ## The five methods [Section titled “The five methods”](#the-five-methods) | Method | Who starts it | How fresh | Removes what your source dropped | | -------------------------------------------------------------------- | ------------------------------------- | --------------------------- | -------------------------------- | | [Sync from a source](#sync-from-a-source) | Typemo, on a schedule or **Sync now** | Every 2 hours to weekly | Yes | | [Upload a file](/import/upload-file/) | You, in the dashboard | Until you upload again | Yes: a new file replaces the set | | [Push changes over the API](/import/api-push/) | Your server, when a record changes | Seconds | Only what you delete | | [Replace the set over the API](/import/api-push/#replace-everything) | Your server or build, when it decides | The moment you send it | Yes | | [Crawl your website](/import/crawler/) | Typemo, on a schedule or after deploy | Your schedule, or on deploy | Yes | ## Pick by where your data lives [Section titled “Pick by where your data lives”](#pick-by-where-your-data-lives) * **A store, a database or a feed already holds it:** sync from a source. There is nothing to program. * **Your own backend changes it all the time:** push each change over the API. Replace the whole set now and then, so a delete you missed doesn’t leave old documents behind. * **A build or a job produces the whole set at once:** replace the set over the API. For a static site, [index your build](/import/index-your-build/) does it in one command. * **All you have is the website:** crawl it. * **You want to try Typemo, or the data rarely changes:** upload a file. ## Sync from a source [Section titled “Sync from a source”](#sync-from-a-source) Five sources work the same way: on every run, Typemo reads the whole source and replaces the collection with what it found. | Source | What you give Typemo | Guide | | --------------- | --------------------------------------------------------------- | ------------------------------------------------- | | Product feed | A URL to a CSV, JSON, XML, Excel or Parquet file | [Product feeds](/import/feeds/) | | Google Shopping | Your Merchant feed’s XML URL; the fields map themselves | [Google Shopping](/import/feeds/#google-shopping) | | Database | A PostgreSQL or MySQL table or view, read with a read-only user | [Database](/import/database/) | | Shopify | Your store address | [Shopify](/integrations/shopify/) | | WooCommerce | Your store address, or the WordPress plugin | [WooCommerce](/integrations/woocommerce/) | A run whose source hasn’t changed is skipped. The WordPress plugin adds one thing on top of its daily full sync: it sends each product edit within about five minutes. ## What every method shares [Section titled “What every method shares”](#what-every-method-shares) * **Search never goes empty.** A full replace goes live only when it succeeds. * **A failed or partial read deletes nothing.** Search keeps the last good version. [How syncs work](/import/how-syncs-work/) explains both, with the sync log and what happens to a run with invalid records. ## Switch methods later [Section titled “Switch methods later”](#switch-methods-later) A collection has one source at a time. To switch, open the collection’s **Data** page and click **Change source type**: the same cards as the setup wizard. Switching deletes the collection's documents The documents the old source imported are removed, and the new source fills the collection from scratch. To compare two sources, create a second collection instead. The **Data** page also lists the documents a collection holds, with every stored column. Click a row to open the whole document. Next: [Upload a file](/import/upload-file/) for the fastest first import, or [Product feeds](/import/feeds/) to keep a catalog in sync. # Upload a file > Fill a collection from a file on your computer, with a preview of the rows before anything is indexed. Source: https://docs.typemo.com/import/upload-file/ Upload a file to fill a collection once, or to try Typemo on your real data. You see the rows as Typemo read them before anything is indexed. Each new upload replaces the collection’s documents. ## Before you start [Section titled “Before you start”](#before-you-start) You need a file of up to 50 MB in one of the [supported formats](/import/limits/#file-formats): CSV, TSV, JSON, NDJSON, XML, Excel, Parquet or SQLite. Any columns and any names work: there is no template to match. **Download sample CSV** under the upload area gives you one to start from. ## Upload the file [Section titled “Upload the file”](#upload-the-file) 1. Open the upload area. For a new collection, pick **File upload** in the setup wizard. For a collection that already takes files, open its **Data** page and click **Configure**. 2. Drop the file on the upload area, or click it to browse. 3. Check the preview: the row count and the first rows, exactly as Typemo read them. For a SQLite file with several tables, pick the one you want under **Table**. ![Data → Configure on a file-upload collection: products.csv picked with its size and 40 rows, the first five rows as Typemo read them, and the Import 40 rows button](/_astro/upload-preview.lyNx-DtL_ZElzIx.webp) The preview before the import 4. Click **Import N rows**. ## If rows have problems [Section titled “If rows have problems”](#if-rows-have-problems) Typemo checks the whole file before it indexes anything. If any row fails, nothing is imported, and a report lists each problem with its line. Search keeps the documents it had. You then choose: * **Fix the file.** Click **Try another file** and upload the corrected one. * **Import the rest.** Click **Import N valid rows** to index every row that passed and skip the listed ones. **Import N valid rows** isn’t offered when a column you gave a role is missing from the file. Skipping rows can’t fix that, so restore the column or give the role to another one. The error codes are in [Formats and limits](/import/limits/#error-codes). ## Mark your columns [Section titled “Mark your columns”](#mark-your-columns) Typemo never guesses a role from a column’s name, so you pick the column for **Title** and the other roles yourself. In the setup wizard, the **Mapping** step comes next. On the **Data** page, **Fields in Search** after an import opens **Search → Setup**. See [Map your fields](/fields/map-fields/). A Google Shopping XML file is the exception. Its field names follow Google’s specification, so its roles are set from them. ## Upload again [Section titled “Upload again”](#upload-again) * **A new file replaces the old one.** Documents the new file doesn’t contain are removed. * **Rows keep their documents by id.** The id comes from the column marked **Unique ID**, else from an `id` column. Without either, Typemo builds one from the row’s content, so a row whose values change becomes a new document. [Prepare your data](/fields/prepare-your-data/) explains how to pick an id. * **Re-import after changing types.** When you change a column’s role or type, open **Configure** and click **Re-import this file**. Typemo imports the stored file again under the new types and lists any rows that no longer fit. ## Check it worked [Section titled “Check it worked”](#check-it-worked) The **Documents** count on the **Data** page shows the new total. **Sync log**, next to **Last sync**, lists the import with the number of documents it indexed. Next: [Map your fields](/fields/map-fields/), or keep a catalog current with a [product feed](/import/feeds/). # Connect Shopify > Paste your Shopify store address and Typemo keeps a collection in step with its catalog. There is nothing to install in Shopify. Source: https://docs.typemo.com/integrations/shopify/ Typemo reads your Shopify store’s public catalog and keeps a collection in step with it. There is nothing to install in Shopify: paste the store address, pick how often to sync, and your products are searchable after the first sync. ## Before you start [Section titled “Before you start”](#before-you-start) * The storefront has no password. A password-protected store can’t be read. * The store shares its catalog publicly, as Shopify stores do unless the owner turned it off. ## Connect your store [Section titled “Connect your store”](#connect-your-store) 1. In the setup wizard’s **Data** step, or after **Add collection** in the sidebar, choose **Shopify** under **E-commerce**. ![The setup wizard's Data step with Shopify picked under E-commerce, and below the cards the Store address filled in and Sync set to Daily](/_astro/shopify-form.D-toNCNP_1O7MWJ.webp) Shopify in the setup wizard 2. Paste your store’s address into **Store address**. Your own domain and the `.myshopify.com` address both work. 3. Under **Sync**, choose how often Typemo reads the store: **Every 2 hours**, **Every 6 hours**, **Daily** or **Weekly**. Each sync reads the whole catalog: it adds new products, updates changed ones and removes deleted ones. 4. Click **Open dashboard**. Typemo reads the first products before it saves the store, then starts the first sync. ## Check it worked [Section titled “Check it worked”](#check-it-worked) Open the collection’s **Data** page. The sync log shows the first sync, and the documents table fills with your products. If the store doesn’t answer, the wizard shows one of these messages: | Message | What to do | | -------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | | This isn’t a Shopify store, or its storefront is password-protected. | Check the address in a browser, or remove the storefront password. | | This store doesn’t share its catalog publicly. | The store turned off public catalog access. Use a [product feed](/import/feeds/) instead. | | The store is limiting requests right now. Try again in a minute. | Wait a minute and click **Open dashboard** again. | | The store answered with an error | Shopify had an error. Try again later. | | Couldn’t reach the store | The address didn’t answer. Check it in a browser. | ## What a sync reads [Section titled “What a sync reads”](#what-a-sync-reads) | What | How it arrives | | ------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | | Products and variants | A product with several variants is one result with its variants grouped under it. A product with one variant is one result. | | Prices | When a variant has a compare-at price above its price, the compare-at price is the regular price and the price is the sale price. | | Stock, images, SKUs | Per variant. | | Category | The most specific level of Shopify’s standard product category: `Sneakers` for `Apparel & Accessories > Shoes > Sneakers`. | | Product type, collections, tags | Each in its own field. | | Vendor | As `attr_vendor`. | | Variant options | Options such as Size or Color, as `attr_` fields like `attr_size`. A variant has its own value; the product has the values of all its variants. | To filter by an `attr_` field, use **Add filter** on [Search → Setup](/fields/filters/), with the collection picked. Category or product type When your products have no standard category, the **Category** role reads the product type instead. To use another column, give it the **Category** role on **Search → Setup**, in the collection’s row. ## Filters from Search & Discovery [Section titled “Filters from Search & Discovery”](#filters-from-search--discovery) If you set up filters in Shopify’s Search & Discovery app, the widget starts with the same filters: the same order and labels. | Shopify filter | In the widget | | ------------------------------------- | --------------- | | Price | A slider | | A colour filter, or one with swatches | Colour swatches | | A size filter | Buttons | | Any other filter | Checkboxes | Filter values arrive with every sync, sold-out products included. Values Shopify keeps in metafields arrive too. Without Search & Discovery filters, the widget starts with price and category. Either way, variants are grouped under their product. Change filters on the **Filters** card and grouping on **Variant grouping**, both on **Search → Setup**. ## Limits [Section titled “Limits”](#limits) | Limit | What happens | | ---------------------------------------------------------- | --------------------------------------------------- | | More than 100 variants or 100 collections on one product | The first 100 are imported, and the sync log warns. | | More than 1,000 products share a filter value at one price | The first 1,000 are read, and the sync log says so. | | A filter with more values than one sync can read | The filter is left out, and the sync log names it. | Next: [Install the widget](/widget/install/) on your storefront, or [choose what shoppers filter by](/fields/filters/). # Connect WooCommerce > Connect a WooCommerce store by pasting its address, or install the WordPress plugin for changes within minutes and a widget placed for you. Source: https://docs.typemo.com/integrations/woocommerce/ A WooCommerce store connects in one of two ways: paste its address in the dashboard, or install the Typemo plugin in WordPress. Both keep a collection in step with your catalog. Pick the one that fits how fresh search must be. ## Pick a way to connect [Section titled “Pick a way to connect”](#pick-a-way-to-connect) | | By store address | With the plugin | | --------------------- | --------------------------------------------------- | --------------------------------------------- | | Install in WordPress | Nothing | The Typemo Search plugin | | A price or stock edit | Reaches search on the next sync | Reaches search within about five minutes | | Full sync | Every 2 hours, 6 hours, daily or weekly | Daily, and on **Sync Now** | | What it syncs | Products | Products, posts and pages | | The widget | You [add the snippet](/widget/install/) | The plugin places it | | Cart and orders | You wire them with [widget events](/widget/events/) | Add-to-cart and purchases are tracked for you | You can start by address and install the plugin later. The plugin then feeds the same collection, so its documents stay. ## Connect by store address [Section titled “Connect by store address”](#connect-by-store-address) 1. In the setup wizard’s **Data** step, or after **Add collection** in the sidebar, choose **WooCommerce** under **E-commerce**. ![The setup wizard's Data step with WooCommerce picked under E-commerce, and below the cards the Store address filled in and Sync set to Daily](/_astro/woocommerce-form.DrHhZRIW_1VwRRU.webp) WooCommerce in the setup wizard 2. Paste your store’s address into **Store address**. A store in a subfolder, such as `example.com/shop`, works too. 3. Under **Sync**, choose how often Typemo reads the store: **Every 2 hours**, **Every 6 hours**, **Daily** or **Weekly**. 4. Click **Open dashboard**. Typemo reads the first products before it saves the store, then starts the first sync. ### Check it worked [Section titled “Check it worked”](#check-it-worked) Open the collection’s **Data** page. The sync log shows the first sync, and the documents table fills with your products. If the store doesn’t answer, the wizard shows one of these messages: | Message | What to do | | ----------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | | This isn’t a WooCommerce site. | Check the address in a browser. It must be the WordPress site that runs the store. | | The store’s Store API is turned off. Install the Typemo plugin instead. | Install the plugin, below. | | This store doesn’t share its catalog publicly. | A security plugin or firewall blocks the request. Install the plugin. | | The store is limiting requests right now. Try again in a minute. | Wait a minute and click **Open dashboard** again. | | The store answered with an error | The store had an error. Try again later. | | Couldn’t reach the store | The address didn’t answer. Check it in a browser. | ### What a sync by address reads [Section titled “What a sync by address reads”](#what-a-sync-by-address-reads) Typemo reads the store’s public catalog, the WooCommerce Store API, as a new visitor sees it. | What | How it arrives | | ----------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | | Products and variations | Each variation is a document, grouped under its product. | | Prices | The price the store charges now. When it is below the regular price, the regular price is the price and the current one the sale price. | | Stock, images, SKU | As the store shows them. | | Categories | Every category of the product, for the category filter. | | Tags, rating | Tags as the store has them. Rating and review count only on products with reviews. | | Attributes and brands | As `attr_` fields, such as `attr_size` and `attr_brand`. To filter by one, use **Add filter** on **Search → Setup**. | | Descriptions | As the store renders them, so blocks a theme adds to every product arrive too. | A new collection starts with a category filter and a price filter, and variations grouped under their product. Change them on the **Filters** and **Variant grouping** cards of [Search → Setup](/fields/filters/). | Edge case | What happens | | ------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | | The store hides out-of-stock products | They are not imported. | | A currency-switcher plugin offers more currencies | Only the store’s default currency is indexed. | | A product without a title or a price | It is skipped and counted in the sync log. | | A security plugin refuses a page mid-sync | The sync fails and keeps the last good catalog. Allow the user agent `Typemo/1.0 (Store Sync)`, or install the plugin. | | The store keeps limiting requests | The sync fails and the next one tries again. A slower interval, or the plugin, avoids it. | | A very large catalog | One sync may run for up to an hour. A catalog that needs longer connects through the plugin. | ## Connect with the plugin [Section titled “Connect with the plugin”](#connect-with-the-plugin) ### Before you start [Section titled “Before you start”](#before-you-start) * An administrator login to WordPress 5.9 or later, on PHP 7.4 or later. * A site the internet can reach: no password protection and no maintenance mode. * A Typemo account, or create one while you connect. 1. In WordPress, open **Plugins → Add New Plugin** and search for **Typemo Search**. Click **Install Now**, then **Activate**. **Typemo** appears in the admin menu. The plugin’s page is [wordpress.org/plugins/typemo-search](https://wordpress.org/plugins/typemo-search/). 2. Open **Typemo** and click **Connect to Typemo**. Sign in, or create an account, in the window that opens. You never copy a key. ![The plugin's Setup Wizard in WordPress admin on its Connect step, with the Connect to Typemo button](/_astro/wordpress-wizard-connect.BU0BIH4j_1cTobw.webp) The plugin's Setup Wizard: connect to Typemo 3. Under **Choose Your Project**, pick **Create new project** and name it, or pick a project under **Or use existing**. Choose the **Widget Type**, **Catalog** or **Docs**, and tick what to search under **Content to Sync**. **Your site’s search field** starts as `input[name="s"]`, the search box of WordPress and WooCommerce themes; change it if your theme has its own. Click **Continue**. ![The Setup Wizard's project step: Create new project selected, Widget Type set to Catalog, Products ticked under Content to Sync](/_astro/wordpress-wizard-project.DsS-N6Ip_27akwt.webp) The Setup Wizard: pick or create a project 4. Wait for **Your search is ready!**. The first sync starts by itself, and the widget goes live on your storefront. ### Check it worked [Section titled “Check it worked”](#check-it-worked-1) * Open your storefront and type two letters into its search box. Results show with photos, prices and filters. Nothing opens? Your theme’s search box has another selector: set it under **Search → Look → Your search field** in the dashboard. * The plugin page under **Typemo** shows **Connected** and each collection’s last sync. * If the wizard says **Connected — but Typemo cannot read your site yet**, the site is not reachable from the internet. Lift the password protection or maintenance mode. Typemo retries by itself, and **Sync Now** on the plugin page retries at once. ![A WooCommerce storefront with the catalog widget open on a search, showing products, filters and Add to cart](/_astro/woocommerce-storefront-widget.t9EEN__j_1fKvtI.webp) The catalog widget on the store after setup Next: [How the plugin works](/integrations/wordpress-plugin/) for syncing, placement and what leaves your store, or [match search to your brand](/widget/branding/). # WordPress plugin > How the Typemo Search plugin syncs, what it sends, where it places the widget, what leaves your store, how it connects and how it updates. Source: https://docs.typemo.com/integrations/wordpress-plugin/ The Typemo Search plugin keeps your WooCommerce products, posts and pages in step with Typemo and places the widget on your site. This page lists how it syncs, what it sends and what each setting does. To install it, see [Connect WooCommerce](/integrations/woocommerce/#connect-with-the-plugin). ![The Typemo Search page in WordPress admin: Connected, Products last synced with 16 items, Open Dashboard and Sync Now, then the Widget and Data to Sync tabs](/_astro/wordpress-plugin-status.fduOx2kf_Z2igCnn.webp) WordPress admin → Typemo ## Requirements [Section titled “Requirements”](#requirements) | Requirement | Why | | ---------------------------------------- | --------------------------------------------------------------------------------------------------- | | WordPress 5.9 or later, PHP 7.4 or later | The plugin runs on nothing older. | | WooCommerce | Only for products. Posts and pages sync without it. | | A site the internet can reach | Typemo reads your catalog from your site. Password protection or maintenance mode stops every sync. | | WP-Cron running | Changes go out on WordPress’s scheduled tasks. The plugin page warns when they never run. | | WordPress security keys and OpenSSL | The plugin stores its keys encrypted. Without encryption, connecting fails. | ## How syncing works [Section titled “How syncing works”](#how-syncing-works) | What | When it reaches search | | --------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | | A product, post or page you save, a price, a sale, a stock change, a trashed item | Within about five minutes, from the editor, an importer or the WooCommerce REST API. | | An item that leaves search: a draft, an excluded category | Removed within about five minutes. | | A product’s variations, when only the product changed | At the next daily sync. | | Everything else | Once a day, Typemo re-reads the whole catalog and removes what is no longer published. | Changes go out on WordPress’s scheduled tasks (WP-Cron), which run when the site gets visits. A site without traffic sends them with the next visit. After a bulk edit or an import, the plugin has Typemo re-read the whole catalog. | Action on the plugin page | What it does | | ----------------------------------- | ------------------------------------------------------------------------------------ | | **Sync Now** | Re-reads the whole catalog at once. The one to use in almost every case. | | **Re-index all** under **Advanced** | Rebuilds the index from the whole catalog. Only for an index that is visibly broken. | The plugin page shows each collection’s last sync and the changes still waiting. It also shows what went wrong: a site Typemo cannot reach, changes that keep failing, or WP-Cron that never runs. A collection you delete in the Typemo dashboard stops that content type syncing, and the plugin page says so. To sync it again, turn the type back on under **Data to Sync**: that creates a new collection. ## What the plugin sends [Section titled “What the plugin sends”](#what-the-plugin-sends) **Data to Sync** on the plugin page decides what leaves your site: | Setting | What it does | Default | | ---------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------ | | Content types | Whether products, posts and pages sync. | What you ticked when you connected. | | Excluded categories | Products in these categories stay out, with their subcategories and variations. | None | | Custom fields and attributes | Extra fields sent with each item. | None | | **Image size** | **Small** (the WooCommerce thumbnail), **Medium** or **Original**. | **Small** for products, **Medium** for posts and pages | What each item carries: | Item | What is sent | | ---------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Product | Title, description, short description, price and sale price, stock, image, SKU, categories, brand, rating and sales popularity. | | Variable product | One document per variation, grouped under its product. The product’s price is the lowest among its enabled variations. | | Grouped product | Its price and image come from the products in it. | | Post or page | Title, image, date, author, categories and tags, and the text a visitor reads, shortcodes and blocks included. Its excerpt, when it has one, takes the place of that text. | | Advanced Custom Fields field | A text, text area or rich-text field as plain text. A repeater, group or flexible content as the text of those sub-fields. Images, files and links add nothing. | Search shows what your store’s own search shows. A product whose catalog visibility is **Hidden** or **Shop only** stays out. The plugin never changes how search behaves. Filters, variant grouping, hiding out-of-stock products, the Add to cart button and currency are set in your Typemo dashboard, so what you set there stays. ## Widget placement [Section titled “Widget placement”](#widget-placement) The widget ships with the plugin; there is no snippet to paste. The **Widget** tab on the plugin page holds its settings: | Setting | What it does | | ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | **Enable widget** | Shows the search widget on your site. | | **Widget Type** | **Catalog**, a full-screen overlay with product cards and filters, or **Docs**, a compact dropdown for posts and pages. The type belongs to the project, so the plugin and the dashboard always show the same one. | | **Target Element** | A CSS selector, such as `#search-button`. Your own search box or button then opens the widget. | | `[typemo]` | A shortcode that places a search button wherever shortcodes work. | Looks and behaviour are set in your Typemo dashboard, under [Look and branding](/widget/branding/). Changes there reach the storefront without touching the plugin. On a store, the widget’s add-to-cart button puts the item into the WooCommerce cart. Themes with their own cart logic can handle [the cart event](/widget/events/) instead. On the order confirmation page, the plugin reports the ordered items that came through search to [analytics](/analytics/overview/). ![The Widget tab: Enable widget on, Widget Type set to Catalog, Target Element filled with #search-button, and Save Changes](/_astro/wordpress-plugin-widget-tab.CyJU_G5Q_1C7oPF.webp) WordPress admin → Typemo → Widget ## What data leaves your store [Section titled “What data leaves your store”](#what-data-leaves-your-store) * **Your catalog and content:** only what your pages already show, such as titles, descriptions, prices, images, categories and attributes. * **Orders:** only the items that came through search, each with its amount and the order’s currency. * **Never:** customer details, addresses, order numbers or any other personal data. ## Connection [Section titled “Connection”](#connection) | Part | How it works | | -------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | | Signing in | **Connect to Typemo** opens a sign-in window. The plugin then acts for your account; you never copy a key. | | Keys | The plugin receives two: a **Read only** key for the widget on your storefront, and a **Write & Read** key it keeps encrypted on your server for syncing. | | Allowed domains | Connecting adds your site to the project’s [allowed domains](/project/security/#widget-allowed-domains), so the widget runs there. | | Syncing | Runs on the Write & Read key, which doesn’t expire. | | Your sign-in | Needed only to change the widget type or add a content type. When your sign-in has expired, the plugin asks you to sign in again for those two. | | **Disconnect from Typemo** | Unlinks the site. The collections and their documents stay in your dashboard. | | **Reconnect** | Shown when the project was deleted on Typemo, or when WordPress’s security keys changed and the plugin can no longer read its stored keys. | | Several stores | Connect each store as its own project. One Typemo account holds them all. | ## Plugin updates [Section titled “Plugin updates”](#plugin-updates) From version 1.7.0 the plugin updates through WordPress.org, like your other plugins: a new version shows under **Dashboard → Updates**, and **Enable auto-updates** on the Plugins screen installs new versions for you. The plugin stays active and connected through an update, and keeps its settings and the changes waiting to sync. Next: [Look and branding](/widget/branding/) to match the widget to your store, or [Filters](/fields/filters/) to choose what shoppers filter by. # Show banners in search > Put a promo, sale or announcement on the screen shoppers see when they open search, or above the results of the searches you choose, and change it without touching your site. Source: https://docs.typemo.com/merchandising/banners/ A banner puts a promo, sale or announcement on the screen shoppers see when they open search, before they type, or above the results of the searches you choose. You change it in the dashboard; your site stays as it is. ## Before you start [Section titled “Before you start”](#before-you-start) Banners show in the catalog widget only. A docs widget or an API-only project has none. ## Add a banner [Section titled “Add a banner”](#add-a-banner) 1. Open **Search → Blocks**. If the project has several collections, pick one under **Collection**. Each collection has its own banners. 2. Pick the place: **Start screen** for the screen that opens with search, or **Above results** for the searches you choose. Click **Add block** there, then **Banner**. 3. Under **Banner image**, click **Upload** and choose the image. Put the headline and the offer in the artwork: the image is the whole banner. 4. In **Above results**, under **For searches**, add the searches it answers: type one, choose **Contains** or **Exact**, and press Enter. A start-screen banner needs none. 5. Under **Link URL**, enter where a click lands. Turn on **Open in new tab** for a page outside your store. 6. Click **Create banner**. It saves at once, apart from **Save changes**, and shows in the widget straight away. ![Search → Blocks with the places stacked and Add block on each, the widget preview on the right](/_astro/banners.BzfsMX3B_Z1eN0vk.webp) Search → Blocks ## How banners show [Section titled “How banners show”](#how-banners-show) | Case | What happens | | ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | | On the start screen | At the start of the **Recommended for you** row, on the screen that opens with search. They go once the shopper types. | | For searches | Above the results, the width of the results. **Contains** answers any search with the words, **Exact** only that search. | | Several for one search | The closest match shows: an **Exact** one first, then the longest matching words. A tie goes to the banner higher in the list. | | Which | The active banners of the collection whose tab the shopper has open. | | Shape | On the start screen a banner fills the space of one product card and is cropped to fit. Keep the message away from the edges. | | Order | Their own order in the place, set with the arrows on their cards. | | Pausing | The switch on its card hides a banner without deleting it. Click the card to change the banner. | | Link | Optional. A link typed without `https://` gets it added. | | Image | PNG, JPG, WebP or GIF, up to 2 MB. Typemo resizes it to fit. An animated GIF shows its first frame. | | Banners per collection | Up to 10. | | Your own code | The [Search API](/developers/search-api/#response) returns the banner for a search in `banner`; InstantSearch’s hits widgets read it. | Treat banners like shelf space Every search starts on this screen. Keep one campaign there, keep it current, and take it down when the campaign ends: a stale sale banner costs more trust than an empty slot. ## Check it worked [Section titled “Check it worked”](#check-it-worked) Open [Test your search](/search/test/) and open search without typing. A start-screen banner should lead the **Recommended for you** row. For a banner in **Above results**, search one of its searches: it should sit above the results. Next: once the shopper types, [custom results](/merchandising/custom-results/) and [boosting](/merchandising/boosting/) shape what they see. # Boost results > Rank results higher or lower by their attributes, on every search or only for the queries you choose. Source: https://docs.typemo.com/merchandising/boosting/ A boosting rule ranks results higher or lower by their attributes: in-stock first, clearance last, one brand higher during a campaign. A boosted product still has to match the search. ## Create a rule [Section titled “Create a rule”](#create-a-rule) 1. Open **Collections → your collection → Boosting** and click **Add rule**. 2. Under **Rule name**, type a name you’ll recognise in the list. 3. Under **When should this rule apply?**, pick **All searches**. Or pick **Specific queries** and add each query with **Contains** or **Exact**. 4. Under **Boost results where…**, set one or more conditions. A product must meet all of them. 5. Under **By how much?**, enter a multiplier. Above 1 promotes, below 1 demotes. 6. Click **Create rule**. ![The Add boosting rule dialog: the rule name, when the rule applies, the conditions under Boost results where, and By how much](/_astro/boosting.1Q_8EPcs_1BpUnW.webp) The Add boosting rule dialog Three rules cover most stores: * **In stock first, everywhere.** All searches, `stock > 0`, ×1.5. * **Clearance last.** All searches, `tag is clearance`, ×0.5: still findable, never in the way. * **One brand for one campaign.** Specific queries *running shoes*, `brand is Acme`, ×2. ## How rules behave [Section titled “How rules behave”](#how-rules-behave) | Case | What happens | | ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ | | Multiplier | From ×0.1 to ×10; a new rule starts at ×1.5. ×1.5 is a solid lift, ×0.5 a firm push down. | | Several rules on a product | Their multipliers multiply: ×1.5 and ×2 make ×3. | | A product that doesn’t match | Never added. ×3 on a brand won’t bring it into searches for something else. | | **Contains** | Fires when the query contains the term anywhere, even inside a word: *ring* also fires for *earrings*. | | **Exact** | Fires when the whole query is the term, in any letter case. | | Conditions | Pick a field and its values, compare a number, or choose **Yes** or **No**. Text fields such as titles can’t be used: they are searched, not compared. | | Queries per rule | Up to 100. | | Pausing | The **Active** switch in the list pauses a rule without deleting it. | Start subtle, start few ×1.5 is usually enough. Ten rules that each mean something beat fifty that fight each other. Boost or pin? A boost shifts scores by attribute, across many searches. To put one exact product on top of one exact query, use a [custom result](/merchandising/custom-results/): it overrides scoring. For developers: a rule is `{ name, queries, filter, boost }` on `/v1/collections/{id}/boost-rules`. `queries` lists `{ query, match: "contains" | "exact" }` and is empty for every search. `filter` is the [search filter](/developers/search-api/#filters) without `contains`. `enabled`, `startsAt` and `endsAt` pause a rule or limit it to dates. ## Check it worked [Section titled “Check it worked”](#check-it-worked) On [Test your search](/search/test/), run a query where boosted products compete with others. They should win the close calls, not take over the page. Next: [Pin or hide results](/merchandising/custom-results/) for single queries, or find the queries worth boosting under [No clicks](/analytics/search-performance/#no-clicks). # Pin or hide results > Choose the results for the queries that matter: pin documents on top, hide others or send the query to a page, always or between two dates. Source: https://docs.typemo.com/merchandising/custom-results/ A custom result sets the results of a query by hand. Pin a hero product on top of *dress*, hide the wrong category from *boots*, show only gift cards for *gift card*, or send *sale* to your sale page. Nothing automatic outranks it. ## Create a rule [Section titled “Create a rule”](#create-a-rule) 1. Open **Collections → your collection → Custom results** and click **Add rule**. 2. Under **When users search for…**, type a term, pick **Contains** or **Exact**, and click **Add**. Add more terms if several queries should fire the rule. 3. Under **Pin or hide documents**, open **Pin** or **Hide** and click **Add documents**. Search by title, ID or category, tick the documents, and click **Pin *n* documents** or **Hide *n* documents**. 4. Drag the pinned documents into order. The first one tops the results. 5. Under **How should results appear?**, pick **Pinned first** or **Pinned only**. This step shows once something is pinned. 6. Under **Redirect to a page (optional)**, paste a page’s full address to send the query there. 7. Under **When is the rule live?**, keep **Always on**, or pick the first and last day. 8. Click **Create rule**. ![The Add custom result rule dialog: When users search for, Pin or hide documents, and When is the rule live](/_astro/custom-results.TFL-zrvI_ZWMHq4.webp) The Add custom result rule dialog ## Pick documents by a rule [Section titled “Pick documents by a rule”](#pick-documents-by-a-rule) Instead of picking documents one by one, set conditions under **Also pin every product where** or **Also hide every product where**. The set stays current: a product added to the category tomorrow joins without an edit. * Pin `category is Cement` for *cement*. * Show only `sale price ≥ 1` for *offers*, with **Pinned only**. * Hide `brand is Acme` from *resin*. ![A custom result rule for reading lamp: under Also pin every product where, category is Table Lamps and Wall Lamps & Sconces, ticked in the value list with the count beside each value, and 423 products match](/_astro/pin-rule.DgbklMw0_Dg7iv.webp) A rule that pins two categories | Case | What happens | | ------------------ | --------------------------------------------------------------------------------------------------------------------------------- | | Fields and values | Pick a field to see its values with how many documents carry each. Tick several to match any of them, or type one the list lacks. | | Numbers and yes/no | Numbers take `=`, `≠`, `>`, `≥`, `<`, `≤`. Yes/no fields take **Yes** or **No**. | | Several conditions | All of them must hold. The count under them shows how many products match now. | | The query’s words | Not needed: a picked document shows even without them. A rule is your choice of results, not a filter on the search’s. | | Text fields | Titles and descriptions can’t be used: they are searched, not compared. | ## How results are ordered [Section titled “How results are ordered”](#how-results-are-ordered) | Case | What happens | | ----------------- | ------------------------------------------------------------------------------------------------------ | | Pinned one by one | Come first, in your order. | | Pinned by a rule | Come next, most popular first. | | **Pinned first** | The default. Search results follow on every page, without repeating a pinned document. | | **Pinned only** | Only pinned documents show. | | Hidden | Gone from the results of these queries. | | **Contains** | Fires when the query contains the term anywhere, even inside a word: *ring* also fires for *earrings*. | | **Exact** | Fires when the whole query is the term, in any letter case. | | Dates | The rule is live from the start of the first day to the end of the last, in your local time. | | Pausing | The **Active** switch in the list pauses a rule without deleting it. | | Limits | Up to 100 terms per rule and 500 documents per list. | ## Send a query to a page [Section titled “Send a query to a page”](#send-a-query-to-a-page) | Case | What happens | | -------------- | ------------------------------------------------------------------------------------------------- | | Pressing Enter | The search widget opens the page. While the visitor types, results show as usual. | | The address | A full address that starts with `https://` or `http://`. | | Redirect only | A rule can redirect without pinning or hiding anything. The list marks it with the page’s domain. | | Several rules | The most specific rule that has a redirect sends the query, in the order below. | | Your own code | Search responses carry the address in `redirect`. Your code decides when to go there. | ## When rules overlap [Section titled “When rules overlap”](#when-rules-overlap) A query can fire several rules, say a broad **Contains** rule for a category and a focused one for one term. Only the most specific rule pins: 1. An **Exact** match beats a **Contains** match. 2. A longer matched term beats a shorter one. 3. Then the rule with fewer terms wins. Documents that any matching rule hides stay hidden. If a broad rule takes the top spot from a focused one, narrow the broad rule or give the focused one an **Exact** term. ## Import and export [Section titled “Import and export”](#import-and-export) **Export** downloads the collection’s rules as a JSON file. **Import** adds the rules from such a file as new rules, up to 500 per file. Prepare a campaign’s rules offline, copy them to another collection, or keep them in a repository. Pin or boost? A pin sets the exact results of one query. To shift a group of products across many searches, use [boosting](/merchandising/boosting/). For developers: a custom result lives on `/v1/collections/{id}/curations` with `queries`, `pin`, `hide`, `pinnedOnly` and `redirectUrl`. `pin` and `hide` are `{ ids, filter }`: `ids` are document ids as search returns them, pinned in order. `filter` is the [search filter](/developers/search-api/#filters) without `contains`. `enabled`, `startsAt` and `endsAt` pause a rule or limit it to dates. ## Check it worked [Section titled “Check it worked”](#check-it-worked) Type the trigger on [Test your search](/search/test/), then a near miss. Pins should sit in your order, and a **Contains** term shouldn’t fire wider than you meant. Next: start with your most frequent searches in [Search performance](/analytics/search-performance/#top-queries), or [boost results](/merchandising/boosting/) by their attributes. # Manage API keys > Create, rotate and delete the keys your widget, your server and AI agents use to reach a project. Source: https://docs.typemo.com/project/api-keys/ An API key lets the widget, your server or an AI agent reach a project. This page shows how to create a key with the right scope, replace one that leaked, and delete one you no longer use. Every new project starts with two keys, both reaching all collections: * **Public search key**, **Read only**: the widget and the dashboard preview run on it. * **Write key**, **Write & Read**: for your server, to push your catalog. ![API keys: a row to name a new key with its scope and collection pickers, above the project's keys, masked](/_astro/api-keys.BadFMRw2_1qOS7l.webp) Project & account → API keys ## Pick the scope [Section titled “Pick the scope”](#pick-the-scope) | Scope | What it can do | Where it belongs | | ---------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | **Read only** | Search and suggestions. Reads collections, synonyms, stop words, custom results, boosting rules and the assistant’s knowledge. | The widget, a browser, a mobile app. Anyone can read it from your page, so browsers get answers only on your [allowed domains](/project/security/#widget-allowed-domains). | | **Write & Read** | All of the above. It also pushes and deletes documents, syncs a source, and creates, renames and deletes collections. It edits synonyms, stop words, custom results, boosting rules and knowledge, reads search analytics, and calls the AI assistant from a server. | Your server or your build. Never in a page. | No key can change project settings, allowed domains, security rules or the ranking switches. Those need you signed in to the dashboard, or the [WordPress plugin](/integrations/wordpress-plugin/) connected to your account. ## Create a key [Section titled “Create a key”](#create-a-key) 1. Open **API keys** in the sidebar, under **Project & account**. 2. Name the key after what uses it, such as *Production website* or *Catalog importer*. 3. Pick **Read only** or **Write & Read**. 4. Pick **All collections**, or the one collection the key may reach. A key limited to one collection is refused on every other one. 5. Click **Create**. The key appears in the list, masked. 6. Copy it with the copy icon on its row, and paste it into the integration that uses it. Give each integration its own key, so replacing one never takes the others down. Keys start with `sq_`; to send one with a request, see [API basics](/developers/api-basics/). ## Replace a leaked key [Section titled “Replace a leaked key”](#replace-a-leaked-key) 1. Click the regenerate icon on the key’s row, then **Regenerate**. The old value stops working at once. 2. Copy the new value from the row. 3. Paste it into the integration. For the widget, copy the snippet again from **Install → Installation** and replace it on your site. The integration fails until step 3 is done. To switch keys without a gap, create a second key with the same scope, move the integration to it, then delete the old one. ## Delete a key [Section titled “Delete a key”](#delete-a-key) Click the trash icon on the key’s row and confirm. The key stops working at once. The widget's key stays The project always keeps one **Read only** key that reaches all collections, because the widget and the dashboard preview run on it. Its trash icon is greyed out until you create another such key. ## Check it worked [Section titled “Check it worked”](#check-it-worked) Send the [first request on the Search API page](/developers/search-api/#a-first-request) with the new key. Results mean the key works. `401 Invalid API key` means the key was mistyped, deleted, or limited to another collection. Next: [Set your allowed domains](/project/security/#widget-allowed-domains) so a copied widget key works nowhere else. # Security > The sites allowed to run your widget, IP and country rules, and the per-IP search limit. Source: https://docs.typemo.com/project/security/ The **Security** page decides who may search a project: which sites can run the widget, and which addresses and countries are refused. It applies to every search request, from the widget and the API alike. Edits apply as soon as you click **Save changes**. ![The Security page: the Allowed domains, Blocked IPs and Countries cards above the Widget allowed domains list with three domains, and IP blocking below](/_astro/security.BaFb8Bau_Z203Hqq.webp) Security: the summary cards above the domain list ## Widget allowed domains [Section titled “Widget allowed domains”](#widget-allowed-domains) The widget’s key sits in your page source, so anyone can copy it. This list makes a copy useless: a browser request is answered only when the page it comes from is on the list. | Rule | Behaviour | | ---------------------- | -------------------------------------------------------------------------------------------------------------------------------- | | `yourshop.com` | Matches `yourshop.com` and `www.yourshop.com`. | | `*.yourshop.com` | Matches `yourshop.com` and every subdomain. | | A full URL | Pasting `https://www.yourshop.com/shop` keeps only the host. | | Empty list | The widget and the assistant run on no site, only in the dashboard preview. | | Your own machine | `localhost`, `*.localhost`, `127.0.0.1` and `[::1]`, on any port, always pass. No entry needed. | | Requests from a server | A request without a browser origin is checked by its key alone. Use the [rate limit](#rate-limiting) and IP rules against abuse. | | A site not on the list | Every search answers `403` with *Add this site to the project’s allowed domains*. | | Size | Up to 50 entries. | Typemo adds the site you enter when you create the project, and the store you connect from the WordPress plugin. Add a staging site or a new domain before you send traffic to it. ## IP blocking [Section titled “IP blocking”](#ip-blocking) | Entry | Example | Effect | | ------------ | ---------------- | ----------------------------------- | | One address | `203.0.113.7` | Every search from it answers `403`. | | A CIDR range | `203.0.113.0/24` | Every address in the range. | Addresses get reassigned, so prune old blocks now and then: they end up refusing innocent traffic. ## Country restrictions [Section titled “Country restrictions”](#country-restrictions) Tick countries, then pick the mode above the grid. The country comes from the visitor’s IP address. | Mode | Who gets `403` | | ----------------------- | ----------------------------------- | | **Block selected** | Visitors from the ticked countries. | | **Allow only selected** | Visitors from every other country. | Country detection misfires VPNs and mobile networks often show the wrong country, and travellers are real customers. Use the rate limit against abuse, and restrict countries only when the law requires it. ## Rate limiting [Section titled “Rate limiting”](#rate-limiting) Typemo limits searches per IP address, so a scraper slows down while shoppers never notice. There is nothing to set. | Limit | Value | | --------------------------------------- | ----------------------------------------------------------------------- | | Searches per IP address, per collection | 5,000 a minute | | Past the limit | `429`, with `Retry-After` saying how many seconds to wait | | A project that needs more | [Contact us](https://typemo.com/contact): we can lift the limit for it. | The response headers that report the limit are listed on the [Search API](/developers/search-api/) page. Next: [Manage API keys](/project/api-keys/), or check a site that fails on [The widget doesn’t load](/troubleshooting/widget-not-loading/). # Project settings > Rename a project or a collection, see where its search runs, or delete it. Source: https://docs.typemo.com/project/settings/ What you can change about a project and a collection after you create them: their names, the project’s search region, and deleting either one. Project & account → General: Project name, Search region Europe · Nuremberg, and the Danger zone with Delete project100% × 360px Project & account → General: Project name, Search region Europe · Nuremberg, and the Danger zone with Delete project ## Project [Section titled “Project”](#project) Open **General** in the sidebar, under **Project & account**. | Setting | What it does | Limit | | ----------------- | ------------------------------------------------------------------------------------------------------------- | ---------------- | | **Project name** | The name in the project switcher in the top bar. | 1–100 characters | | **Search region** | Where the project’s collections are indexed and searched. Read-only: you pick it when you create the project. | — | ## Search regions [Section titled “Search regions”](#search-regions) | Region | Location | Status | | ------ | --------- | --------- | | Europe | Nuremberg | Available | The setup wizard marks the regions that aren’t open yet as **Soon**. To move a project to another region, [contact us](https://typemo.com/contact): only Typemo can move it. ## Collection [Section titled “Collection”](#collection) Open **Collections → your collection → Settings**. | Setting | What it does | Limit | | ----------------------- | --------------------------------------------------------------------------------------------- | ---------------- | | **Collection name** | The collection’s tab label in the widget. The collection ID that the API uses doesn’t change. | 1–100 characters | | **Search language** | How text is split into words. See [Search language](/search/language/). | — | | **Ranking & relevance** | The ranking switches. See [Ranking settings](/search/ranking/). | — | | **Result groups** | Docs projects only. See [Docs widget](/widget/docs/). | — | ## Danger zone [Section titled “Danger zone”](#danger-zone) Both pages end with a **Danger zone**. Each delete asks you to type the name first, and neither can be undone. | What you delete | What goes with it | What stays | | --------------------------------------------------------- | --------------------------------------------------------------------------------------------- | ---------------------------------------------------- | | A project: **Delete project** on **General** | Its collections and their documents, and its API keys. The widget stops working on your site. | Your account, your plan and your invoices. | | A collection: **Delete** on the collection’s **Settings** | Its documents, and its tab in the widget. | The project, its API keys and its other collections. | Deleted documents stop counting toward your plan’s [document limit](/account/billing/#limits). Next: [Manage API keys](/project/api-keys/), or choose where the widget may run on [Security](/project/security/). # Hide results and ignore words > Hide documents from every search with exclusion rules, and drop filler words from queries with stop words. Source: https://docs.typemo.com/search/exclusions/ The **Exclusions** page of a collection holds two tools. Exclusion rules hide documents from every search while they stay in your catalog. Stop words are words search drops from a visitor’s query. | You want | Use | | -------------------------------- | --------------------------------------------------------------------- | | A product never to show up | An [exclusion rule](#hide-documents-with-exclusion-rules) | | A word in the query not to count | A [stop word](#stop-words) | | A product to show up, only lower | A [boosting rule](/merchandising/boosting/) with a multiplier below 1 | ## Hide documents with exclusion rules [Section titled “Hide documents with exclusion rules”](#hide-documents-with-exclusion-rules) 1. Open **Collections → your collection → Exclusions**. 2. Under **Exclusion rules**, click **Add rule** and pick a field. 3. Pick an operator and a value. The choices depend on the field’s type, in the table below. 4. To hide more, click **Add condition**. A document is hidden as soon as it matches any condition. 5. Click **Save changes** at the top of the page. ![The Exclusions page with no exclusion rules yet and an empty Stop words list](/_astro/exclusions.B1WKrvz5_1wNKTF.webp) Exclusion rules and stop words share one page The count under the conditions shows how many products they match right now. | Field type | Operators | | ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ | | Text, such as title or description | **contains**, **does not contain**, followed by a word or phrase | | Values, such as brand or category | **is**, **is not**, followed by one or several values. Each shows how many documents carry it; you can also type one the list lacks. | | Number, such as price or stock | `=`, `≠`, `>`, `≥`, `<`, `≤` | | Yes/no, such as in stock | **is** **Yes** or **No** | Rules that come up often: * `title contains speciale fiera` for duplicate event listings. * `category is discontinued` for retired lines. * `category is internal, b2b-only` for records never meant for visitors. * `season is winter` in July. Remove it when stock rotates back. ### How exclusions behave [Section titled “How exclusions behave”](#how-exclusions-behave) | Case | What happens | | ------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | | **contains** | Matches words, not letters. *speciale fiera* hides documents with those two words side by side, in that order, in any letter case and any form of the words. | | **does not contain** | Hides every document without the phrase, so only documents with it stay in search. | | Where it applies | Every search in the collection, the AI assistant’s included. | | Hidden documents | Stay in the collection and keep syncing price and stock. Remove the rule and they return at once, with no re-import. | | Rules set through the API | A rule this editor can’t show appears as code with **Clear and edit here**, which replaces it. | For developers: the rules are the collection’s `exclude`, a [search filter](/developers/search-api/#filters) set with `PATCH /v1/collections/{id}`. ## Stop words [Section titled “Stop words”](#stop-words) Search treats every word of a query as meaningful. A stop word is dropped from the query first, so a filler such as *for* or *the* stops deciding what matches. 1. On the same **Exclusions** page, type a word under **Stop words**. 2. Click **Add**. | Case | What happens | | -------------------------- | --------------------------------------------------------------------------------------- | | Built-in list | None. Typemo ships no stop words, so add only the words that are noise in your catalog. | | Scope | This collection only: what is noise in one catalog carries meaning in another. | | Letter case and duplicates | Words are saved in lowercase; a word already on the list is skipped. | | Your documents | Unchanged. Stop words are dropped from the visitor’s query, not from your content. | | A query of only stop words | Finds nothing: a visitor who types just *ltd* gets no results if *ltd* is on the list. | | When it applies | The next search. | Each stop word changes every search that contains it With *a* on the list, *vitamin a* searches for *vitamin*. Keep the list short and deliberate. ## Check it worked [Section titled “Check it worked”](#check-it-worked) On [Test your search](/search/test/), search an excluded product by name: it should stay out. For a stop word, search a phrase with and without it: the results should match. Next: [Boost results](/merchandising/boosting/) to rank products lower instead of hiding them, or [test your search](/search/test/). # How search works > What happens between a keystroke and the results: what a search finds, what orders the matches and where your rules fit. Source: https://docs.typemo.com/search/how-it-works/ A search finds the documents that match the visitor’s words, forgives typos, and widens to looser matches before it gives up. Then your settings and rules decide the order. Knowing both tells you which setting to change when a result surprises you. ## How a search loosens [Section titled “How a search loosens”](#how-a-search-loosens) * **Every word first.** Documents with every word of the query come first, in any form your [search language](/search/language/) treats as the same word. Most searches end here. * **Typos.** A misspelled word is corrected to a word your catalog uses: *snekers* finds *sneakers*. Corrections come only from your own catalog, so brand names and product codes are not turned into other words. * **Looser matches.** When the full matches are too few, documents with some of the words show below them. * **Nothing found.** The catalog widget says **No results found** and shows your popular products under **Recommended for you**. The search counts as a [zero-result search](/analytics/search-performance/#zero-result), so you see the gap. ## What search reads in a query [Section titled “What search reads in a query”](#what-search-reads-in-a-query) Before matching, the query is read the way your collection is set up: * **Word forms.** Your [search language](/search/language/) folds words to their base, so *running* finds *runs*. * **Synonyms.** Your [synonyms](/search/synonyms/) add the words your catalog uses for the ones visitors type. * **Stop words.** Your [stop words](/search/exclusions/#stop-words) are dropped from the query. * **Alternative names.** Each product can carry hidden [alternative names](/search/ranking/#alternative-names), which match like the product’s own words. * **Brands typed as two words.** A brand your catalog writes as one word is found when a visitor types it with a space: *pro lux* finds *Prolux*. * **Learned meaning.** With [Query understanding](/search/ranking/#query-understanding) on, *under 20* becomes a price filter and *without glitter* leaves out products with glitter. ## What decides the order [Section titled “What decides the order”](#what-decides-the-order) Your settings and rules reorder what matches. None of them can bring in a document that doesn’t match the search. * **Text match.** A word found in the title counts for more than one found in the description. * **[Popularity](/search/ranking/#popularity-boost).** Products people click and buy more often rise. It decides close calls. * **[Smart ranking](/search/ranking/#smart-ranking).** Results people pick for one exact search rank higher for that search. * **[Boosting rules](/merchandising/boosting/).** Your rules raise or lower products by their attributes. * **[Semantic search](/search/ranking/#semantic-search)**, when on. It adds close matches by meaning to the first page, even ones that share no word with the query. [Custom results](/merchandising/custom-results/) sit above all of this. They pin or hide documents for the queries you choose, and nothing automatic outranks them. [Exclusions](/search/exclusions/) remove documents from every search. ## What this means for you [Section titled “What this means for you”](#what-this-means-for-you) Most surprises start with matching, not order: the visitor’s word isn’t in your catalog. Add a [synonym](/search/synonyms/), or check the product’s alternative names on the **Data** page. When the right products show in the wrong order, boost a group of products or pin one for a query. Next: [Ranking settings](/search/ranking/) for the switches behind these signals, or [test your search](/search/test/) to see them on your own data. # Set the search language > Pick the language your content is written in, so a search finds every form of a word. Source: https://docs.typemo.com/search/language/ Each collection has a search language. It decides how text splits into words and which forms count as the same word, so *running* finds *runs*. Set it to the language your content is written in. ## Pick the language [Section titled “Pick the language”](#pick-the-language) Match the language of your content, not of your interface. If your product titles are German and your dashboard is English, pick German. With the wrong language, a visitor who types the plural can miss the item named in the singular. 1. Open **Collections → your collection → Settings**. 2. Under **Collection**, pick the language in **Search language**. 3. Click **Save changes**. The save finishes once the collection is re-indexed for the new language. ![Collection settings: Collection name, Search language set to English, and the Ranking & relevance switches below](/_astro/language.B0EwlDWq_1iJT4A.webp) Collection → Settings: Search language ## What a change does [Section titled “What a change does”](#what-a-change-does) | Topic | Behaviour | | ------------------------ | ---------------------------------------------------------------------------------------------------- | | Your documents | Kept. The index is rebuilt from what Typemo already stores: no re-import, no fetch from your source. | | Search during the change | Keeps answering with the old language until the rebuilt index takes over. | | Semantic search | Its vectors are kept; nothing is embedded again. | ## Defaults [Section titled “Defaults”](#defaults) | Case | Language | | ----------------------------------------- | --------------------------------- | | A collection made in the dashboard | English, unless you pick another. | | A collection made by the WordPress plugin | Your site’s language. | | A language the list doesn’t offer | Indexed with English rules. | ## Catalogs in several languages [Section titled “Catalogs in several languages”](#catalogs-in-several-languages) Split a mixed catalog into one collection per language. The widget shows collections as tabs, so visitors still get one search box. To have the AI assistant answer each visitor from the version in their language, link the collections as translations: see [What the assistant reads](/ai-assistant/what-it-reads/). The search language doesn’t set the language of the widget’s buttons and labels. That is [a separate setting](/widget/languages-currency/), so a German catalog can sit behind an English widget. ## Check it worked [Section titled “Check it worked”](#check-it-worked) On [Test your search](/search/test/), search another form of a word your titles use: a plural, or a different ending. The same products should come back. Next: [Add synonyms](/search/synonyms/) for the words your visitors use, or add [stop words](/search/exclusions/#stop-words) for words that shouldn’t count. # Ranking settings > The five switches that shape how a collection finds and orders results: what each one does, its default and its plan. Source: https://docs.typemo.com/search/ranking/ Five switches on each collection shape how its results are found and ordered. They live under **Collections → your collection → Settings → Ranking & relevance** and take effect when you click **Save changes**. ![Ranking & relevance: Popularity boost, Smart ranking, Query understanding and Alternative names on, Semantic search off](/_astro/ranking.DaLyMD1y_ZqTplP.webp) Collection → Settings → Ranking & relevance | Setting | What it does | Default | Plan | | ------------------------------------------- | ------------------------------------------------------------------------------ | ------- | ---------- | | [Popularity boost](#popularity-boost) | Products people click and buy more often rank higher. | On | Every plan | | [Smart ranking](#smart-ranking) | Learns which results people pick for each search and puts them first. Beta. | On | Every plan | | [Query understanding](#query-understanding) | Reads price limits, exclusions and the main word of multi-word searches. Beta. | On | Every plan | | [Alternative names](#alternative-names) | Gives each product hidden names that shoppers use. Beta. | On | Every plan | | [Semantic search](#semantic-search) | Finds results by meaning, not only by matching words. Beta. | Off | Paid plans | The first four adjust results on their own. [How search works](/search/how-it-works/) shows where each one fits, and [AI Insights](/analytics/insights/) lists what Smart ranking and Alternative names changed. ## Popularity boost [Section titled “Popularity boost”](#popularity-boost) Each product has one popularity value from 0 to 2, where 1 is neutral. | Topic | Behaviour | | -------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Effect | A higher value ranks a product higher. It decides close calls; it can’t bring in a product that doesn’t match. | | Start value | Your store’s own order. The WordPress plugin sends each product’s sales; a feed can send a `_pop` column from 0 to 2. Without either, every product starts at 1. | | Clicks and purchases | Products that get clicks and sales rise over time. A product that stops selling drifts back. | | Your own value | On the **Data** page, open a product and set **Boost**. Clicks and syncs never change it. **Reset** returns it to the automatic value. A `_boost` column in your feed sets the same kind of value. | | Dashboard and feed | A value set in the dashboard wins over a `_boost` from the feed. | | Docs sites | Clicks never change a value: every page stays at 1 unless you set one. | | Switched off | Clicks and purchases stop adjusting values. Start values and your own values still apply. | ## Smart ranking Beta [Section titled “Smart ranking ”Beta](#smart-ranking) Where popularity tracks what sells overall, Smart ranking learns per search: which results people choose for *lamp*, and which for *desk lamp*. It helps most where the same searches come back week after week. | Topic | Behaviour | | ----------------- | ---------------------------------------------------------------------------- | | Clicks | Results clicked for a search rank higher for that same search. | | Frequent searches | Typemo checks your most frequent searches and puts their best matches first. | | Where checks run | Product catalogs with a **Title** field. Docs sites learn from clicks only. | | Switched off | Clicks stop counting and what it learned is discarded. | ## Query understanding Beta [Section titled “Query understanding ”Beta](#query-understanding) Query understanding learns what your frequent multi-word searches ask for: a price limit, a word to leave out, the main word. The next time someone searches the same words, results follow that reading. | Topic | Behaviour | | ----------------- | -------------------------------------------------------------------------------------------------- | | Price limits | *under 20* becomes a price filter. Needs a **Price** field. | | Exclusions | *without glitter* leaves out the products that mention glitter. | | The main word | The main word leads: *sneakers for trail running* shows trail sneakers first, then other sneakers. | | A new search | Works like plain search until Typemo has learned it. | | One-word searches | Never changed. | | Switched off | Learned readings stop applying, and learning stops for this collection. | ## Alternative names Beta [Section titled “Alternative names ”Beta](#alternative-names) Shoppers often call a product something your catalog never says: a trade term, an everyday word, a brand written as one word. With Alternative names on, each product gets a hidden list of such names, so a search for *shoe covers* finds the product titled *Overshoes*. The names help search find the product and never show in results. | Topic | Behaviour | | --------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Generated names | New products, and products whose title or category changed, get names automatically. | | Learned from searches | Typemo also adds names it learns from what visitors search and click. | | Retiring | Learned names visitors never use are dropped. | | Names from your feed | An `_aliases` column: a list, or names separated by commas. They are used as you send them and change only in your feed. | | Misspellings | Never added: search already [corrects them](/search/how-it-works/#how-a-search-loosens). | | See and remove | On the **Data** page, open a product: its names are under **Alternative names**. Remove a generated or learned one with ×; it never comes back. Feed names can’t be removed there. | | Docs sites | The names are the words readers use for a topic. | | Switched off | Generated and learned names are removed; feed names stay. Turning it back on names the whole catalog again. | ## Semantic search Beta [Section titled “Semantic search ”Beta](#semantic-search) Paid plans, off by default. Semantic search matches by meaning as well as by words. *something for a toddler’s birthday* can find gift items that share no word with the query. | Topic | Behaviour | | ------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Turning it on | After **Save changes**, every document gets its vector. The setting shows **Generating vectors** with progress, and keyword search keeps answering. Closing the page doesn’t stop it. | | If turning on fails | The setting says why and offers **Try again**. | | Usage | Turning it on counts every document toward **Documents embedded this month** on your billing page. Later syncs embed only the documents whose text or photo changed. | | How results blend | The closest matches by meaning join the first page of keyword results, one per product. A weak match is left out, so *t-shirt* adds no sneakers. The result count stays the keyword count. | | Exact names | Exact product names and codes stay near the top. | | What it reads | Title, category, your [custom roles](/fields/custom-roles/) that hold text, then content. A long text counts from its start. Photos are not part of text matching. | | Photos and Similar | With the **Image** field mapped, each product’s first photo gets a vector of its own. It powers **Similar**: products that look alike, one per product. Typemo stores the vector, not the picture. | | A photo that fails | The product has no **Similar**, and the sync log shows an [`image_not_embedded`](/import/limits/#error-codes) warning. Its text search is unaffected; the next sync tries the photo again. | | Changed fields | Saving other **Title**, **Content** or **Image** fields, or changing custom roles, re-embeds nothing. **Search → Setup** then shows **Vectors follow an older field mapping** with **Regenerate vectors**. | | Regenerate vectors | Embeds every document from the current fields, counted like turning semantic search on. Search answers from the old vectors until it finishes. | | Your rules | Pins, hidden documents and exclusions still apply. | | Switched off | The vectors are dropped, and search answers by words alone. | ### Collections of images only [Section titled “Collections of images only”](#collections-of-images-only) A collection can map **Image** and neither **Title** nor **Content**: an API-fed collection whose records are little more than an id and a photo URL, say. | Topic | Behaviour | | ------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | With semantic search on | A text query is answered by meaning alone, against the photos, closest first. Boosts and popularity don’t apply. **Title** is optional on **Search → Setup**. | | With semantic search off | **Search → Setup** asks you to map **Title** or turn semantic search on. | | A photo that fails | The record has nothing to embed. An upload or sync fails as a whole and the previous index keeps serving; an API push rejects only that record. The report names the record and its photo URL. | ### For developers [Section titled “For developers”](#for-developers) * `mode: "text"` in the [Search API](/developers/search-api/) switches semantic search off for one request. On a collection of images only, it searches the other searchable columns, a `sku` say. * [Similar items](/developers/search-api/#similar-items) lists the products nearest to one product. Next: [Boost results](/merchandising/boosting/) by their attributes, or [pin results](/merchandising/custom-results/) for one query. # Add synonyms > Make the words your visitors type find the products your catalog names differently. Source: https://docs.typemo.com/search/synonyms/ Visitors don’t always use your words. They type *tee* when your catalog says *t-shirt*. A synonym closes that gap for every search in the collection. | Kind | What it does | Use it for | | ----------- | -------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------- | | **Two-way** | Every term finds the results of the others: *laptop = notebook = mac*. | Spellings, abbreviations, brand variants | | **One-way** | The visitor’s terms also find a target term: *trainers, kicks → sneakers*. A search for the target itself stays as it was. | Visitor wording that differs from yours | ## Add a synonym [Section titled “Add a synonym”](#add-a-synonym) 1. Open **Collections → your collection → Synonyms** and click **Add synonym** (**Add your first synonym** on an empty page). 2. Under **How should synonyms work?**, pick **Two-way** or **One-way**. 3. Type the terms. For two-way, enter at least two under **Synonyms**. For one-way, enter the visitor’s words under **When users search for…** and your word under **Target term**. 4. Click **Save**. ![The Add synonym dialog with the Two-way and One-way choices and the Synonyms field](/_astro/synonyms.CRApACOY_Z2dBAx0.webp) The Add synonym dialog The rule applies from the next search. A **Fix** button on a zero-result search in [Search performance](/analytics/search-performance/#zero-result) opens the same form with the visitor’s word filled in. One meaning per rule A group that mixes *apple* the fruit with *Apple* the brand widens every related search. Spelling and brand variants are the safe wins. ## How rules behave [Section titled “How rules behave”](#how-rules-behave) | Case | What happens | | ----------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | | Letter case and hyphens | Ignored: *T-Shirt* and *t shirt* are the same term. | | Other forms of a term | A rule fires on the term as typed: add *tees* beside *tee* if visitors type both. The words it adds match in every form, as any search does. | | Terms of several words | Matched as a phrase: *running shoes*. | | Looser matches | Synonyms still apply when a search [widens to looser matches](/search/how-it-works/#how-a-search-loosens). | | **Source** column | **Manual** marks the rules you add. **Auto** and **AI** mark rules an earlier version of Typemo added on its own; edit or delete them like any other. | | Names for one product | Typemo also learns [alternative names](/search/ranking/#alternative-names) per product. A synonym is a rule for every product. | ## Check it worked [Section titled “Check it worked”](#check-it-worked) Search the visitor’s word on [Test your search](/search/test/). The products your catalog names differently should come back. Next: [Exclusions & stop words](/search/exclusions/) to cut noise, or [test your search](/search/test/). # Test your search > Search your own data with the real widget before visitors do, and what to check after each change. Source: https://docs.typemo.com/search/test/ **Preview** runs the real widget on your real data, with the settings, synonyms and rules your visitors get. Check a change there before a visitor meets it. ## Before you start [Section titled “Before you start”](#before-you-start) The project needs an API key and a collection with data. Without a key, **Preview** offers **Create API key**. ## Search in Preview [Section titled “Search in Preview”](#search-in-preview) 1. In the dashboard sidebar, open **Preview** under **Install**. The widget opens on its own. 2. Type the search your change is about. 3. Switch between **Desktop** and **Mobile** to see both layouts. The fullscreen button shows the widget edge to edge. ![Preview in Desktop view: the catalog widget searching lamp, with categories on the left and lamps with prices and ratings in the grid](/_astro/preview.BggxCCil_1il2Dr.webp) Preview runs the real widget on your data Preview shows what you have saved. Its searches count toward your plan like any other search. ## What to check after a change [Section titled “What to check after a change”](#what-to-check-after-a-change) | Change | Search for | You should see | | ------------------------------------------------- | --------------------------------------- | ------------------------------------------------------------------------------------------------- | | A [synonym](/search/synonyms/) | The visitor’s word | The products your catalog names differently | | A [stop word](/search/exclusions/#stop-words) | A phrase with the word, then without it | The same results | | A [boosting rule](/merchandising/boosting/) | A query where boosted products compete | Boosted products winning close calls, not the whole page | | A [custom result](/merchandising/custom-results/) | The trigger term, then a near miss | Pins in your order and hidden documents gone; a **Contains** term not firing wider than you meant | | An [exclusion](/search/exclusions/) | An excluded product’s name | The product staying out | | The [search language](/search/language/) | Another form of a word in your titles | The same products | | A [banner](/merchandising/banners/) | Nothing: open search without typing | The banner at the start of **Recommended for you** | | The no-results screen | A query nothing in your catalog matches | **No results found**, with your popular products under **Recommended for you** | Run your top queries after every change The searches visitors run most carry most of your traffic. [Search performance](/analytics/search-performance/#top-queries) lists them. Next: [How search works](/search/how-it-works/) explains what you see, and [Add synonyms](/search/synonyms/) fixes the most common miss. # An import failed > Find out why an upload or a sync failed or indexed fewer documents than your source holds, and fix it. Source: https://docs.typemo.com/troubleshooting/import-errors/ An upload or a sync failed, or it went through with fewer documents than your source holds. A failed run changes nothing: search keeps the last good version until a run succeeds. ## Find the cause [Section titled “Find the cause”](#find-the-cause) 1. **Read the report.** * **An upload** shows its problems before it imports anything: each refused row with its record number, the field and the reason. See [Upload a file](/import/upload-file/). * **A sync** leaves a run in the collection’s sync log. On the **Data** page, click **Sync log** next to **Last sync**, then **Details** on the run. | The run’s mark in the sync log | What it means | | ---------------------------------------- | ----------------------------------------------------------------- | | Red | The run failed and changed nothing. **Details** names what broke. | | Amber, with a count of failed or skipped | The run went through, but some records were refused or skipped. | | Any other finished run | Every record was indexed. | 2. **Match the problem to its fix.** | The report says | Fix | | ------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | | The source couldn’t be reached | Open the feed URL in a private browser window: it must download the file with no sign-in. See [Product feeds](/import/feeds/) or [Database](/import/database/). | | The file is too large | Split it, or send it over the API. See [Formats and limits](/import/limits/). | | A column’s values don’t fit its role, such as a price that isn’t a number | Fix those values in your source, or set the role to **Not mapped** on **Search → Setup**. See [Roles](/fields/roles/). | | Records were refused for their size, field count or ID | See [Prepare your data](/fields/prepare-your-data/) and [Formats and limits](/import/limits/). | | A crawl found no pages | Check that the start URL is public. See [Crawl a website](/import/crawler/). | | **Document limit reached** | The Free plan is full, often because the trial ended; paid plans are never stopped. See [Limits](/account/billing/#limits). | 3. **Run it again.** For an upload, fix the file and upload it again, or click **Import N valid rows** to leave the refused rows out. For a sync, fix the source, then click **Sync again** on the failure notice, or the source’s own sync button. ## A paused schedule [Section titled “A paused schedule”](#a-paused-schedule) Five failed syncs in a row stop a schedule, and Typemo emails you. Search keeps the last good version the whole time. Syncing by hand after the fix restarts the schedule. ## Check it worked [Section titled “Check it worked”](#check-it-worked) The new run in the **Sync log** has no failed or skipped count, and **Documents** on the **Data** page matches your source. Next: [How syncs work](/import/how-syncs-work/), or shape your records with [Prepare your data](/fields/prepare-your-data/). # A product isn't showing up > Find out why an item you have doesn't come back in search, from whether it was indexed to how it ranks. Source: https://docs.typemo.com/troubleshooting/product-not-showing/ An item you know you have doesn’t come back for a search that should find it. The checks run from “is it indexed at all” to “is it ranked too low”. ## Find the cause [Section titled “Find the cause”](#find-the-cause) 1. **Check it is in the collection.** Open **Collections → your collection → Data** and type its title or ID into **Search documents**. If it is there, go to step 5. 2. **Check the last sync.** Click **Sync log** next to **Last sync**. A run with a count of failed or skipped records left some records out: **Details** lists each one and why. Fix the record in your source, then sync again. See [An import failed](/troubleshooting/import-errors/). 3. **Check the document limit.** An import that stops with **Document limit reached** has filled the Free plan. After 30 days this is usually the trial ending. See [Limits](/account/billing/#limits). 4. **Check a sync has run since you added it.** An uploaded file changes only when you upload it again; other sources follow their schedule. To sync at once, see [Results are out of date](/troubleshooting/stale-results/). 5. **Check no rule hides it.** On the collection’s **Exclusions**, a condition that matches the item hides it from every search. On **Custom results**, a rule can hide it for one query. Narrow or delete the rule: see [Exclusions](/search/exclusions/) and [Custom results](/merchandising/custom-results/). 6. **Check its words.** Search looks for words only in the columns under **Searchable fields**, on **Search → Setup**. If the word people type sits in another column, add that column; see [Map your fields](/fields/map-fields/). If people use a different word, such as *trainers* for *sneakers*, add a [synonym](/search/synonyms/). 7. **Check how it ranks.** Search for its exact title. If it comes back for the title but not for the broader search, it is indexed but ranked low. [Boost it](/merchandising/boosting/), or [pin it](/merchandising/custom-results/) for the searches that matter. With [variant grouping](/fields/variant-grouping/) on, a variant shows inside its product’s result, not as a result of its own. ## Check it worked [Section titled “Check it worked”](#check-it-worked) Search for the item again in the dashboard **Preview**. It comes back for the search that missed it. To find more searches like this one, open **Queries** on **Home** and read the **Zero result** and **No clicks** tabs: see [Search performance](/analytics/search-performance/). Next: [Test your search](/search/test/) before and after a change. # Results are out of date > Find out why search still shows an old price, an old title or a removed item, and bring it up to date. Source: https://docs.typemo.com/troubleshooting/stale-results/ Your catalog changed, but search still shows the old price, the old title or an item you removed. Either the change hasn’t reached search yet, or search still shows the previous answer. ## Find the cause [Section titled “Find the cause”](#find-the-cause) 1. **Check what is indexed.** Open **Collections → your collection → Data** and find the item with **Search documents**. The table shows it as search sees it now. If it is already right, go to step 4. 2. **Check the source has synced.** **Last sync** shows when the collection last updated. | Source | When it picks up a change | | ------------------------- | ------------------------------------------------------------------------------------------------ | | An uploaded file | Only when you upload the file again. | | A feed, database or store | On its schedule. Sync it now with **Sync**, or **Sync now** for a store or a database. | | A crawled site | On its schedule. **Recrawl now** runs it at once. | | The WordPress plugin | Within about five minutes of each edit. See [WordPress plugin](/integrations/wordpress-plugin/). | | The API | When your server sends the change. See [Push over the API](/import/api-push/). | 3. **Check the schedule isn’t paused.** Five failed syncs in a row stop a schedule, and Typemo emails you. **Sync log**, next to **Last sync**, shows the failures. Fix the source, then sync by hand: that restarts the schedule. See [An import failed](/troubleshooting/import-errors/). 4. **Wait a minute or two.** A change can take a short while to show in search results. 5. **Reload the page.** The widget keeps the answers it has shown until the page reloads. The products shown before anyone types can lag a few minutes behind. ## Check it worked [Section titled “Check it worked”](#check-it-worked) Search for the item on your site after a reload. The new price or title shows, or the removed item is gone. Next: [How syncs work](/import/how-syncs-work/), or pick a fresher method on [Choose how to import](/import/overview/). # The widget doesn't load > Find out why the search widget doesn't appear or doesn't open on your site, and fix it. Source: https://docs.typemo.com/troubleshooting/widget-not-loading/ The widget shows nothing on your site, or its trigger never opens search. Work through the checks in order: each names what you see and how to fix it. ## Before you start [Section titled “Before you start”](#before-you-start) Open your site with the browser’s developer tools, on the **Console** and **Network** tabs. Filter the network list by `typemo`. ## Find the cause [Section titled “Find the cause”](#find-the-cause) 1. **Run the installation check.** Open **Install → Installation** and click **Verify**. Typemo loads your site and looks for the snippet. | Result | Fix | | ----------------------------------------------------------- | ----------------------------------------------------------------------------------------- | | *Widget found on …* | The snippet is live. Go to step 2. | | *The page loads, but the snippet wasn’t found in its HTML.* | [Paste the snippet](/widget/install/) into the template every page uses. | | *A Typemo script was found, but with a different key …* | The page has another project’s key, or an old one. Copy the snippet again and replace it. | | *Couldn’t reach …* | Your site refused the check. Look for `loader.js` in the **Network** tab yourself. | A tag manager or a theme that adds the snippet with JavaScript can hide it from the check. If `loader.js` shows up in the **Network** tab, the snippet is there. 2. **Check the widget is on.** On **Search → Setup**, **What you are building** set to **API only** puts no widget on your site. Pick **Catalog** or **Docs**, then save. 3. **Check the key.** The console says *Typemo: /init answered HTTP 404, widget not loaded* when the key in the snippet was deleted or regenerated. Copy the snippet again from **Install → Installation**. To manage keys, see [Manage API keys](/project/api-keys/). 4. **Check the domain.** A search that answers `403` with *Add this site to the project’s allowed domains* comes from a site not on the list. [Add the domain](/project/security/#widget-allowed-domains) on **Security**, staging sites included. 5. **Check the trigger.** The console says *Typemo: Target element ”…” not found* when the selector in `data-target-element` matches nothing on the page. Fix the selector, or render the trigger in the page’s HTML: one a script adds after the widget loads is missed. 6. **Check the tab.** When one collection is missing from the widget, open **Search → Look → Tabs**. A collection switched off there has no tab, but stays searchable over the API. ## If it still doesn’t load [Section titled “If it still doesn’t load”](#if-it-still-doesnt-load) * Add `data-debug="true"` to the script tag and reload: the console logs each step. Remove the attribute when you’re done. * After a change on **Search → Look** or **Search → Setup**, the widget on your site can take a few minutes to update. The dashboard preview shows it at once. ## Check it worked [Section titled “Check it worked”](#check-it-worked) Open your site, open search and type a word. Results appear under the search field. Next: [Install the widget](/widget/install/) step by step, or set the [allowed domains](/project/security/#widget-allowed-domains). # Blocks > Put category tiles, a banner or your own HTML into the search window: its places and what they hold, set up on Search → Blocks. Source: https://docs.typemo.com/widget/blocks/ The search window has places you can fill: the top of the start screen, above the results, and the answer when a search finds nothing. **Search → Blocks** draws them top to bottom, each with what it holds in the order the widget shows it: a search’s banner above the blocks, the start screen’s banners after them. The same places show wherever the window opens: over the page or [under your search field](/widget/branding/). Search → Blocks: the places stacked, category tiles above the results, the preview beside them100% × 360px Search → Blocks: the places stacked, category tiles above the results, the preview beside them ## Add a block [Section titled “Add a block”](#add-a-block) 1. Open **Search → Blocks**. With several collections, pick one under **Collection**: the preview and the banners follow it. 2. On a place, click **Add block** and pick what goes there: **Category tiles**, **Banner** or **Custom HTML**. The preview moves to that place and outlines the new block, and its settings open under its card. 3. Set it up, and move it with the arrows if the place holds several. A click on a block in the preview opens it too. 4. Click **Save changes**. A place holds up to ten blocks. Blocks in **No results** replace the widget’s own message; the recommendations stay under them. A banner is not part of **Save changes**: it saves when you click **Create banner** in its form. See [Show banners in search](/merchandising/banners/). ## Category tiles [Section titled “Category tiles”](#category-tiles) **Category tiles** shows one filter’s values in a row, each with a picture beside its name, or as text only. A tap narrows the results like a tick in the filters, and a second tap undoes it. As the shopper types, the values whose names meet the words come first, the matching part in bold, like an autocomplete; the rest follow in the filters’ order. The row shows 12 values at most, plus a value the shopper picked, greys the ones the shopper’s other choices rule out, and scrolls sideways when they don’t fit. | Setting | What it does | Default | | -------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------- | | **Tiles from** | The filter whose values the row shows | The column with the Category role, if it is a filter | | **Look** | **Photos**: each value’s picture from [its filter](/fields/filters/#rename-values-and-pick-colours), else a photo of one of its products; a value with neither shows its name. **Text only**: names | **Photos** | The row is headed by the filter’s own name. On a colour filter, **Text only** shows each colour beside its name. ## Custom HTML [Section titled “Custom HTML”](#custom-html) Your own markup, written with [Mustache](https://mustache.github.io/mustache.5.html) like the [result template](/widget/templates/). It reads `query` (what the visitor typed), `collection` (the open tab’s name) and `total` (the number of results). A new block starts empty, and in **No results** from a friendly message. CSS goes under **For developers → Custom CSS** at the bottom of the page; inside a block, style with the [theme variables](/widget/theming/) so it follows your colours. A strip of store benefits above the results: ```html
✓ Free shipping over €50 ✓ 30-day returns ✓ Secure checkout
``` # Match the widget to your brand > Set the logo, colours, font, language and controls of the widget on Search → Look. Source: https://docs.typemo.com/widget/branding/ **Search → Look** sets how the widget looks and which controls visitors get. The preview beside the form shows every change before you save it. 1. **Open Search → Look.** ![Search → Look: the search field and the themes on the left, the widget preview on the right](/_astro/look.x68eOwjd_1pP94V.webp) Search → Look 2. **Connect search to your site.** Look is one card, read top to bottom: * **Your search field**: the CSS selector of your site’s field, such as `#search`. For a Catalog widget, on a computer search opens right under it as people type: your field is the search box, and the window has everything it has over the page but a box and a logo of its own. **Enter** keeps the search in the window, never your site’s own search page; **Escape** or a click on the page closes it, and the text stays in your field. A search picked in the window shows in your field. On phones, search opens over the page from it. * **Search in your field**, for a Catalog widget with a field set, on by default: people type in your field and search opens under it, as above. Off, your field opens search over the page with a box of its own, on a computer too. * **Search placeholder**: the text in the empty search box. Left empty, the widget shows its own text in its language. * **Suggestions under the field**, for a Catalog widget: the row of searches under the box (yours and the popular ones). On by default. * **Where search opens**, for a Docs widget, each option drawn as it looks: **Overlay**, over the page, or **Under the field**. On phones, search always opens in the overlay. 3. **Pick a theme** under **Theme**: **Default**, **Night**, **Linen**, **Mono**, **Forest**, **Market** or **Ocean** sets the colours, the font and the corners at once. **Custom**, the last one, opens the colours and the font, starting from the palette you had: * **Colours**: pick each one, or type its hex code: | Colour | What it colours | | ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | **Accent** | Buttons, focus rings, selected filters | | **Background** | The widget’s surface | | **Text** | All text; lighter text and borders are mixed from it | | **Search field** | The fill of the search box | | **Sale** | Discount badges and sale prices. Unset, sale prices keep the **Text** colour and the badge is a neutral grey. The badge text is white, so pick a dark enough colour | Hover tints, borders and pressed states follow from these colours. The arrow next to a colour resets it; **Default** resets the colours and the font. * **Font**. The widget never downloads a font: * **System default** uses the visitor’s system font. * **Match site font** uses your page’s own font. * **Humanist**, **Geometric** and **Serif** are system font stacks in those styles. * **Custom…** takes a CSS `font-family` list. The font must already load on your site, or its `@font-face` rules go in [Custom CSS](/widget/theming/). * **“Powered by Typemo” footer**: the footer credit, on by default. Basic and higher plans can hide it. 4. **Set up the results window.** Search opens one window with the filters, the sort and the grid of results, over the page or under your search field; **Results window**, after **Theme**, sets it up. | Switch | What it does | Default | | ----------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- | | **Centred overlay** | Over the page, the window floats in the middle instead of spanning its width. Phones always get the full screen | Off | | **Filters on top** | The filters become one row of buttons above the results, beside the count and the sort, that scrolls sideways, led by a round button that clears every pick. On phones the row sits under the box; off, phones have one line with **Filters**, the count and the sort | Off | | **Sort control** | Lets visitors sort by price. Beside filters in a column, it needs at least one filter | On | | **Keep all filter values** | Values that would find nothing stay in the filters, greyed out | Off | | **Add to cart button** | A cart button on each result. A product in variants opens its page instead | On | | **Similar on product photos** | A button on each photo in the grid that opens products like it, on collections with semantic search | On | | **Frame around each result** | Each result in the grid in its own frame with space around it, instead of a grid with thin lines | Off | * For a Docs widget, **Results window** holds **Content excerpt**: the matching text under a result found in its body. On by default. The result’s own markup, the blocks and the banners work in both layouts: see [Templates](/widget/templates/), [Blocks](/widget/blocks/) and [Banners](/merchandising/banners/). 5. **Set the language** under **Language and currency**, and the currency for a Catalog widget. [Languages and currency](/widget/languages-currency/) lists the options. 6. **Order the tabs** under **Tabs**, when the project has more than one collection. The arrows move a collection; the switch hides it from the widget. The last visible collection can’t be hidden. 7. **Style an element by clicking it**: click **Style by clicking** above the preview, then click any element in it, such as a product name, a price or the cart button. Its controls open at the top of the page with its current values: colour, size, weight, corners, capitals or **Hide**, depending on the element. **Reset** puts it back. Switch the preview between **Mobile** and **Desktop** with the icons beside it. 8. Click **Save changes** in the bar at the bottom. ## Check it worked [Section titled “Check it worked”](#check-it-worked) The preview shows the saved look. Reload your site to see it there: the change can take several minutes to reach every visitor. ## Good to know [Section titled “Good to know”](#good-to-know) * **The logo shows in the catalog widget only**, on larger screens. Clicking it returns to the start screen. * **Background and Text apply in both themes of the docs widget**, so its dark mode keeps your colours. * **Under API only**, **Look** holds what the AI Assistant uses: the theme, the language and currency, and the cart button. With the assistant off, the tab is hidden. * **Filters and the price slider** are set per collection on **Search → Setup**. See [Filters](/fields/filters/). Use your store's button colour as the accent Pick the same hex as your own primary buttons. A very pale accent makes focus rings hard to see, so take a slightly darker shade. For control beyond these settings, such as exact hover tones or card spacing, use [CSS variables](/widget/theming/). Your own CSS and HTML live on **Search → Blocks**: the window’s places take [blocks](/widget/blocks/), and under **For developers** **Custom CSS** restyles any element by its [part name](/widget/theming/#parts) and **Result** changes what a product card shows ([Templates](/widget/templates/)). A search page laid out your own way is built with [InstantSearch](/developers/instantsearch/) on your collection. Next: [Languages and currency](/widget/languages-currency/), or [theme the widget with CSS](/widget/theming/). # Catalog widget > What the catalog widget shows your shoppers, from the start screen to the cart button, and how it gets better with use. Source: https://docs.typemo.com/widget/catalog/ The catalog widget is a full-screen search for stores and any other catalog with photos and prices. It opens over your page and shows your products as cards, with filters beside them and a cart button on each card. It runs on any site that can carry a script tag. ![The catalog widget searching lamp: sort and categories on the left, product cards with photos, prices and ratings](/_astro/preview.BggxCCil_1il2Dr.webp) The catalog widget after a search ## Before the shopper types [Section titled “Before the shopper types”](#before-the-shopper-types) The start screen gives the shopper somewhere to go at once: * **Recommended for you**: a row of your top products. * **Recent searches**: the shopper’s own, kept per tab, with **Clear** beside them. * **Popular searches** in your store. One tap runs one. On a computer both lists sit in a column beside the products; on a phone they are a row of searches under the box. Opening the widget doesn’t count as a search on your plan. ## While the shopper types [Section titled “While the shopper types”](#while-the-shopper-types) * **Results follow each keystroke**, and suggestions under the field complete the query. * **Typos still find the product.** If the exact words match nothing, the search tries close variants. See [How search works](/search/how-it-works/). * **A search never ends on a blank page.** When nothing matches, the widget says so and shows your popular products below. ## What a result shows [Section titled “What a result shows”](#what-a-result-shows) * **A card per product**: photo, title and price. On sale, the sale price shows with a discount badge. A product with a second photo shows it while the pointer rests on the card. * **One card for a product in variants**, such as sizes and colours, with a count of the other variants. See [Variant grouping](/fields/variant-grouping/). * **Filters beside the results** on a computer, scrolling with them as one page under the search box. On a phone they are one row under the box that scrolls sideways: the sort, **Filters** for all of them, then each filter on its own. They come from the [filters you set up](/fields/filters/). * **Sorting by price**, above the filters. * **Similar** on a product photo, which opens products like it. It shows on collections with semantic search. * **A cart button.** It hands the product to your store’s cart through an [event](/widget/events/), and the results stay where they were. A product in variants opens its page instead, so the shopper can pick one. The search sits in the page address, so the back button and a shared link bring the same results back. ## Several collections, one search [Section titled “Several collections, one search”](#several-collections-one-search) Each collection is a tab: products, articles and pages search from the same box. A collection from the [crawler](/import/crawler/) shows as plain title and text, without photos, prices or a cart button. ## How it gets better with use [Section titled “How it gets better with use”](#how-it-gets-better-with-use) * **What shoppers choose moves up.** Products that get clicks and purchases rise over time. A popularity you set by hand stays as you set it. * **Products learn new words.** Words shoppers use to find a product are added to it. [AI Insights](/analytics/insights/) lists each word learned, with **Undo**. ## What this means for you [Section titled “What this means for you”](#what-this-means-for-you) What the cards show comes from the fields you map, so check them in [Map your fields](/fields/map-fields/) before you go live. The look is yours to set on **Search → Look**. On WooCommerce, the [plugin](/integrations/woocommerce/) syncs the catalog, installs the widget and connects the cart for you. Next: [Install the widget](/widget/install/), or [connect the cart button](/widget/events/). # Docs widget > What the docs widget shows your readers: results by page and section, a keyboard-first panel and answers from the AI Assistant. Source: https://docs.typemo.com/widget/docs/ The docs widget is a compact search panel for documentation and content sites. A reader opens it with `⌘K`, types a question and lands on the section that answers it, not just the page. It reads your site’s own structure, so a crawled site needs no setup beyond the snippet. ![The docs widget searching install: the Ask AI Assistant row, then results grouped under Get started with their page paths](/_astro/docs-preview.CUgsAW0w_Z13UusO.webp) The docs widget groups results by section ## Before the reader types [Section titled “Before the reader types”](#before-the-reader-types) The empty panel shows the reader’s **Recent searches** and a **Suggested** list of six documents: the ones you pinned first, then your most popular. To pin up to six, open **Search → Setup**, pick the collection and use **Pinned documents**. Each pin can carry an icon from the [Lucide](https://lucide.dev/icons/) set, which also marks it in search results. ![The docs widget before typing: popular searches as chips under the search box, two Recent searches, and the Suggested documents below them](/_astro/docs-start.f0_z51NB_1aG2FY.webp) The docs widget before the first keystroke ## What a result shows [Section titled “What a result shows”](#what-a-result-shows) * **Where it lives.** Under its name, a result shows the path to it: the page, then the headings between. Ten pages with a “Configuration” heading stay apart before a click. * **Sections under their page.** When a page and some of its sections all match, the sections hang under the page. * **The words that matched.** When the match is in a section’s text rather than its heading, the result shows that text with the words marked. To keep every result to its heading, turn off **Content excerpt** on **Search → Look**. * **Groups like your site’s.** Results group under your site’s own sections, which the crawler reads from each page’s sidebar group or breadcrumb. With several groups, each shows up to five results. To group by page address instead, open the collection’s **Settings** and add rules under **Result groups**, such as `/security/**`. The first matching rule wins, and rules apply from the next sync. ## Keyboard [Section titled “Keyboard”](#keyboard) | Key | What it does | | ---------------------------- | ----------------------------------------- | | `⌘K`, `Ctrl+K` or `/` | Opens or closes the panel | | `↑` `↓` | Moves the selection, wrapping at the ends | | `↵` | Opens the selected result | | `⌘`, `Ctrl` or `Shift` + `↵` | Opens it in a new tab | | `Esc` | Closes the panel | `/` opens the panel only when the reader isn’t typing in a field. ## Light and dark [Section titled “Light and dark”](#light-and-dark) The panel follows the reader’s system setting, and a toggle in its footer overrides it for that reader. The AI Assistant’s chat turns with it. A **Background** or **Text** colour set on **Search → Look** applies in both themes. ## Answers from the AI Assistant [Section titled “Answers from the AI Assistant”](#answers-from-the-ai-assistant) With the [AI Assistant](/ai-assistant/overview/) on, an **Ask AI Assistant** section sits above the results. Its first row is the question the reader typed: one click asks it. The answer comes from your pages and links the ones it used. ## Several collections [Section titled “Several collections”](#several-collections) Docs, changelog and blog can each be a collection. The panel then opens on a list of them; picking one, or simply typing, searches inside it. A collection that doesn’t come from the crawler shows in the same compact list. Try it here These docs run the docs widget. Press `⌘K` and search. ## Where the content comes from [Section titled “Where the content comes from”](#where-the-content-comes-from) The widget searches what you index. [Crawl your website](/import/crawler/) on any stack that renders HTML, or [index your build](/import/index-your-build/) on every deploy of a static site. Next: [Crawl your website](/import/crawler/), then [install the widget](/widget/install/). # Embed options > For developers: every attribute the install snippet reads, the JavaScript methods of the running widget, and how to configure it from code. Source: https://docs.typemo.com/widget/embed-options/ For developers. This page lists every attribute the install snippet reads and the JavaScript API of the running widget. Put attributes on the `loader.js` script tag: the loader hands them to the search widget and to the AI Assistant. ```html ``` ## Script attributes [Section titled “Script attributes”](#script-attributes) | Attribute | Values | Default | What it does | | ------------------------- | ---------------------------------------------------------- | -------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `data-target-element` | A CSS selector starting with `#`, `.` or `[`, or a bare ID | None | A click on a matching element opens the search. Hover or focus loads its data early. Every match on the page is connected | | `data-search-input` | A CSS selector | **Your search field** on **Search → Look** | The site’s own search field: on a computer the Catalog widget opens under it, the field its search box (over the page with **Search in your field** off); on phones search opens over the page from it (a Docs widget: **Under the field**). Wins over the dashboard’s for this page | | `data-ai-trigger` | The same as above | None | A click on a matching element opens or closes the AI Assistant’s chat, without the search. Works while the assistant is on. See [Your own Ask AI button](/ai-assistant/ask-ai-button/) | | `data-placeholder` | Text | **Search placeholder** on **Search → Look** | The text in the empty search box | | `data-locale` | A language code, such as `de` or `de-DE` | **Language** on **Search → Look** | The language of the search widget and the assistant’s interface. An unsupported code shows English. See [Languages and currency](/widget/languages-currency/) | | `data-default-collection` | A collection ID | The first tab under **Search → Look → Tabs** | The tab the widget opens on. An ID that isn’t one of the widget’s tabs is ignored. A visitor who picked another tab gets their tab back | | `data-start-open` | `true` | Closed | Opens the search as soon as the page loads | | `data-show-facets` | `false` | Shown | Catalog widget: hides the filters | | `data-show-add-to-cart` | `true` or `false` | **Add to cart button** on **Search → Look** | Catalog widget: shows or hides the cart button on cards | | `data-disable-url-state` | `true` | Off | Catalog widget: stops writing the search into the page address, and stops opening a search from a link | | `data-primary-color` | A CSS colour | None | An older way to set the accent. In the search widget it wins over **Accent**; in the assistant’s chat **Accent** wins. Prefer [`--typemo-brand`](/widget/theming/) | | `data-debug` | `true` | Off | Logs a line to the console when the widget starts | | Case | Behaviour | | ----------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | | `true` and `false` values | Most switches turn on only with exactly `true`. `data-show-facets` and `data-show-add-to-cart` count any value but `false` as on | | An attribute that sets something on **Search → Look** | The attribute wins on that page, except `data-primary-color` in the assistant’s chat | | The API key | It goes only in the `k=` of the `src`. A `data-api-key` attribute is ignored | | Changing an attribute after the page loaded | Nothing happens: attributes are read once, when the widget starts. Use `typemo('init', …)` below | | An element `data-target-element` matches that appears later | It isn’t connected. Call `open()` from its click handler instead | ## JavaScript API [Section titled “JavaScript API”](#javascript-api) Each script the snippet loads creates one global instance, once it has finished loading. | Global | What it is | | --------------------------- | ------------------------------------------------------------------------------------------- | | `window.typemoInstance` | The catalog widget | | `window.typemoDocsInstance` | The docs widget | | `window.typemoAssistant` | The AI Assistant. Its methods are on [Your own Ask AI button](/ai-assistant/ask-ai-button/) | ### Methods of the search widget [Section titled “Methods of the search widget”](#methods-of-the-search-widget) | Method | What it does | | ----------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | | `open(collectionId?)` | Opens the search. The docs widget opens on `collectionId` when it is one of its tabs; the catalog widget ignores it | | `close()` | Closes the search | | `openChat()` | Opens the AI Assistant’s chat with the search closed. Does nothing while the assistant is off | | `prefetch()` | Loads the widget’s data before the first open, as hovering the trigger does | | `trackAddToCart(collectionId, docId)` | Reports a cart add made outside the widget, such as on the product page a result led to. The product then counts as found through search | | `getAttributedDocIds(collectionId)` | Returns the IDs of the products this visitor clicked or added through the widget in the last 48 hours | | `trackPurchase(collectionId, docId, value, currency)` | Reports one purchased item: `value` is what was paid for it, `currency` a code such as `EUR` | | `clearAttribution(collectionId)` | Forgets the remembered products, so the next order starts fresh | | `destroy()` | Removes the widget from the page | [Events](/widget/events/#report-purchases) shows the purchase methods together on an order confirmation page. ### Configure from code [Section titled “Configure from code”](#configure-from-code) `typemo('init', config)` replaces the running search widget and AI Assistant with new ones built from `config`. The script tag’s attributes are not merged in, so pass everything you need, `apiKey` included. Call it from a script after the snippet; the first two lines queue the call until the loader is ready: ```html ``` | Option | Type | What it does | | ------------------------------------------------------------------------------------------ | -------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `apiKey` | string | Required. The key from the snippet’s `k=` | | `targetElement`, `aiTrigger`, `placeholder`, `locale`, `defaultCollection`, `primaryColor` | string | As the attributes above | | `startOpen`, `showFacets`, `showAddToCart`, `disableUrlState`, `debug` | boolean | As the attributes above | | `cssVariables` | object | [Theme variables](/widget/theming/) by name, without `--typemo-`: `{ brand: '#d84315' }`. When set, the colours from **Search → Look** are not applied. Themes the assistant’s chat too | | `customCss` | string | CSS applied inside the widget and the assistant’s chat, after **Custom CSS** from **Search → Look**. See [Parts](/widget/theming/#parts) | | `defaultSort` | `'relevance'`, `'price_asc'`, `'price_desc'` | Catalog widget: the order a search starts in. Needs a column mapped as **Price** | | `popularSearches` | string array | Replaces the popular searches the widget shows, up to eight | | `onSelect(result)` | function | Called when a visitor opens a result, before the widget follows its link | | `onAddToCart(product)` | function | Catalog widget: called on a cart press in the results, with the same [product](/widget/events/#the-product) as `typemo:add-to-cart` | Next: [Events](/widget/events/) to connect the cart, or [Theming with CSS](/widget/theming/). # Events > For developers: connect the cart button to your store and report purchases, with the events and their payloads. Source: https://docs.typemo.com/widget/events/ For developers. The widget talks to your page through DOM events on `document`. Searches and result clicks are counted on their own; you connect two things: the cart button and your order confirmation page. On WooCommerce, the [plugin](/integrations/woocommerce/) connects both for you. ## Cart events [Section titled “Cart events”](#cart-events) | Event | Direction | `detail` | When | | ---------------------------- | ------------------ | --------------------------- | --------------------------------------------------------------------------------------- | | `typemo:add-to-cart` | Widget → your page | [The product](#the-product) | A visitor pressed a cart button in the results or in an AI Assistant answer. Cancelable | | `typemo:add-to-cart-success` | Your page → widget | `{ id }` | Your store confirmed the add. The button shows **Added** | | `typemo:add-to-cart-error` | Your page → widget | `{ id, message? }` | The add failed. The button returns to normal | Dispatch the two answers on `document`, after your server confirms the cart changed. The AI Assistant’s own events are on [Your own Ask AI button](/ai-assistant/ask-ai-button/). ```js document.addEventListener('typemo:add-to-cart', async (e) => { const { id, isGrouped } = e.detail; // A product in variants: let the widget open its page so the shopper picks one. if (isGrouped) return; e.preventDefault(); try { await fetch('/cart/add', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ productId: id, quantity: 1 }) }); document.dispatchEvent(new CustomEvent('typemo:add-to-cart-success', { detail: { id } })); } catch (err) { document.dispatchEvent( new CustomEvent('typemo:add-to-cart-error', { detail: { id, message: err.message } }) ); } }); ``` Update the cart in place: swap your basket markup, open your cart drawer or bump the counter. Most carts return what you need in their add-to-cart response. ### The product [Section titled “The product”](#the-product) | Field | Type | What it holds | | -------------- | --------------------- | ------------------------------------------------------ | | `id` | string | The document ID, as in your data | | `title` | string | The product’s title | | `url` | string | The product page, or an empty string | | `price` | number or `undefined` | What the shopper pays: the sale price when it is lower | | `image` | string or `undefined` | The image URL | | `collectionId` | string | The collection the product came from | | `isGrouped` | boolean | `true` when the card stands for several variants | | `variantCount` | number | How many variants the card stands for | ### What happens after a press [Section titled “What happens after a press”](#what-happens-after-a-press) | Case | What the widget does | | --------------------------------------------- | ------------------------------------------------------------------------------------------------------------ | | Not cancelled, product in variants | Opens the product page in a new tab | | Not cancelled, single product | Nothing more: your listener adds it | | Cancelled with `preventDefault()` | Nothing more | | No answer event within 2.5 seconds | The button returns to normal | | A card already showing **Added** | Ignores further presses | | Your store reloads the page within 10 seconds | The search stays closed after the reload, so the shopper sees the cart; reopening it brings the results back | ## Report purchases [Section titled “Report purchases”](#report-purchases) The widget remembers, in the visitor’s browser, each product they clicked in the results or added to the cart through it. It keeps them for 48 hours, per collection. On your order confirmation page, which must carry the install snippet too, report the ordered items it remembers: ```js const collectionId = 'products'; // your products collection's ID function reportPurchase(attempt = 0) { const widget = window.typemoInstance; // exists once the widget's script has loaded if (!widget) { if (attempt < 20) setTimeout(() => reportPurchase(attempt + 1), 100); return; } const attributed = widget.getAttributedDocIds(collectionId); for (const item of order.items) { if (attributed.includes(String(item.id))) { widget.trackPurchase(collectionId, String(item.id), item.total, order.currency); } } widget.clearAttribution(collectionId); // the next order starts fresh } reportPurchase(); ``` Each purchase links back to the click and the search that led to it. The numbers land in the **Conversions** and **Revenue** cards on **Home**: see [Analytics overview](/analytics/overview/). [Embed options](/widget/embed-options/#javascript-api) lists these methods with `trackAddToCart`, for a cart add made outside the widget. Next: [Embed options](/widget/embed-options/), or [Analytics overview](/analytics/overview/) to read the results. # Install the widget > Copy the snippet from the dashboard, paste it into your site, connect your search button and check that it runs. Source: https://docs.typemo.com/widget/install/ One script tag puts the widget on your site. Your widget type, look and collections come with it, and so does the [AI Assistant](/ai-assistant/overview/) when it is on. ## Before you start [Section titled “Before you start”](#before-you-start) * A collection with documents in it. * Your site under **Security → Allowed domains**. The widget searches only on the sites listed there; a page on `localhost` works without being listed. See [Widget allowed domains](/project/security/#widget-allowed-domains). * On WordPress or WooCommerce, the [plugin](/integrations/woocommerce/) installs the widget for you, so you can skip this page. 1. **Copy the snippet.** Open **Install → Installation** and copy the **Install snippet** under **Add the script to your site**. It carries your project’s Read only key. ![Install → Installation: Where the widget runs with three domains, each with a Verify button, then the Install snippet with its copy button, and links to the WordPress plugin and the installation guide](/_astro/installation.DFj0HfjD_Z1Ffrkt.webp) Install → Installation If the page shows **No Read only key**, click **Create API key** first. 2. **Paste it before ``** on every page that should have search. That is usually your theme template, your layout file or a site builder’s footer code. ```html ``` 3. **Connect your search button.** Add `data-target-element` with a CSS selector for the button or field that should open search: ```html ``` Without it, visitors open search only with `⌘K`, `Ctrl+K` or `/`. [Embed options](/widget/embed-options/) lists the other attributes. ## Check it worked [Section titled “Check it worked”](#check-it-worked) 1. On **Install → Installation**, click **Verify** next to your domain. The first domain is checked when the page opens. | Result | What to do | | ---------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | | **Widget found on … — you’re live.** | Nothing. | | **The page loads, but the snippet wasn’t found in its HTML.** | Paste the snippet, or see the next section if a script adds it. | | **A Typemo script was found, but with a different key than this project’s.** | Replace the tag with this project’s snippet. | | **The snippet on this page carries a Write & Read key, which the widget refuses.** | Replace the tag with this project’s snippet; only a Read only key loads the widget. | | **Couldn’t reach …** | Check the address in **Security → Allowed domains** and that the site is up. | 2. Open your site, click your search button and type a few letters. Try it here These docs run the same snippet. Press `⌘K` now. ## Tag managers and single-page apps [Section titled “Tag managers and single-page apps”](#tag-managers-and-single-page-apps) * **A tag manager or your app’s code can add the tag.** The snippet finds itself by its address. **Verify** reads only the page’s HTML, so it misses such a tag: try a search on the site instead. * **Add the tag once**, in the layout every route shares. Adding it again on a route change does nothing. * **A button rendered later isn’t connected.** `data-target-element` connects the elements on the page when the widget starts. For a button your app renders afterwards, call `typemoInstance.open()` from its click handler. See the [JavaScript API](/widget/embed-options/#javascript-api). ## If search doesn’t work [Section titled “If search doesn’t work”](#if-search-doesnt-work) Open the browser console on your site and look for a message from Typemo, or a failed request in the **Network** tab. | What you see | Cause | Fix | | ---------------------------------------------------- | --------------------------------------------------------------------- | ------------------------------------------------------ | | `Typemo: /init answered HTTP 404, widget not loaded` | The key in `k=` is unknown or was deleted | Copy the snippet from **Install → Installation** again | | `Typemo: Target element "#search-button" not found` | Nothing on the page matches `data-target-element` | Fix the selector, or open search from code as above | | A search request answers `403` | The site isn’t under **Security → Allowed domains** | Add it, including the staging sites you test on | | No message and no widget | **Search → Setup** is set to **API only** and the AI Assistant is off | Pick **Catalog** or **Docs**, or turn the assistant on | To confirm the widget started, add `data-debug="true"` to the tag: the console then logs a line starting with `Typemo: initialized`. Remove it when you’re done. [The widget doesn’t load](/troubleshooting/widget-not-loading/) covers the remaining causes. Next: [Match the widget to your brand](/widget/branding/), or [connect the cart button](/widget/events/) on a store. # Languages and currency > The languages the widget speaks, the currencies it formats prices in, and how a page overrides the dashboard. Source: https://docs.typemo.com/widget/languages-currency/ The widget’s language and currency are display settings on **Search → Look**, under **Language and currency**. They change what visitors read, never what a search matches: that follows each collection’s [search language](/search/language/), and changing them re-indexes nothing. ![The Language and currency card with Language English and Currency Euro](/_astro/languages-currency.CZNwJqfV_XBt3J.webp) Search → Look → Language and currency ## Settings [Section titled “Settings”](#settings) | Setting | What it sets | Default | | ---------------------- | -------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | | **Language** | Every word the search widget shows: placeholder, buttons, filter labels, messages | English | | **Currency** | The symbol on every price. Catalog widget only | US Dollar ($) | | **Search placeholder** | The text in the empty search box, up to 80 characters. It sits under **Search on your site** | The widget’s own text in its language: “Search” in the catalog widget, “Search documentation…” in the docs widget | ## Languages [Section titled “Languages”](#languages) | Language | Code | | ---------- | ---- | | English | `en` | | Deutsch | `de` | | Français | `fr` | | Italiano | `it` | | Español | `es` | | Nederlands | `nl` | | Polski | `pl` | | Svenska | `sv` | | Русский | `ru` | The AI Assistant answers in the visitor’s own language, whatever this setting says. See [AI Assistant](/ai-assistant/overview/#language). ## Currencies [Section titled “Currencies”](#currencies) | Currency | Symbol | | ------------- | ------ | | US Dollar | $ | | Euro | € | | British Pound | £ | | Russian Ruble | ₽ | | Japanese Yen | ¥ | | Swiss Franc | CHF | | Polish Złoty | zł | | Swedish Krona | kr | | Mexican Peso | $ | ## How prices show [Section titled “How prices show”](#how-prices-show) | Case | Behaviour | | ----------------- | --------------------------------------------------------------------------------------------------------------------------------- | | Number format | Two decimals and a comma between thousands, such as `€1,299.00`, in every language | | Symbol position | Before the price. A store connected through the WordPress plugin takes WooCommerce’s position | | The number itself | Comes from the column mapped as **Price**. The currency setting never converts it | | A feed in cents | `1999` for 19.99 shows as `$1,999.00`. Fix the data, or map another column as **Price** in [Map your fields](/fields/map-fields/) | ## Language per page [Section titled “Language per page”](#language-per-page) The `data-locale` attribute on the script tag wins over the dashboard. Set it per language in your page templates, and one install follows your site’s locale: ```html ``` | Case | Behaviour | | --------------------------- | -------------------------------------------------------------------------- | | Region codes | `de-DE`, `de_DE` and `DE` all mean `de` | | A language not listed above | The widget shows English, even if the dashboard is set to another language | | `data-placeholder` | Wins over **Search placeholder**, the same way | For a catalog translated into several languages, keep one collection per language. Add `data-default-collection` with that language’s collection ID, so each locale’s pages open on the matching tab. [Embed options](/widget/embed-options/) lists both attributes. Next: [Match the widget to your brand](/widget/branding/), or [set the search language](/search/language/) of a collection. # Choose a widget > The catalog widget, the docs widget or no widget at all: what each one shows and which one fits your site. Source: https://docs.typemo.com/widget/overview/ The widget puts Typemo search on your site with one script tag. It comes in two types, and you can also skip it and build your own interface on the API. You pick in **Search → Setup**, under **What you are building**. ![What you are building on Search → Setup, with Catalog selected beside Docs and API only](/_astro/search-setup.CYkYdBmu_JvtvL.webp) Search → Setup: pick Catalog, Docs or API only ## The three choices [Section titled “The three choices”](#the-three-choices) | Choice | What visitors get | Read next | | ------------ | --------------------------------------------------------------------------- | ------------------------------------------------------------------------------------ | | **Catalog** | A full-screen search with product cards, filters, sorting and a cart button | [Catalog widget](/widget/catalog/) | | **Docs** | A compact panel that opens with `⌘K` and lists pages by section | [Docs widget](/widget/docs/) | | **API only** | Nothing from Typemo on the page: your own interface calls the search | [InstantSearch](/developers/instantsearch/) or [Search API](/developers/search-api/) | ## Pick by what you show [Section titled “Pick by what you show”](#pick-by-what-you-show) * **Products with photos and prices:** Catalog. The cards, filters and price sorting come from the fields you map. * **Pages, articles and guides:** Docs. A crawled site needs no field setup. * **Both on one site:** pick the type for what matters most. A project has one widget, and each collection becomes a tab in it. The catalog widget shows a crawled collection as plain title and text; the docs widget shows any collection as its compact list. * **Your own design or framework:** API only. If your interface already runs on InstantSearch, keep it and swap the search client; anything else calls the Search API directly. The AI Assistant still works under API only: the snippet then loads only the assistant. ## What both widgets share [Section titled “What both widgets share”](#what-both-widgets-share) * **One script tag**, copied from **Install → Installation**. See [Install the widget](/widget/install/). * **No clash with your styles.** Your page’s styles never change the widget, and the widget’s styles never change your page. * **Open from anywhere.** `⌘K`, `Ctrl+K` or `/` opens it, and so can your own button. * **Your look.** Logo, colours, font and language are set on **Search → Look**. See [Match the widget to your brand](/widget/branding/). * **The AI Assistant.** When it is on, **Ask AI** in the search field opens the chat. See [AI Assistant](/ai-assistant/overview/). * **Analytics without setup.** Searches and result clicks are counted on their own. Cart adds and purchases need a few lines of code on your store: [Events](/widget/events/). Next: [Install the widget](/widget/install/), or see [what the catalog widget does](/widget/catalog/) for your shoppers. # Templates > For developers and agencies: replace the search result with your own HTML template, written on Search → Blocks. Source: https://docs.typemo.com/widget/templates/ For developers and agencies. The result template replaces what is inside every result with your own HTML. Open **Search → Blocks**, then **For developers** at the bottom, on **Result**: it opens with the widget’s own result as code; change it and it becomes yours. The preview shows it as you type. To add your own HTML above the results or on the start screen, use a Custom HTML [block](/widget/blocks/). Templates hold HTML only. CSS has one place, **Custom CSS** beside **Result**: it styles the whole widget, your template included. Search → Blocks → For developers, with the result template open and the preview beside it100% × 360px Search → Blocks → For developers, with the result template open and the preview beside it One template fills every list, so write it for both shapes: the result carries `tm-item--tile` in a grid and `tm-item--row` in a list, and the [result classes](#result-classes) lay out the same markup either way. The docs widget has no result template. ## Syntax [Section titled “Syntax”](#syntax) Templates use [Mustache](https://mustache.github.io/mustache.5.html), the format most search layers use. | Write | What it does | | ----------------------------- | ----------------------------------------------------------------------------- | | `{{brand}}` | Prints the field, with `<`, `>` and `&` shown as text | | `{{{title_html}}}` | Prints the title with the matched words in ``. Use three braces for it | | `{{#on_sale}}…{{/on_sale}}` | Shows the part when the field has a value; repeats it for each item of a list | | `{{^in_stock}}…{{/in_stock}}` | Shows the part when the field is empty or false | Typing `{{` in the editor lists the fields with a value from your first document. **Insert field** finds one by name and puts it where the cursor is. ## Result fields [Section titled “Result fields”](#result-fields) | Field | What it holds | | -------------------------- | --------------------------------------------------------------------------------------------------------- | | `title` | The product name | | `title_html` | The name with the matched words marked | | `price` | The price to pay, formatted in your currency: the sale price on a sale | | `regular_price` | The price before the sale, on a sale only | | `discount` | The saving, such as `−20%`, on a sale only | | `on_sale` | True when the product is on sale | | `in_stock`, `out_of_stock` | True when the stock column says so | | `image` | The first photo | | `second_image` | The second photo when the image column holds a list, empty otherwise; the standard tile shows it on hover | | `url` | The product page | | `category` | The last level of the first category | | `rating` | The rating | | `position` | The result’s place in the list, from 1 | | `sale_badge` | True when the product is on sale and in stock, as the widget’s own badge shows | | `add_to_cart` | True when the cart button shows: **Add to cart button** on **Look → Results window**, a price, in stock | | Any column | Every column of the collection by its name, such as `{{brand}}` or `{{material}}` | ## Result classes [Section titled “Result classes”](#result-classes) The standard result is written on the widget’s own classes, so the widget’s styles and your theme apply to it as to the built-in one, in a grid and in a list. These classes are as stable as the [parts](/widget/theming/#parts): | Class | The element | | -------------------------------------- | --------------------------------------------- | | `tm-item--tile`, `tm-item--row` | The result in a grid, and in a list | | `tm-item-media`, `tm-item-img` | The photo’s box and the photo | | `tm-item-img--hover` | The second photo, shown on hover | | `tm-item-tags`, `tm-item-tag--sale` | The card’s badge corner and the sale badge | | `tm-item-body` | Everything beside or under the photo | | `tm-item-title` | The name. Matched words are in `` | | `tm-item-meta` | The category under the name | | `tm-item-rating`, `tm-item-stars` | The rating and its stars, lit by `--tm-stars` | | `tm-item-price-row` | The price line | | `tm-item-price`, `tm-item-price--sale` | The price, and the price on a sale | | `tm-item-price-was` | The price before the sale | | `tm-item-cart` | The cart button | A rule in **Custom CSS** such as `.tm-item-title { font-size: 15px; }` changes the built-in result and yours alike. ## Actions [Section titled “Actions”](#actions) Add `data-typemo-action` to a button in a result template: | Value | What a click does | | --------- | ----------------------------------------------------------------- | | `cart` | Adds the product to the cart, like the widget’s own cart button | | `similar` | Shows products like this one, on collections with semantic search | A click anywhere else on the result opens the product, as before. The result is already a link, so a template needs no `` of its own. **Similar** shows on tiles only. ## Example [Section titled “Example”](#example) A result with the brand above the name and a cart button. On **Result**: ```html
{{#brand}}
{{brand}}
{{/brand}}
{{{title_html}}}
{{price}}{{#on_sale}} {{regular_price}}{{/on_sale}}
{{#add_to_cart}}{{/add_to_cart}}
``` On **Custom CSS**: ```css .my-card { display: flex; flex-direction: column; gap: 6px; } /* In a list the photo sits beside the text. */ .tm-item--row .my-card { flex-direction: row; align-items: center; } .tm-item--row .my-card img { width: 56px; } .my-card-brand { font-size: 11px; text-transform: uppercase; opacity: 0.6; } .my-card-price { font-weight: 700; } .my-card-buy { border: 0; border-radius: 999px; padding: 6px 12px; background: #1f4d3a; color: #fff; } ``` | Case | Behaviour | | ------------------------------------------------- | ------------------------------------------------------------------------------------------- | | `