npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@devma/qloo

v1.0.1

Published

TypeScript SDK for the Qloo Insights API - Generate taste-based insights and recommendations

Readme

Qloo TypeScript SDK

Developer-friendly & type-safe TypeScript SDK for the Qloo Insights API - Generate taste-based insights and recommendations.

About

This SDK provides a comprehensive TypeScript interface for the Qloo Insights API, enabling developers to generate taste-based insights and recommendations with full type safety and modern JavaScript/TypeScript support.

Key Features

  • 🔒 Type-safe - Full TypeScript support with comprehensive type definitions
  • 🎯 Developer-friendly - Intuitive API design with excellent IDE support
  • 📦 Dual module support - Works with both ESM and CommonJS
  • Validation - Built-in request/response validation using Zod
  • 🚀 Modern - Supports Node.js 18+ and modern JavaScript runtimes
  • 📚 Well-documented - Comprehensive documentation and examples
  • 🤖 AI-ready - Includes LLM.txt for AI model integration and automation

Table of Contents

Installation

Install the SDK using your preferred package manager:

# npm
npm install @devma/qloo

# yarn
yarn add @devma/qloo

# pnpm
pnpm add @devma/qloo

Quick Start

import { Qloo } from '@devma/qloo';

// Initialize the SDK
const qloo = new Qloo({
  apiKey: 'your-api-key-here'
});

// Get insights for restaurants in New York
const insights = await qloo.insights.getInsights({
  filterType: 'urn:entity:place',
  filterLocationQuery: 'New York City',
  take: 10
});

console.log(insights.results?.entities);

Authentication

The Qloo SDK uses API key authentication. You can obtain your API key from the Qloo Dashboard.

import { Qloo } from '@devma/qloo';

const qloo = new Qloo({
  apiKey: process.env.QLOO_API_KEY // Store your API key in environment variables
});

Server Configuration

The SDK supports different server environments for development, testing, and production use:

Available Environments

  • Staging: https://staging.api.qloo.com - Development and testing
  • Hackathon: https://hackathon.api.qloo.com - Special hackathon environment (default)

Configuration Examples

import { Qloo } from '@devma/qloo';

// Production (default)
const qloo = new Qloo({
  apiKey: 'your-api-key'
});

// Staging environment
const qlooStaging = new Qloo({
  serverURL: 'https://staging.api.qloo.com',
  apiKey: 'your-staging-api-key'
});

// Hackathon environment
const qlooHackathon = new Qloo({
  serverURL: 'https://hackathon.api.qloo.com',
  apiKey: 'your-hackathon-api-key'
});

// Using configuration object
const config = {
  Qloo: {
    url: 'https://hackathon.api.qloo.com',
    apikey: 'your-hackathon-api-key'
  }
};

const qloo = new Qloo({
  serverURL: config.Qloo.url,
  apiKey: config.Qloo.apikey,
});

Note: This SDK was originally created for the Qloo hackathon to provide a more developer-friendly interface to the Qloo API. The hackathon environment provides special features and endpoints for hackathon participants.

Available Operations

Insights API

  • getInsights() - Generate taste-based insights and recommendations

Audiences API

  • getAudiences() - Retrieve audience data
  • getAudienceTypes() - Get available audience types

Tags API

  • getTags() - Search for tags
  • getTagTypes() - Get available tag types

Examples

Restaurant Recommendations

import { Qloo } from '@devma/qloo';

const qloo = new Qloo({ apiKey: 'your-api-key' });

// Get Italian restaurants in Manhattan
const restaurants = await qloo.insights.getInsights({
  filterType: 'urn:entity:place',
  filterLocationQuery: 'Manhattan',
  filterTags: 'urn:tag:genre:restaurant:Italian',
  take: 5
});

Movie Recommendations

// Get movie recommendations based on interests
const movies = await qloo.insights.getInsights({
  filterType: 'urn:entity:movie',
  signalInterestsEntities: ['entity-id-1', 'entity-id-2'],
  filterReleaseYearMin: 2020,
  take: 10
});

Audience-Based Insights

// Get insights for a specific audience
const audienceInsights = await qloo.insights.getInsights({
  filterType: 'urn:entity:place',
  signalDemographicsAudiences: ['urn:audience:millennials'],
  signalLocationQuery: 'Los Angeles',
  take: 15
});

Error Handling

The SDK provides comprehensive error handling:

import { QlooError } from '@devma/qloo';

try {
  const insights = await qloo.insights.getInsights({
    filterType: 'urn:entity:place',
    // ... other parameters
  });
} catch (error) {
  if (error instanceof QlooError) {
    console.error('Qloo API Error:', error.message);
    console.error('Status Code:', error.statusCode);
  } else {
    console.error('Unexpected error:', error);
  }
}

AI Integration

This package includes LLM.txt - a comprehensive guide designed specifically for AI models and LLM agents. This file contains:

  • Core Concepts: Understanding Qloo's signal+filter model
  • Entity Types: Places, movies, artists, podcasts, books, brands, people
  • API Usage: Complete examples for all endpoints
  • Best Practices: Optimized patterns for AI integration
  • Quick Reference: Tables and structured data for rapid lookup

AI developers and LLM agents can use this file to quickly understand and integrate with the Qloo API without additional context.

Development

Prerequisites

  • Node.js 18.0.0 or higher
  • npm, yarn, or pnpm

Building the SDK

# Install dependencies
npm install

# Build the project
npm run build

# Run linting
npm run lint

# Run type checking
npm run typecheck

Running Examples

Check the examples/ directory for complete usage examples:

cd examples
npm install
npm run example

Contributing

We welcome contributions! Please see our Contributing Guide for details.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Make your changes
  4. Add tests for your changes
  5. Ensure all tests pass (npm test)
  6. Commit your changes (git commit -m 'Add some amazing feature')
  7. Push to the branch (git push origin feature/amazing-feature)
  8. Open a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.

Support


Made with ❤️ by the Qloo community