algoliasearch-client-javascript

algoliaMIT活跃维护

Algolia 官方 JavaScript API 客户端,让前端和 Node.js 项目快速接入 Algolia 搜索服务,实现索引管理与毫秒级检索。

⚡️ A fully-featured and blazing-fast JavaScript API client to interact with Algolia.

5.63.0发布于 2026-11-09 17:36 UTC1,385star227fork同步于 2026-11-10 05:54 UTC

怎么上手

从 README 代码块原样提取,可能是其中一种安装方式
yarn add [email protected]
npm install [email protected]
pnpm add [email protected]
硬件要求

README 没有说明硬件要求。

下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

这个项目的说明还在生成中,先参考下面「最近发版」和 README。

最近发版

5 个版本5.63.0
  1. 5.63.0最新正式版2026-11-09 · 2026-11-09 17:36 UTC

    New version released!

    What's Changed

    • e6933da012 fix(specs): clarify maxHitsPerQuery is a per-page limit (#7210) by @kai687
    • 0a3cbbb29b feat(specs): add per-feed params to Composition run request (#7199) by @ben-kalmus
    • 8456d9eb14 feat(specs): support algoliaDefined ordering in external sources (#7212) by @aiordache
    • 575c3ab5c6 fix(ci): move macOS jobs off the retired macos-14 runner label (#7224) by @Fluf22
    • 3e85edd42f docs(specs): describe the analytics no click rate per query (#7225) by @leonardogavaudan

    Full Changelog: https://github.com/algolia/algoliasearch-client-javascript/compare/5.61.0...5.63.0

    → Browse the Algolia documentation

  2. 5.61.02026-10-29 · 2026-10-29 09:21 UTC
    查看更新说明

    New version released!

    What's Changed

    • c2153f09a5 fix(specs): remove obsolete index-key copy note (#7177) by @xroche
    • 8b2ad07687 chore(deps): dependencies 2026-10-12 (#7135) by @algolia-api-clients-automation-bot[bot]
    • 479b0cc1c9 fix(javascript): mask API key in ApiError stack trace (#7182) by @bblair31
    • 75e309924e clients(clients): cache host state only on change (#7202) by @zigzagdev
    • e7642ce951 feat(specs): add user metrics to abtesting-v3 timeseries enum (#7181) by @stevenMevans

    Full Changelog: https://github.com/algolia/algoliasearch-client-javascript/compare/5.60.0...5.61.0

    → Browse the Algolia documentation

  3. 5.60.02026-10-13 · 2026-10-13 06:30 UTC
    查看更新说明

    New version released!

    What's Changed

    BREAKING CHANGES: this minor version includes breaking changes (A/B Testing V3 API, Agent Studio API). See below for more details.

    • 812a3d1db6 chore(deps): dependencies 2026-09-14 (#7030) by @algolia-api-clients-automation-bot[bot]
    • 41ed59956a fix(specs): clarify when _extra and _injectedItemKey are present on hits (#7031) by @charlottetaylor-oss
    • 987444f36d fix(specs): clarify addItemKey description in injectedItem metadata (#7029) by @charlottetaylor-oss
    • f6a0478eec docs(specs): update analytics catalog entitlement example (#7028) by @cdhawke
    • 5da059b7ae feat(specs): add A/B test settings endpoints to abtesting-v3 (#6786) by @stevenMevans
    • f89fe94db5 fix(clients): send request bodies with Content-Length instead of chunked encoding (#7069) by @Fluf22
    • 461575c4a4 feat(specs): add A/B testing hypothesis (#6829) by @leonardogavaudan
    • b58c40832b fix(specs): BREAKING CHANGE - make AB test pValue optional (#7066) by @stevenMevans
      • pValue is now optional in the A/B test models. Update code that reads it as a required value.
    • 4cab83c8b1 feat(specs): add externalProvider source for CompAPI client (#7073) by @ClaraMuller
    • b6cd822bfb feat(specs): add resultCard to renderingContent widgets (#7084) by @FabienMotte
    • 63c591d078 refactor(specs): extract source object from behaviour object (#7074) by @ClaraMuller
    • 07c1b2ea15 fix(specs): BREAKING CHANGE – sync agent-studio OpenAPI from conversational-ai (#6967) by @algolia-api-clients-automation-bot[bot]
      • The Agent Studio specs were updated to match the API behaviour, which may require updating your implementation:
      • createAgentCompletion: the body type changed from AgentCompletionRequest to AgentCompletionRequestUnion.
      • createAgent, updateAgent, getAgent: tool config models were renamed or merged (AlgoliaDisplayResultsToolConfig is now AlgoliaGroupedResultsToolConfig, AlgoliaRecommendToolConfigInput/Output are now AlgoliaRecommendToolConfig, ToolConfig is now ToolConfigOrBooleanUnion).
      • The memory request models MessagesUnionAgentConsolidateRequest, MessagesUnionAgentMemorizeRequest and MessagesUnionAgentPonderRequest were removed.
    • a41727d2e1 chore(deps): dependencies 2026-09-21 ([#7068](https://github.com/algolia/api-clients-automation/pul
  4. 5.59.02026-09-09 · 2026-09-09 15:35 UTC
    查看更新说明

    New version released!

    What's Changed

    BREAKING CHANGES: this minor version includes breaking changes in the A/B Testing V3 API. See below for more details.

    • 120ed46971 chore(ci): enable yarn hardened mode and immutable installs (API-476) (#6915) by @MarioAlexandruDan
    • e4a6ab510a chore(ci): fail CI if a personal access token secret is referenced (#6919) by @eric-zaharia
    • 085364de00 feat(specs): deprecates /2 abtests endpoints (#6921) by @Niamsy
    • 32c1aaa192 chore(deps): dependencies 2026-08-24 (#6922) by @algolia-api-clients-automation-bot[bot]
    • 28aa13de2e fix(clients): support guzzlehttp/psr7 v3 (#6945) by @eric-zaharia
    • b4c4109163 fix(specs): flag analytics patterns endpoints with x-beta (#6954) by @cdhawke
    • 8317b3a8ef feat(specs): BREAKING CHANGE – remove migratedAbTestID from abtesting-v3 (#6883) by @cdhawke
    • 86409a3b15 feat(javascript): wait and retry on 429 with Retry-After (#6965) by @MarioAlexandruDan
    • 31395ba02e chore(deps): dependencies 2026-08-31 (#6959) by @algolia-api-clients-automation-bot[bot]

    Full Changelog: https://github.com/algolia/algoliasearch-client-javascript/compare/5.57.0...5.59.0

    → Browse the Algolia documentation

  5. 5.57.02026-08-18 · 2026-08-18 12:54 UTC
    查看更新说明

    New version released!

    What's Changed

    • 816ba11161 fix(javascript): add warning in replaceAllObjects for empty objects (#6608) by @eric-zaharia
    • 2d0d8f3252 feat(javascript): Request-ID and Correlation-ID support (#6747) by @eric-zaharia
    • 3bee6d1dee chore(ci): pin all GitHub Action refs to commit SHAs (API-475) (#6819) by @MarioAlexandruDan
    • 22af756864 chore(deps): dependencies 2026-07-20 (#6733) by @algolia-api-clients-automation-bot[bot]
    • 1f389d1f7f feat(specs): add agentic analytics support to insights spec (#6876) by @sirockin
    • 65cc642811 feat(specs): add decision (declared winner) to abtesting-v3 ABTest (#6732) by @cdhawke
    • adb99cc4d4 chore(javascript): raise abtesting bundle budget (#6884) by @leonardogavaudan
    • 637defc23a feat(specs): add analytics v3 pattern endpoints (#6795) by @Niamsy
    • bed536e149 chore(deps): dependencies 2026-08-10 (#6835) by @algolia-api-clients-automation-bot[bot]

    Full Changelog: https://github.com/algolia/algoliasearch-client-javascript/compare/5.56.0...5.57.0

    → Browse the Algolia documentation

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    README 原文

    未翻译

    ✨ Features

    • Thin & minimal low-level HTTP client to interact with Algolia's API
    • Works both on the browser and node.js
    • UMD and ESM compatible, you can use it with any module loader
    • Built with TypeScript

    💡 Getting Started

    To get started, you first need to install algoliasearch (or any other available API client package). All of our clients comes with type definition, and are available for both browser and node environments.

    With a package manager

    yarn add [email protected]
    # or
    npm install [email protected]
    # or
    pnpm add [email protected]
    

    Without a package manager

    Add the following JavaScript snippet to the of your website:

    // for the full client
    <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/algoliasearch.umd.js"></script>
    
    // for the lite client
    <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/lite/builds/browser.umd.js"></script>
    

    Usage

    You can now import the Algolia API client in your project and play with it.

    import { algoliasearch } from 'algoliasearch';
    
    const client = algoliasearch('YOUR_APP_ID', 'YOUR_API_KEY');
    
    // or with the lite client
    import { liteClient } from 'algoliasearch/lite';
    
    const client = liteClient('YOUR_APP_ID', 'YOUR_API_KEY');
    

    For full documentation, visit the Algolia JavaScript API Client.

    ❓ Troubleshooting

    Encountering an issue? Before reaching out to support, we recommend heading to our FAQ where you will find answers for the most common issues and gotchas with the client. You can also open a GitHub issue

    📄 License

    The Algolia JavaScript API Client is an open-sourced software licensed under the MIT license.