Skip to main content

API Clients

Glean offers official API clients for several popular programming languages to help developers integrate Glean's powerful search and knowledge capabilities into their applications. These clients provide language-specific interfaces to Glean's APIs, making it easier to build custom solutions without having to handle the low-level HTTP requests.

info

Authentication Required: You'll need API tokens to use these libraries. Get Client API tokens for search and chat features, or Indexing API tokens for document management.

tip

Unified Libraries: These API clients support both Client API and Indexing API functionality. Use the same library with different tokens depending on whether you're building user-facing features (Client API) or managing document indexing (Indexing API).

Choose Your Language

Select your preferred programming language to get started with the official Glean API client:

What's Included

All official API clients provide:

Client API Features

  • Chat API: Build conversational AI applications
  • Search API: Integrate enterprise search capabilities
  • Agents API: Execute pre-built agents from Agent Builder
  • Collections API: Manage and search document collections

Indexing API Features

  • Document Management: Index, update, and delete documents
  • User Management: Manage users, groups, and permissions
  • Datasource Configuration: Set up and configure data sources
  • Bulk Operations: Efficient batch processing for large datasets

Developer Experience

  • Type Safety: Full type definitions and IntelliSense support
  • Error Handling: Structured error responses and retry mechanisms
  • Framework Integration: Examples for popular web frameworks
  • Testing Support: Mock examples and integration test patterns
  • Documentation: Comprehensive guides with real-world examples

Production Ready

  • Rate Limiting: Automatic handling with exponential backoff
  • Timeout Control: Configurable request timeouts
  • Connection Pooling: Efficient HTTP connection management
  • Security: Best practices for token management

Getting Started

  1. Choose your language from the cards above
  2. Follow the installation instructions for your package manager
  3. Get your credentials:
  4. Start building with the provided examples

Alternative Integration Options

If you prefer not to use an API client library:

Need Help?