{"id":18438708,"url":"https://github.com/sajari/sdk-node","last_synced_at":"2025-06-23T02:04:43.789Z","repository":{"id":40518991,"uuid":"125286300","full_name":"sajari/sdk-node","owner":"sajari","description":"Official repository of the Search.io SDK for Node.js","archived":false,"fork":false,"pushed_at":"2023-01-06T01:38:14.000Z","size":1362,"stargazers_count":8,"open_issues_count":2,"forks_count":2,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-07T21:40:52.385Z","etag":null,"topics":["api","nodejs","sdk","search"],"latest_commit_sha":null,"homepage":"https://www.search.io","language":"TypeScript","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/sajari.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-03-14T23:24:11.000Z","updated_at":"2022-05-04T07:35:40.000Z","dependencies_parsed_at":"2023-02-05T01:46:44.099Z","dependency_job_id":null,"html_url":"https://github.com/sajari/sdk-node","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/sajari/sdk-node","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sajari%2Fsdk-node","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sajari%2Fsdk-node/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sajari%2Fsdk-node/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sajari%2Fsdk-node/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sajari","download_url":"https://codeload.github.com/sajari/sdk-node/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sajari%2Fsdk-node/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261397349,"owners_count":23152484,"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":["api","nodejs","sdk","search"],"created_at":"2024-11-06T06:21:19.629Z","updated_at":"2025-06-23T02:04:38.779Z","avatar_url":"https://github.com/sajari.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Search.io SDK for Node\n\n[![Build status](https://github.com/sajari/sdk-node/workflows/Build/badge.svg?branch=master)](https://github.com/sajari/sdk-node/actions)\n\nThe official [Search.io](https://www.search.io) Node client library.\n\nSearch.io offers a search and discovery service with Neuralsearch®, the world's first instant AI search technology. Businesses of all sizes use Search.io to build site search and discovery solutions that maximize e-commerce revenue, optimize on-site customer experience, and scale their online presence.\n\n## Table of contents\n\n- [Quickstart](#quickstart)\n  - [Before you begin](#before-you-begin)\n  - [Install the SDK](#install-the-sdk)\n  - [Use the SDK](#use-the-sdk)\n- [Examples](#examples)\n- [Contributing](#contributing)\n- [License](#license)\n\n## Quickstart\n\n### Before you begin\n\n1. [Create a Search.io account](http://app.search.io)\n1. [Retrieve your account credentials](https://app.search.io/project/credentials)\n\n### Install the SDK\n\n```bash\nnpm install @sajari/sdk-node\n```\n\n### Use the SDK\n\nThe following example shows how to create a collection using the SDK.\n\n\u003e ⚠️ The function below cleans up after itself by deleting the collection immediately after creation.\n\n```javascript\n// Import the Search.io SDK.\nimport { CollectionsClient, withKeyCredentials } from \"@sajari/sdk-node\";\n\n// Create a client for working with collections from account key credentials.\nconst client = new CollectionsClient(\n  withKeyCredentials(\"account-key-id\", \"account-key-secret\")\n);\n\nasync function createCollection(id, displayName) {\n  // Create a new collection.\n  const collection = await client.createCollection({ id, displayName });\n  console.log(`Collection ${collection.displayName} created.`);\n\n  // Clean up. Remove this in your application to keep the collection.\n  await client.deleteCollection(collection.id);\n}\n\ncreateCollection(\"collection-id\", \"Collection display name\").catch(\n  console.error\n);\n```\n\n## Examples\n\nExamples are in the [examples](https://github.com/sajari/sdk-node/blob/master/examples) directory.\n\n| Example                      | Source code                                                                                            |\n| ---------------------------- | ------------------------------------------------------------------------------------------------------ |\n| Batch create schema fields   | [source code](https://github.com/sajari/sdk-node/blob/master/examples/batch-create-schema-fields.ts)   |\n| Batch upsert records         | [source code](https://github.com/sajari/sdk-node/blob/master/examples/batch-upsert-records.ts)         |\n| Create collection            | [source code](https://github.com/sajari/sdk-node/blob/master/examples/create-collection.ts)            |\n| Create pipeline              | [source code](https://github.com/sajari/sdk-node/blob/master/examples/create-pipeline.ts)              |\n| Create schema field          | [source code](https://github.com/sajari/sdk-node/blob/master/examples/create-schema-field.ts)          |\n| Delete collection            | [source code](https://github.com/sajari/sdk-node/blob/master/examples/delete-collection.ts)            |\n| Delete record                | [source code](https://github.com/sajari/sdk-node/blob/master/examples/delete-record.ts)                |\n| Generate pipelines           | [source code](https://github.com/sajari/sdk-node/blob/master/examples/generate-pipelines.ts)           |\n| Get collection               | [source code](https://github.com/sajari/sdk-node/blob/master/examples/get-collection.ts)               |\n| Get pipeline                 | [source code](https://github.com/sajari/sdk-node/blob/master/examples/get-pipeline.ts)                 |\n| Get record                   | [source code](https://github.com/sajari/sdk-node/blob/master/examples/get-record.ts)                   |\n| List collections             | [source code](https://github.com/sajari/sdk-node/blob/master/examples/list-collections.ts)             |\n| List pipelines               | [source code](https://github.com/sajari/sdk-node/blob/master/examples/list-pipelines.ts)               |\n| List schema fields           | [source code](https://github.com/sajari/sdk-node/blob/master/examples/list-schema-fields.ts)           |\n| Upsert record                | [source code](https://github.com/sajari/sdk-node/blob/master/examples/upsert-record.ts)                |\n| Query collection             | [source code](https://github.com/sajari/sdk-node/blob/master/examples/query-collection.ts)             |\n| Set default pipeline         | [source code](https://github.com/sajari/sdk-node/blob/master/examples/set-default-pipeline.ts)         |\n| Send event                   | [source code](https://github.com/sajari/sdk-node/blob/master/examples/send-event.ts)                   |\n| Get default pipeline         | [source code](https://github.com/sajari/sdk-node/blob/master/examples/get-default-pipeline.ts)         |\n| Set default pipeline version | [source code](https://github.com/sajari/sdk-node/blob/master/examples/set-default-pipeline-version.ts) |\n| Get default pipeline version | [source code](https://github.com/sajari/sdk-node/blob/master/examples/get-default-pipeline-version.ts) |\n\n## Contributing\n\nContributions are welcome. See the [Contributing](https://github.com/sajari/sdk-node/blob/master/CONTRIBUTING.md) guide.\n\n## License\n\nMIT\n\nSee [LICENSE](https://github.com/sajari/sdk-node/blob/master/LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsajari%2Fsdk-node","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsajari%2Fsdk-node","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsajari%2Fsdk-node/lists"}