{"id":14384653,"url":"https://github.com/rse/tika-server","last_synced_at":"2025-07-12T11:12:57.643Z","repository":{"id":32421726,"uuid":"133129258","full_name":"rse/tika-server","owner":"rse","description":"Apache Tika Server as a Background Service in Node.js","archived":false,"fork":false,"pushed_at":"2025-07-10T19:27:43.000Z","size":89,"stargazers_count":19,"open_issues_count":0,"forks_count":5,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-07-11T22:41:40.014Z","etag":null,"topics":["apache","background","process","server","service","tika"],"latest_commit_sha":null,"homepage":"http://npmjs.com/tika-server","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rse.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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-05-12T08:47:08.000Z","updated_at":"2025-07-10T19:27:45.000Z","dependencies_parsed_at":"2024-01-14T20:17:24.966Z","dependency_job_id":"cd1b7f82-6c87-467b-a6b8-1cb4d98e56ab","html_url":"https://github.com/rse/tika-server","commit_stats":{"total_commits":83,"total_committers":2,"mean_commits":41.5,"dds":"0.012048192771084376","last_synced_commit":"f0344bf59609b46b99dc77bd561902ffbdc3024e"},"previous_names":[],"tags_count":43,"template":false,"template_full_name":null,"purl":"pkg:github/rse/tika-server","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rse%2Ftika-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rse%2Ftika-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rse%2Ftika-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rse%2Ftika-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rse","download_url":"https://codeload.github.com/rse/tika-server/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rse%2Ftika-server/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264979790,"owners_count":23692497,"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":["apache","background","process","server","service","tika"],"created_at":"2024-08-28T18:01:33.124Z","updated_at":"2025-07-12T11:12:57.401Z","avatar_url":"https://github.com/rse.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"\nTika-Server\n===========\n\nApache Tika Server as a Background Service in Node.js\n\n\u003cp/\u003e\n\u003cimg src=\"https://nodei.co/npm/tika-server.png?downloads=true\u0026stars=true\" alt=\"\"/\u003e\n\n\u003cp/\u003e\n\u003cimg src=\"https://david-dm.org/rse/tika-server.png\" alt=\"\"/\u003e\n\nAbout\n-----\n\nThis is a small JavaScript library for use in Node.js environments,\nproviding the possibility to run Apache Tika Server as a local\nbackground service and query it through a frontend JavaScript API.\n\nNOTICE\n------\n\nThe Apache Tika Server is written in [Java](https://java.com/)\nand hence this Node.js modules requires an installed `java`\nexecutable in the environment.\n\nInstallation\n------------\n\n```shell\n$ npm install tika-server\n```\n\nUsage\n-----\n\n```\nconst TikaServer = require(\"tika-server\")\n\n;(async () =\u003e {\n    const ts = new TikaServer()\n    ts.on(\"debug\", (msg) =\u003e {\n        console.log(`DEBUG: ${msg}`)\n    })\n    await ts.start()\n    await ts.queryText(\"foo\").then((data) =\u003e {\n        console.log(data)\n    })\n    await ts.stop()\n})().catch((err) =\u003e {\n    console.log(`ERROR: ${err}`)\n})\n```\n\nApplication Programming Interface\n---------------------------------\n\n```ts\ndeclare class TikaServer {\n    constructor(options?: {\n        javaBinary?: string   /* default: \"java\" */\n        javaOptions?: string  /* default: \"-server -Xms1G -Xmx1G\" */\n        tikaBinary?: string   /* default: \"${__dirname}/tika-server-cli.jar\" */\n        tikaConfig?: string   /* default: \"${__dirname}/tika-server-cli.xml\" */\n        tikaOptions?: string  /* default: \"--log info\" */\n        tikaHost?: string     /* default: \"127.0.0.1\" */\n        tikaPortMin?: number  /* default: 41000 */\n        tikaPortMax?: number  /* default: 42000 */\n    })\n\n    public on(\n        event: string,\n        callback: (event: any) =\u003e void\n    ): void\n\n    public start(\n    ): Promise\u003cvoid\u003e\n\n    public query(\n        content: any,\n        options?: {\n            endpoint?: string  /* default: \"tika\" */\n            type?: string      /* default: \"application/octet-stream\" */\n            accept?: string    /* default: \"text/xml\" */\n            response?: string  /* default: \"blob\" */\n            filename?: string  /* default: \"\" */\n        }\n    ): Promise\u003cany\u003e\n\n    public queryMeta(\n        content: any,\n        options?: {\n            type?: string      /* default: \"application/octet-stream\" */\n            filename?: string  /* default: \"\" */\n        }\n    ): Promise\u003cobject\u003e\n\n    public queryText(\n        content: any,\n        options?: {\n            type?: string      /* default: \"application/octet-stream\" */\n            filename?: string  /* default: \"\" */\n        }\n    ): Promise\u003cstring\u003e\n\n    public stop(\n    ): Promise\u003cvoid\u003e\n}\n```\n\nMotivation\n----------\n\nThe major differences of [tika-server](http://npmjs.com/tika-server)\nto similar NPM modules and the motivation for the existence of\n[tika-server](http://npmjs.com/tika-server) are:\n\n1. [tika-server](http://npmjs.com/tika-server), in contrast to the [tika](http://npmjs.com/tika) module,\n   does not depend on the native [java](http://npmjs.com/java) module.\n   Instead, it just requires the `java` executable to be available.\n\n2. [tika-server](http://npmjs.com/tika-server), in contrast to the [tika](http://npmjs.com/tika) module,\n   does not spawn Apache Tika for every query.\n   Instead, it uses a continuously running Apache Tika Server in a background process.\n\n3. [tika-server](http://npmjs.com/tika-server), in contrast to the [tika](http://npmjs.com/tika) module,\n   does not ship with an old Tika JAR.\n   Instead, it automatically downloads and uses a more recent one.\n\n4. [tika-server](http://npmjs.com/tika-server), in contrast to the [tika-server-client](http://npmjs.com/tika-server-client) module,\n   does not need a pre-installed Apache Tika Server.\n   Instead, it automatically starts and stops a local instance of it in the background.\n\n5. [tika-server](http://npmjs.com/tika-server), in contrast to the [tika-text-extract](http://npmjs.com/tika-text-extract) module,\n   does not use the hard-coded (default) TCP/IP port 9998 for the background Apache Tika Server process.\n   Instead, it automatically determines and uses a free TCP/IP port on localhost.\n\nLicense\n-------\n\nCopyright \u0026copy; 2018-2025 Dr. Ralf S. Engelschall (http://engelschall.com/)\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n\"Software\"), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be included\nin all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frse%2Ftika-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frse%2Ftika-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frse%2Ftika-server/lists"}