Skip to main content
Glama
intent-classifier.ts413 B
import { Keyword } from '../types/index.js'; export class IntentClassifier { classify(keyword: Keyword): Keyword['intent'] { const phrase = keyword.phrase.toLowerCase(); if (/buy|price|quote|service/.test(phrase)) return 'transactional'; if (/best|top|vs|review/.test(phrase)) return 'commercial'; if (/how|what|why|guide/.test(phrase)) return 'informational'; return 'navigational'; } }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/seovimalraj/locations'

If you have feedback or need assistance with the MCP directory API, please join our Discord server