{"id":27293528,"url":"https://github.com/pheyvaer/searchbee","last_synced_at":"2025-04-11T22:44:18.166Z","repository":{"id":38007030,"uuid":"251557719","full_name":"pheyvaer/searchbee","owner":"pheyvaer","description":"Search API based on top of knowledge graphs","archived":false,"fork":false,"pushed_at":"2023-03-04T09:43:44.000Z","size":881,"stargazers_count":8,"open_issues_count":9,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-11T22:44:12.327Z","etag":null,"topics":["api","knowledge-graph","linked-data","search"],"latest_commit_sha":null,"homepage":"","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/pheyvaer.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2020-03-31T09:29:56.000Z","updated_at":"2024-04-29T16:55:17.000Z","dependencies_parsed_at":"2023-01-31T15:15:58.620Z","dependency_job_id":null,"html_url":"https://github.com/pheyvaer/searchbee","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pheyvaer%2Fsearchbee","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pheyvaer%2Fsearchbee/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pheyvaer%2Fsearchbee/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pheyvaer%2Fsearchbee/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pheyvaer","download_url":"https://codeload.github.com/pheyvaer/searchbee/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248492968,"owners_count":21113159,"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","knowledge-graph","linked-data","search"],"created_at":"2025-04-11T22:44:16.432Z","updated_at":"2025-04-11T22:44:18.145Z","avatar_url":"https://github.com/pheyvaer.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# :honeybee: Searchbee\n\nThis library and command line interface (CLI) start a server that \noffers a search API on top of knowledge graphs.\n\nA lot of knowledge graph are hosted on the Web\nwhere IRIs are used to uniquely identify resources.\nIn certain use cases when looking for the IRI of a specific resource \nusers want to search for it\nbased on its label or description.\nThis library and CLI offer such a search functionality on top of these knowledge graphs.\nIt starts a server that accepts a single GET request with the searched term.\n\n## Usage\n\n1. Install Searchbee via `npm -g i searchbee`.\n2. Either start a server or generate an index.\n\n### Start server\n\n1. Execute Searchbee via `searchbee server -s [sources]` \nwhere `sources` is a comma-separated list of sources, \nsuch as TPF servers, RDF files, and SPARQL endpoints.\n2. Search for the resources via `curl http://localhost:8080/?q=[term]`\nwhere `term` is the search term.\nThe output is a JSON array with the IRIs of the matched resources.\n\nThe search index is by default build based on the triples with predicate\n`http://www.w3.org/2000/01/rdf-schema#label`.\nThis is overwritten through the option `-l, --label`.\nThe search index considers by default all resources that are found.\nThis is overwritten through the option `--resources`.\nIn this case the index only considers the resources that match the sources.\nFor example, if your sources are `http://example.org/A` and `http://example.org/B`,\nthen the index is built only with triples about these two resources.\nEven if the sources return for example triples about `http://example.org/C`.\n\n#### Example\n\n1. `searchbee server -s https://ruben.verborgh.org/profile/#me`\n   starts a server based on the data at `https://ruben.verborgh.org/profile/#me`.\n2. `curl http://localhost:8080/?q=ruben`\n   searches for resources mentioning \"ruben\".\n   \n### Generate index\n\nBy generating an index before staring the server \nallows you to reuse the index when restarting the server.\nThis removes the need to create the index every time you start the server,\nwhich might be time-consuming for big sources.\n\n1. Execute Searchbee via `searchbee index -s [sources] -f [path]` \nwhere `sources` is a comma-separated list of sources, \nsuch as TPF servers, RDF files, and SPARQL endpoints, and\n`path` points to the file that stores the index.\n\n2. Execute Searchbee via `searchbee server -f [path]` \n   where `path` points to the file that stores the index.\n   \n#### Example\n\n1. `searchbee index -s https://ruben.verborgh.org/profile/#me -f index.json`\n  generates an index based on the data at `https://ruben.verborgh.org/profile/#me`\n  and stores in the file `index.json`.\n2. `searchbee server -f index.json`\n  starts a server based on the index in `index.json`.\n   \n## Development\n\n1. Install dependencies via `npm i`.\n2. Make changes.\n3. Execute Searchbee via `node ./bin/cli.js`.\n\n## Documentation\n\nWe use [Vale](https://errata-ai.gitbook.io/vale/) to lint the documentation.\n\n1. Install [Vale](https://errata-ai.gitbook.io/vale/getting-started/installation).\n2. Execute `npm run lint:docs` to lint the documentation.\n\n## License\n\n© 2020 [Pieter Heyvaert](https://pieterheyvaert.com), \n[MIT License](https://github.com/pheyvaer/searchbee/blob/master/LICENSE.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpheyvaer%2Fsearchbee","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpheyvaer%2Fsearchbee","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpheyvaer%2Fsearchbee/lists"}