{"id":28666113,"url":"https://github.com/afosto/instant-search-client","last_synced_at":"2025-10-25T03:10:56.619Z","repository":{"id":42003750,"uuid":"439388446","full_name":"afosto/instant-search-client","owner":"afosto","description":"Afosto InstantSearch.js client","archived":false,"fork":false,"pushed_at":"2022-09-15T12:09:24.000Z","size":115,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-08-10T10:56:32.888Z","etag":null,"topics":["client","instantsearch","js","react"],"latest_commit_sha":null,"homepage":"https://afosto.com/apps/instant-search/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/afosto.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}},"created_at":"2021-12-17T16:06:55.000Z","updated_at":"2023-05-02T15:53:01.000Z","dependencies_parsed_at":"2022-08-12T02:01:05.557Z","dependency_job_id":null,"html_url":"https://github.com/afosto/instant-search-client","commit_stats":null,"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"purl":"pkg:github/afosto/instant-search-client","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/afosto%2Finstant-search-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/afosto%2Finstant-search-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/afosto%2Finstant-search-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/afosto%2Finstant-search-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/afosto","download_url":"https://codeload.github.com/afosto/instant-search-client/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/afosto%2Finstant-search-client/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259659667,"owners_count":22891672,"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":["client","instantsearch","js","react"],"created_at":"2025-06-13T14:11:18.830Z","updated_at":"2025-10-25T03:10:56.570Z","avatar_url":"https://github.com/afosto.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://afosto.com\"\u003e\u003cimg src=\"https://content.afosto.io/5719193282412544/brand/AFO-Logo-compleet-kleur-RGBat4x.png?w=268\" alt=\"Afosto\" /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003ch1 align=\"center\"\u003eAfosto Instant Search Client\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://www.npmjs.com/package/@afosto/instant-search-client\"\u003e\u003cimg src=\"https://img.shields.io/npm/v/@afosto/instant-search-client.svg\" alt=\"npm version\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/afosto/instant-search-client/blob/main/LICENSE\"\u003e\u003cimg src=\"https://img.shields.io/badge/license-MIT-informational\" alt=\"License\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp\u003e\nThis library is an Afosto search client plugin for the open-source \u003ca href=\"https://github.com/algolia/instantsearch.js\"\u003eInstantSearch.js\u003c/a\u003e library (powered by Algolia). With this plugin you can use the amazing widgets of the InstantSearch.js library, while communicating with the Afosto search API.\n\u003c/p\u003e\n\u003cbr /\u003e\n\u003cimg src=\"https://qcqcdn.com/afosto/instant_search_demo_page_7dd20c983c/instant_search_demo_page_7dd20c983c.gif\"\u003e\n\n\n\u003e Don't want to implement your own UI? You can also try our [Afosto instant search widget](https://github.com/afosto/instant-search-widget).\n\n\n## Installation\n\n### Basic\n\n```sh\n# Install with Yarn\nyarn add @afosto/instant-search-client instantsearch.js\n\n# Install with NPM\nnpm install @afosto/instant-search-client instantsearch.js\n```\n\n### React\n\n```sh\n# Install with Yarn\nyarn add @afosto/instant-search-client react-instantsearch-dom\n\n# Install with NPM\nnpm install @afosto/instant-search-client react-instantsearch-dom\n```\n\n\n### Browser\n\nThis library supports the **last two** versions of major browsers (Chrome, Edge, Firefox, Safari).\n\n```html\n\u003cscript src=\"https://cdn.jsdelivr.net/npm/@afosto/instant-search-client@latest/dist/afosto-instant-search.min.js\"\u003e\u003c/script\u003e\n\u003cscript src=\"https://cdn.jsdelivr.net/npm/instantsearch.js@4/dist/instantsearch.production.min.js\"\u003e\u003c/script\u003e\n```\n\n## Getting started\n\n\u003e To use the client you will need an Afosto search engine. Don't have one yet? Sign up on [Afosto.com](https://afosto.com/register/) and follow [the guides in our documentation](https://afosto.com/docs/apps/instant-search/).\n\nFirst you initialize the Afosto search client with your **search engine key**. This search engine key can be found in the [Afosto app](https://afosto.app/).\n\n### ES6\n\n```js\nimport { afostoInstantSearch } from '@afosto/instant-search-client';\n\nconst client = afostoInstantSearch('my-search-engine-key');\n```\n\n### CJS\n\n```js\nconst { afostoInstantSearch } = require('@afosto/instant-search-client');\n\nconst client = afostoInstantSearch('my-search-engine-key');\n```\n\n### Browser\n\n```js\nconst client = afostoInstantSearch('my-search-engine-key');\n```\n\n## Usage\n\n**Note:** This library is a client for **InstantSearch.js** it does not contain any UI components by itself. You can use it with the InstantSearch.js library as shown below:\n\n### Basic\n\n```js\nconst client = afostoInstantSearch('my-search-engine-key');\nconst search = instantsearch({\n  indexName: 'my-index',\n  searchClient: client,\n});\n\nsearch.start();\n```\n\nFor more information check the InstantSearch.js [documentation](https://www.algolia.com/doc/guides/building-search-ui/what-is-instantsearch/js/).\n\n### Basic with settings\n\n```js\nconst client = afostoInstantSearch('my-search-engine-key');\n\nasync function initSearch() {\n  const settings = await client.getSettings();\n  const [firstIndex] = settings.indexes || [];\n  \n  const search = instantsearch({\n    indexName: firstIndex.alias,\n    searchClient: client,\n  });\n  \n  // Do something with the settings.\n  // For example render filters dynamically.\n\n  search.start(); \n}\n\ninitSearch();\n```\n\n### React\n\nYou can use the initialized Afosto client with the [React InstantSearch](https://github.com/algolia/react-instantsearch) library.\n\n```js\nimport { afostoInstantSearch } from '@afosto/instant-search-client';\nimport { InstantSearch, SearchBox, Hits } from 'react-instantsearch-hooks-web';\n\nconst searchClient = afostoInstantSearch('my-search-engine-key');\n\nconst App = () =\u003e (\n  \u003cInstantSearch searchClient={searchClient} indexName=\"my-index\"\u003e\n    \u003cSearchBox /\u003e\n    \u003cHits /\u003e\n  \u003c/InstantSearch\u003e\n);\n```\n\nFor more information check the React InstantSearch [documentation](https://www.algolia.com/doc/guides/building-search-ui/what-is-instantsearch/react/).\n\n## Compatibility\n\n- InstantSearch.js v4\n- Node \u003e= 14\n\n## License\n\nThis project is licensed under the terms of the [MIT license](https://github.com/afosto/instant-search-client/blob/master/LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fafosto%2Finstant-search-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fafosto%2Finstant-search-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fafosto%2Finstant-search-client/lists"}