{"id":13808247,"url":"https://github.com/typesense/typesense-js","last_synced_at":"2025-05-15T14:05:31.249Z","repository":{"id":31423284,"uuid":"120157734","full_name":"typesense/typesense-js","owner":"typesense","description":"JavaScript / TypeScript client for Typesense","archived":false,"fork":false,"pushed_at":"2025-04-25T17:14:52.000Z","size":6789,"stargazers_count":454,"open_issues_count":25,"forks_count":78,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-04-25T18:29:10.839Z","etag":null,"topics":["javascript","search","typescript","typesense","typesense-js"],"latest_commit_sha":null,"homepage":"https://typesense.org/docs/api","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/typesense.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2018-02-04T05:27:03.000Z","updated_at":"2025-04-25T17:14:57.000Z","dependencies_parsed_at":"2023-01-14T19:01:04.259Z","dependency_job_id":"ca7f5e9c-8a69-491a-a4e1-336797aec6c6","html_url":"https://github.com/typesense/typesense-js","commit_stats":null,"previous_names":[],"tags_count":169,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/typesense%2Ftypesense-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/typesense%2Ftypesense-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/typesense%2Ftypesense-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/typesense%2Ftypesense-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/typesense","download_url":"https://codeload.github.com/typesense/typesense-js/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254355334,"owners_count":22057354,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["javascript","search","typescript","typesense","typesense-js"],"created_at":"2024-08-04T01:01:38.279Z","updated_at":"2025-05-15T14:05:31.185Z","avatar_url":"https://github.com/typesense.png","language":"JavaScript","readme":"# typesense-js [![NPM version][npm-image]][npm-url] ![downloads](https://img.shields.io/npm/dt/typesense?label=downloads)\n\nJavascript client library for accessing the [Typesense HTTP API](https://github.com/typesense/typesense).\n\nThis library can be used both on the server-side and on the client-side. The library's [source](/src) is in ES6 and during build time, we transpile it to ES5 and generate two artifacts - [one](/lib) that can be used on the server-side and [another](/dist) that uses [Browserify](http://browserify.org/) and can be used on the client side.\n\n## Installation\n\n#### Option 1: Install via npm\n\n```sh\nnpm install --save typesense\n```\n\nInstall peer dependencies:\n```sh\nnpm install --save @babel/runtime\n```\n\nNote: `@babel/runtime` is very a common dependency among many JS libraries. So instead of each library adding it as a dependency independently (which will cause multiple instances of `@babel/runtime` to be installed increasing bundle size), Babel's recommendation is that the libraries ask users to install it once as a direct dependency, so there's only one copy of `@babel/runtime` for the entire project. In some cases, your JS framework might already include `@babel/runtime` as a dependency.\n\n#### Option 2: Include the minified JS file for use in the browser directly\n\n```html\n\u003cscript src=\"dist/typesense.min.js\"\u003e\u003c/script\u003e\n```\n\nor via jsDelivr\n\n```html\n\u003cscript src=\"https://cdn.jsdelivr.net/npm/typesense@2/dist/typesense.min.js\"\u003e\u003c/script\u003e\n```\n\n## Usage\n\nRead the documentation here for detailed examples: [https://typesense.org/docs/api/](https://typesense.org/docs/api/)\n\nTests are also a good place to know how the library works internally: [test](test)\n\n**Note: When using this library in a browser, please be sure to use an API Key that only allows search operations instead of the `master` API key.** See [doc/examples/server/keys.js](doc/examples/server/keys.js) for an example of how to generate a search only API key.\n\nSee [Configuration.ts](src/Typesense/Configuration.ts) for a list of all client configuration options.\n\n### Examples\n\nHere are some examples with inline comments that walk you through how to use the client: [doc/examples](doc/examples)\n\nTo run the examples, from the repo root:\n\n```bash\nnpm run typesenseServer\nnode doc/examples/server/bulkImport.js\n```\n\n## GatsbyJS Integration\n\nIf you use [GatsbyJS](https://www.gatsbyjs.com/) for a framework, we have a plugin (that uses typesense-js behind the scenes) to automatically push your site data to Typesense when you build your site. Learn more [here](https://github.com/typesense/gatsby-plugin-typesense).\n\n## Firebase Integration\n\nIf you use [Firebase](https://firebase.google.com/), we have a Firebase extension (that uses typesense-js behind the scenes) to automatically push your Firestore data to Typesense. Learn more [here](https://github.com/typesense/firestore-typesense-search).\n\n## Building UI components\n\nCheckout the [Typesense-InstantSearch.js](https://github.com/typesense/typesense-instantsearch-adapter) (which uses typesense-js) for UI components you can use to quickly build powerful instant search experiences.\n\n## Compatibility\n\nThis table refers to server=\u003eclient compatibility. Newer versions of the client library maintain backwards compatibility with older versions of the server library.\n\n| Typesense Server | typesense-js |\n|------------------|--------------|\n| \\\u003e= v27.0.rc20   | \\\u003e= v2.0.0   |\n| \\\u003e= v0.26.0.rc38 | \\\u003e= v1.8.0   |\n| \\\u003e= v0.25.0      | \\\u003e= v1.7.0   |\n| \\\u003e= v0.24.0      | \\\u003e= v1.5.0   |\n| \\\u003e= v0.23.0      | \\\u003e= v1.3.0   |\n| \\\u003e= v0.21.0      | \\\u003e= v0.14.0  |\n| \\\u003e= v0.20.0      | \\\u003e= v0.12.0  |\n| \\\u003e= v0.19.0      | \\\u003e= v0.11.0  |\n| \\\u003e= v0.18.0      | \\\u003e= v0.10.0  |\n| \\\u003e= v0.17.0      | \\\u003e= v0.9.0   |\n| \\\u003e= v0.16.0      | \\\u003e= v0.8.0   |\n| \\\u003e= v0.15.0      | \\\u003e= v0.7.0   |\n| \\\u003e= v0.12.1      | \\\u003e= v0.5.0   |\n| \\\u003e= v0.12.0      | \\\u003e= v0.4.7   |\n| \u003c= v0.11         | \u003c= v0.3.0    |\n\n## Development\n\nAfter checking out the repo, run `npm install` to install dependencies. Then run `npm test` to run the linter and tests.\n\nTo release a new version, we use the [np](https://github.com/sindresorhus/np) package:\n\n```shell\n$ npm install --global np\n$ np\n\n# Follow instructions that np shows you\n\n```\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at [https://github.com/typesense/typesense-js](https://github.com/typesense/typesense-js).\n\n[npm-image]: https://badge.fury.io/js/typesense.svg\n[npm-url]: https://npmjs.org/package/typesense\n","funding_links":[],"categories":["TypeScript","JavaScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftypesense%2Ftypesense-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftypesense%2Ftypesense-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftypesense%2Ftypesense-js/lists"}