{"id":13731936,"url":"https://github.com/artpi/roam-research-private-api","last_synced_at":"2025-04-09T18:16:39.909Z","repository":{"id":45558676,"uuid":"289935296","full_name":"artpi/roam-research-private-api","owner":"artpi","description":"Private API to enable API access for Roam Research. Now you can connect Roam to your other projects.","archived":false,"fork":false,"pushed_at":"2023-01-08T13:39:28.000Z","size":158,"stargazers_count":167,"open_issues_count":16,"forks_count":33,"subscribers_count":14,"default_branch":"master","last_synced_at":"2025-03-26T13:43:19.135Z","etag":null,"topics":["api-wrapper","chrome","puppeteer","roam","roam-research","roamcult"],"latest_commit_sha":null,"homepage":"https://piszek.com/roam/roam-api/","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/artpi.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}},"created_at":"2020-08-24T13:26:13.000Z","updated_at":"2025-03-19T14:42:48.000Z","dependencies_parsed_at":"2023-02-08T05:55:13.036Z","dependency_job_id":null,"html_url":"https://github.com/artpi/roam-research-private-api","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/artpi%2Froam-research-private-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/artpi%2Froam-research-private-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/artpi%2Froam-research-private-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/artpi%2Froam-research-private-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/artpi","download_url":"https://codeload.github.com/artpi/roam-research-private-api/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247445671,"owners_count":20939958,"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-wrapper","chrome","puppeteer","roam","roam-research","roamcult"],"created_at":"2024-08-03T02:01:41.904Z","updated_at":"2025-04-09T18:16:39.886Z","avatar_url":"https://github.com/artpi.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"## Roam Private API\n\nThis project exposes command line tool (`roam-api`) and a `node` library to connect Roam Research to your other software. You can use it in bash scripts, Github actions, or as a dependency of your project.\n## How does it work?\n\nIt looks like Roam is not providing a REST API any time soon. If you want to bridge Roam with your other software, you can do so from within Roam (with JavaScript), but that has limited number of use cases.\nWithout a REST API, this project launches an invisible browser and performs automated actions, just as you would manually. No need to install chrome, this library comes with one. It uses your login and password, so **this won't work if you are using Google login**.\nIt wraps around import/export functionality and actions exposed via `roamAlphaApi`.\n## Command line tool `roam-api`\n\nThis package exposes a `roam-api` tool in your system. You can use it to automate Roam and bridge other systems with your Roam graph.\n\n### Installation:\nThis entire library is build on node, so you need `node v12` and `npm v6` in your system. You can install the package the following way:\n```\nnpm i -g roam-research-private-api\n```\n\nNow you can use a variety of commands. All command take the following arguments, which you can also set as environmental variables:\n- `-g`, `--graph` or env variable `ROAM_API_GRAPH` - this is your graph name\n- `-e`, `--email` or env variable `ROAM_API_EMAIL` - email to log into your Roam\n- `-p`, `--password` or env variable `ROAM_API_PASSWORD` - password to your Roam.\n\n#### `roam-api export` will export your Roam graph to a directory of your choice. \n\nThis example will export the graph to your desktop. It will appear as \"db.json\".\n```\nroam-api export ~/Desktop\n```\n\nIt can also push the new version of the graph to an URL of your choosing. That way, you can upload the graph to some other system or use it with Zapier and similar tools.\n```\nroam-api export ~/Desktop http://secret.url?token=secret_token.\n```\n\n#### `roam-api search` will search your Roam graph for a phrase:\n\n```\nroam-api search \"potatoes\"\n```\n\nResult will be JSON array of objects `{ blockUid, pageTitle, string }`\n\n#### `roam-api-query` will let you do a full Datalog query.\n\nThis will find all block uids in your database which have the content \"Import\".\n```\nroam-api query '[:find ?uid :where [?b :block/string \"Import\"] [?b :block/uid ?uid]]'\n```\n\nCheck out [this fantastic article](https://www.zsolt.blog/2021/01/Roam-Data-Structure-Query.html) to know more about the Roam data structure.\n\n#### `roam-api create` create a block under specified uid. If no uid is provided, it will be inserted into your daily page:\n\n```\nroam-api create \"This will be prepended to my daily page\"\n```\n\n## Library to use in your project.\n\nAs mentioned, this is also a library that you can use within your project. Here are examples on how to do so:\n\n- [All the functionality in the roam-api tool](https://github.com/artpi/roam-research-private-api/blob/master/examples/cmd.js)\n- [Sync your Roam graph to Evernote](https://github.com/artpi/roam-research-private-api/blob/master/examples/sync_evernote.js) - you can also use command-line utility `roam-evernote-sync`.\n- [Import arbitrary data into any note](https://github.com/artpi/roam-research-private-api/blob/master/examples/import-data.js)\n- [Send note to Roam using the Quick Capture feature](https://github.com/artpi/roam-research-private-api/blob/master/examples/quick_capture.js)\n\n###\n\nPull requests welcome and I take no responsibility in case this messes up your Roam Graph :).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fartpi%2Froam-research-private-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fartpi%2Froam-research-private-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fartpi%2Froam-research-private-api/lists"}