{"id":13496052,"url":"https://github.com/seven1m/bible_api","last_synced_at":"2025-05-15T09:06:02.837Z","repository":{"id":18373316,"uuid":"21553848","full_name":"seven1m/bible_api","owner":"seven1m","description":"Ruby web app that serves JSON API for open and public domain bibles","archived":false,"fork":false,"pushed_at":"2025-04-02T12:57:59.000Z","size":3204,"stargazers_count":649,"open_issues_count":10,"forks_count":117,"subscribers_count":27,"default_branch":"master","last_synced_at":"2025-05-06T06:56:43.490Z","etag":null,"topics":["bible","bible-api","json","ruby"],"latest_commit_sha":null,"homepage":"https://bible-api.com","language":"Ruby","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/seven1m.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2014-07-07T02:40:38.000Z","updated_at":"2025-05-03T23:52:30.000Z","dependencies_parsed_at":"2025-01-02T02:43:07.206Z","dependency_job_id":"e0358fe4-6673-4307-8d72-711d22f8cbf1","html_url":"https://github.com/seven1m/bible_api","commit_stats":{"total_commits":130,"total_committers":7,"mean_commits":"18.571428571428573","dds":0.2384615384615385,"last_synced_commit":"935df32bc07129644cffa7e387f921f699251253"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seven1m%2Fbible_api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seven1m%2Fbible_api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seven1m%2Fbible_api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seven1m%2Fbible_api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/seven1m","download_url":"https://codeload.github.com/seven1m/bible_api/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254310513,"owners_count":22049468,"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":["bible","bible-api","json","ruby"],"created_at":"2024-07-31T19:01:41.550Z","updated_at":"2025-05-15T09:06:02.806Z","avatar_url":"https://github.com/seven1m.png","language":"Ruby","readme":"# bible\\_api\n\nThis is a Ruby web app that serves a JSON API for public domain and open bible translations.\n\n## Using It\n\nThis app is served from [bible-api.com](https://bible-api.com/), which anyone can use.\n\n### With Curl and JQ\n\n```sh\n→ curl -s https://bible-api.com/John+3:16 | jq\n{\n  \"reference\": \"John 3:16\",\n  \"verses\": [\n    {\n      \"book_id\": \"JHN\",\n      \"book_name\": \"John\",\n      \"chapter\": 3,\n      \"verse\": 16,\n      \"text\": \"\\nFor God so loved the world, that he gave his one and only Son, that whoever believes in him should not perish, but have eternal life.\\n\\n\"\n    }\n  ],\n  \"text\": \"\\nFor God so loved the world, that he gave his one and only Son, that whoever believes in him should not perish, but have eternal life.\\n\\n\",\n  \"translation_id\": \"web\",\n  \"translation_name\": \"World English Bible\",\n  \"translation_note\": \"Public Domain\"\n}\n```\n\n### With Ruby\n\n```sh\n→ ruby -r open-uri -r json -r pp -e \"pp JSON.parse(URI.open('https://bible-api.com/John+3:16').read)\"\n{\"reference\"=\u003e\"John 3:16\",\n \"verses\"=\u003e\n  [{\"book_id\"=\u003e\"JHN\",\n    \"book_name\"=\u003e\"John\",\n    \"chapter\"=\u003e3,\n    \"verse\"=\u003e16,\n    \"text\"=\u003e\n     \"\\n\" +\n     \"For God so loved the world, that he gave his one and only Son, that whoever believes in him should not perish, but have eternal life.\\n\" +\n     \"\\n\"}],\n \"text\"=\u003e\n  \"\\n\" +\n  \"For God so loved the world, that he gave his one and only Son, that whoever believes in him should not perish, but have eternal life.\\n\" +\n  \"\\n\",\n \"translation_id\"=\u003e\"web\",\n \"translation_name\"=\u003e\"World English Bible\",\n \"translation_note\"=\u003e\"Public Domain\"}\n```\n\n## Hosting it Yourself\n\nIf you want to host this application yourself, you'll need a Linux server with Ruby, Redis, and MySQL (or MariaDB) installed. Follow the steps below:\n\n1. Clone the repo:\n\n   ```\n   git clone https://github.com/seven1m/bible_api\n   cd bible_api\n   git submodule update --init\n   ```\n\n2. Install the dependencies:\n\n   ```\n   gem install bundler\n   bundle config --local deployment true # optional, but prefered on a server\n   bundle install\n   ```\n\n3. Create the database and import the translations:\n\n   ```\n   mysql -uroot -e \"create database bible_api; grant all on bible_api.* to user@localhost identified by 'password';\"\n   export DATABASE_URL=\"mysql2://user:password@localhost/bible_api\"\n   export REDIS_URL=\"redis://localhost:6379\"\n   bundle exec ruby import.rb\n   ```\n\n4. Host the app with [Passenger](https://www.phusionpassenger.com/docs/advanced_guides/install_and_upgrade/standalone/install/)\n\n   ... or run `bundle exec ruby app.rb` if you are just testing.\n\n## Copyright\n\nCopyright [Tim Morgan](https://timmorgan.org). Licensed under The MIT License (MIT). See LICENSE for more info.\n","funding_links":[],"categories":["Ruby","ruby"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseven1m%2Fbible_api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fseven1m%2Fbible_api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseven1m%2Fbible_api/lists"}