{"id":46787330,"url":"https://github.com/5e-bits/5e-srd-api","last_synced_at":"2026-03-10T02:02:27.121Z","repository":{"id":37823668,"uuid":"76232302","full_name":"5e-bits/5e-srd-api","owner":"5e-bits","description":"REST API to access D\u0026D 5th Edition SRD database","archived":false,"fork":false,"pushed_at":"2026-03-02T19:56:43.000Z","size":12107,"stargazers_count":590,"open_issues_count":13,"forks_count":184,"subscribers_count":18,"default_branch":"main","last_synced_at":"2026-03-02T22:13:57.441Z","etag":null,"topics":["5e-srd-api","hacktoberfest"],"latest_commit_sha":null,"homepage":"","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/5e-bits.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":["5e-bits"],"patreon":null,"open_collective":null,"ko_fi":"bagelbits","tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2016-12-12T07:25:38.000Z","updated_at":"2026-03-02T18:36:02.000Z","dependencies_parsed_at":"2023-02-18T03:01:29.681Z","dependency_job_id":"2e78265d-1080-4d9c-8652-428d7ba3dae0","html_url":"https://github.com/5e-bits/5e-srd-api","commit_stats":null,"previous_names":[],"tags_count":112,"template":false,"template_full_name":null,"purl":"pkg:github/5e-bits/5e-srd-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/5e-bits%2F5e-srd-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/5e-bits%2F5e-srd-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/5e-bits%2F5e-srd-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/5e-bits%2F5e-srd-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/5e-bits","download_url":"https://codeload.github.com/5e-bits/5e-srd-api/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/5e-bits%2F5e-srd-api/sbom","scorecard":{"id":5133,"data":{"date":"2025-08-11","repo":{"name":"github.com/5e-bits/5e-srd-api","commit":"b5ed5490a9d6a285ff5704975a5b8aaf0d30f468"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":5.9,"checks":[{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":-1,"reason":"Found no human activity in the last 30 changesets","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":10,"reason":"30 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: jobLevel 'contents' permission set to 'write': .github/workflows/ci.yml:77","Info: jobLevel 'contents' permission set to 'read': .github/workflows/ci.yml:116","Warn: no topLevel permission defined: .github/workflows/ci.yml:1","Warn: no topLevel permission defined: .github/workflows/codeql-analysis.yml:1","Warn: no topLevel permission defined: .github/workflows/lint-pr.yml:1"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE.md:0","Info: FSF or OSI recognized license: MIT License: LICENSE.md:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Pinned-Dependencies","score":5,"reason":"dependency not pinned by hash detected -- score normalized to 5","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:38: update your workflow using https://app.stepsecurity.io/secureworkflow/5e-bits/5e-srd-api/codeql-analysis.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:42: update your workflow using https://app.stepsecurity.io/secureworkflow/5e-bits/5e-srd-api/codeql-analysis.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:53: update your workflow using https://app.stepsecurity.io/secureworkflow/5e-bits/5e-srd-api/codeql-analysis.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:67: update your workflow using https://app.stepsecurity.io/secureworkflow/5e-bits/5e-srd-api/codeql-analysis.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/lint-pr.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/5e-bits/5e-srd-api/lint-pr.yml/main?enable=pin","Warn: containerImage not pinned by hash: Dockerfile:2","Warn: containerImage not pinned by hash: Dockerfile:24: pin your Docker image by updating node:22-alpine to node:22-alpine@sha256:1b2479dd35a99687d6638f5976fd235e26c5b37e8122f786fcd5fe231d63de5b","Warn: downloadThenRun not pinned by hash: .github/workflows/ci.yml:60","Warn: npmCommand not pinned by hash: .github/workflows/ci.yml:28","Warn: npmCommand not pinned by hash: .github/workflows/ci.yml:43","Info:   9 out of  13 GitHub-owned GitHubAction dependencies pinned","Info:   5 out of   6 third-party GitHubAction dependencies pinned","Info:   0 out of   2 containerImage dependencies pinned","Info:   2 out of   4 npmCommand dependencies pinned","Info:   0 out of   1 downloadThenRun dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":0,"reason":"Project has not signed or included provenance with any releases.","details":["Warn: release artifact v4.2.1 not signed: https://api.github.com/repos/5e-bits/5e-srd-api/releases/226980582","Warn: release artifact v4.2.0 not signed: https://api.github.com/repos/5e-bits/5e-srd-api/releases/225280653","Warn: release artifact v4.1.1 not signed: https://api.github.com/repos/5e-bits/5e-srd-api/releases/224682735","Warn: release artifact v4.1.0 not signed: https://api.github.com/repos/5e-bits/5e-srd-api/releases/224673048","Warn: release artifact v4.0.3 not signed: https://api.github.com/repos/5e-bits/5e-srd-api/releases/223280940","Warn: release artifact v4.2.1 does not have provenance: https://api.github.com/repos/5e-bits/5e-srd-api/releases/226980582","Warn: release artifact v4.2.0 does not have provenance: https://api.github.com/repos/5e-bits/5e-srd-api/releases/225280653","Warn: release artifact v4.1.1 does not have provenance: https://api.github.com/repos/5e-bits/5e-srd-api/releases/224682735","Warn: release artifact v4.1.0 does not have provenance: https://api.github.com/repos/5e-bits/5e-srd-api/releases/224673048","Warn: release artifact v4.0.3 does not have provenance: https://api.github.com/repos/5e-bits/5e-srd-api/releases/223280940"],"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":4,"reason":"branch protection is not maximal on development and all release branches","details":["Info: 'allow deletion' disabled on branch 'main'","Info: 'force pushes' disabled on branch 'main'","Warn: 'branch protection settings apply to administrators' is disabled on branch 'main'","Warn: 'stale review dismissal' is disabled on branch 'main'","Warn: required approving review count is 1 on branch 'main'","Info: codeowner review is required on branch 'main'","Warn: 'last push approval' is disabled on branch 'main'","Warn: 'up-to-date branches' is disabled on branch 'main'","Info: status check found to merge onto on branch 'main'","Info: PRs are required in order to make changes on branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Packaging","score":10,"reason":"packaging workflow detected","details":["Info: Project packages its releases by way of GitHub Actions.: .github/workflows/ci.yml:107"],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"SAST","score":10,"reason":"SAST tool is run on all commits","details":["Info: SAST configuration detected: CodeQL","Info: all commits (30) are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":9,"reason":"1 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-xffm-g5w8-qvg7"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-14T13:22:59.640Z","repository_id":37823668,"created_at":"2025-08-14T13:22:59.640Z","updated_at":"2025-08-14T13:22:59.640Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30322635,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-10T01:36:58.598Z","status":"online","status_checked_at":"2026-03-10T02:00:06.579Z","response_time":106,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["5e-srd-api","hacktoberfest"],"created_at":"2026-03-10T02:02:24.946Z","updated_at":"2026-03-10T02:02:27.107Z","avatar_url":"https://github.com/5e-bits.png","language":"TypeScript","funding_links":["https://github.com/sponsors/5e-bits","https://ko-fi.com/bagelbits"],"categories":["TypeScript"],"sub_categories":[],"readme":"# 5e-srd-api\n\n[![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/5e-bits/5e-srd-api/ci.yml?style=flat\u0026logo=github\u0026logoColor=white)](https://github.com/5e-bits/5e-srd-api/actions/workflows/ci.yml)\n[![Discord](https://img.shields.io/discord/656547667601653787?style=flat\u0026logo=discord\u0026logoColor=white)](https://discord.gg/TQuYTv7)\n![Uptime](https://img.shields.io/endpoint?url=https%3A%2F%2Fraw.githubusercontent.com%2F5e-bits%2Fdnd-uptime%2Fmain%2Fapi%2Fwebsite%2Fresponse-time.json)\n![Uptime](https://img.shields.io/endpoint?url=https%3A%2F%2Fraw.githubusercontent.com%2F5e-bits%2Fdnd-uptime%2Fmain%2Fapi%2Fwebsite%2Fuptime.json)\n\nREST API to access [D\u0026amp;D 5th Edition SRD API](https://www.dnd5eapi.co/)\n\nTalk to us [on Discord!](https://discord.gg/TQuYTv7)\n\n## How to Run\n\nMake sure you have the latest version of the database:\n\n```shell\ndocker compose pull\n```\n\nThen run it with docker-compose:\n\n```shell\ndocker compose up --build\n```\n\n### M1/M2/M3 Macs\n\nThe command above pulls the latest image of the database from ghcr.io, which only targets the amd64 platform. If you are running on a different platform (like a Mac with Apple Silicon), you will need to build the image yourself. See the [5e-database](https://github.com/5e-bits/5e-database#how-to-run) repo for additional details.\n\n```shell\ncd ../\ngit clone https://github.com/5e-bits/5e-database.git\n```\n\nThen back over here in the 5e-srd-api repo, in the file `docker-compose.yml`, you can replace the line `image: bagelbits/5e-database` with `build: ../5e-database` (or whatever you named the custom db image).\n\n## Making API Requests\n\nMake API requests by using the root address:\n`http://localhost:3000/api/2014`\n\nYou should get a response with the available endpoints for the root:\n\n```json\n{\n  \"ability-scores\": \"/api/2014/ability-scores\",\n  \"classes\": \"/api/2014/classes\",\n  \"conditions\": \"/api/2014/conditions\",\n  \"damage-types\": \"/api/2014/damage-types\",\n  \"equipment-categories\": \"/api/2014/equipment-categories\",\n  \"equipment\": \"/api/2014/equipment\",\n  \"features\": \"/api/2014/features\",\n  \"languages\": \"/api/2014/languages\",\n  \"magic-schools\": \"/api/2014/magic-schools\",\n  \"monsters\": \"/api/2014/monsters\",\n  \"proficiencies\": \"/api/2014/proficiencies\",\n  \"races\": \"/api/2014/races\",\n  \"skills\": \"/api/2014/skills\",\n  \"spells\": \"/api/2014/spells\",\n  \"subclasses\": \"/api/2014/subclasses\",\n  \"subraces\": \"/api/2014/subraces\",\n  \"traits\": \"/api/2014/traits\",\n  \"weapon-properties\": \"/api/2014/weapon-properties\"\n}\n```\n\n### Versioning\n\nThe API is versioned by release years of the SRD. Currently only `/api/2014` is available. The next version will be `/api/2024`.\n\n## Working with a local image of 5e Database\n\nIf you are working on a feature which requires changes to both this repo, _and_ the 5e-database repo, it is useful to know how to connect the former to the latter for testing purposes. A simple process for doing so is as follows:\n\n1. In the file `docker-compose.yml`, you can replace the line `image: bagelbits/5e-database` with `build: [relativePathToDatabaseRepo]`. Make sure not to commit this change, as it is intended for local testing only.\n\n2. Run your branch of 5e-srd-api using the method outlined in the above section of this readme file. So long as there are no transient errors, the API should build successfully, and your changes to both repos should be noticeable.\n\n## Working with image resources from s3\n\nThe API uses s3 to store image files for monsters. The image files live in a bucket called `dnd-5e-api-images` under the `/monsters` folder.\n\nTo test locally, you can [use `localstack` to mock s3](https://docs.localstack.cloud/user-guide/aws/s3/). To do so, you will first need to install `localstack`,\n`awscli`, and `awslocal`. You can then run the following commands to configure and start the localstack container:\n\n```shell\nexport AWS_CONFIG_ENV=localstack_dev\nlocalstack start\nawslocal s3api create-bucket --bucket dnd-5e-api-images\nawslocal s3 cp aboleth.png s3://dnd-5e-api-images/monsters/\nnpm run dev\n```\n\nRequest the image by navigating to an image URL in a browser, or via HTTP request:\n\n```shell\ncurl http://localhost:3000/api/2014/monsters/aboleth.png --output downloaded-aboleth.png\n```\n\nWhen interacting with the image you should see logs in the terminal where you started localstack. You can also use [localstack's webui](https://app.localstack.cloud/dashboard) to view the bucket and\ncontents.\n\n## Data Issues\n\nIf you see anything wrong with the data itself, please open an issue or PR over [here.](https://github.com/5e-bits/5e-database/)\n\n## Running Tests\n\n### Unit Tests\n\nYou can run unit tests locally by using the command: `npm run test:unit`\n\n### Integration Tests\n\nIntegration tests need to be ran in the API docker container for them to function properly.\nIn order to run integration tests locally you can use the command: `npm run test:integration:local`\n\n## Documentation\n\nPublic facing API documentation lives [here.](https://www.dnd5eapi.co/docs)\n\nThe [docs repository](https://github.com/5e-bits/docs) contains the source for the public facing API documentation. It uses\n[Docusaurus](https://docusaurus.io/) to generate the site from a bundled OpenAPI spec.\n\nMore details on working with the OpenAPI spec can be found in the [`src/swagger`](src/swagger/) directory's [README](src/swagger/README.md). The most up-to-date bundled OpenAPI specs themselves are included in [the latest release](https://github.com/5e-bits/5e-srd-api/releases/latest) in both [JSON](https://github.com/5e-bits/5e-srd-api/releases/latest/download/openapi.json) and [YAML](https://github.com/5e-bits/5e-srd-api/releases/latest/download/openapi.yml) formats, which can be used to generate your own documentation, clients, etc.\n\nA [Postman collection](https://github.com/5e-bits/5e-srd-api/releases/latest/download/collection.postman.json) can also be found in the latest release. This can be imported into [the Postman HTTP client](https://www.postman.com/) to execute test requests against production \u0026 local deployments of the API.\n\n## Contributing\n\n- Fork this repository\n- Create a new branch for your work\n- Push up any changes to your branch, and open a pull request. Don't feel it needs to be perfect — incomplete work is totally fine. We'd love to help get it ready for merging.\n\n## Code of Conduct\n\nThe Code of Conduct for this repo can be found [here.](https://github.com/5e-bits/5e-srd-api/wiki#code-of-conduct)\n\n## Contributors\n\n\u003ca href=\"https://github.com/5e-bits/5e-srd-api/graphs/contributors\"\u003e\n  \u003cimg src=\"https://contrib.rocks/image?repo=5e-bits/5e-srd-api\" /\u003e\n\u003c/a\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F5e-bits%2F5e-srd-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F5e-bits%2F5e-srd-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F5e-bits%2F5e-srd-api/lists"}