{"id":20262911,"url":"https://github.com/swapnilsoni1999/16personalities-api","last_synced_at":"2025-07-19T07:07:58.486Z","repository":{"id":229318935,"uuid":"733703738","full_name":"SwapnilSoni1999/16personalities-api","owner":"SwapnilSoni1999","description":"🌟 Unofficial API of 16personalities.com","archived":false,"fork":false,"pushed_at":"2025-03-11T16:18:49.000Z","size":154,"stargazers_count":36,"open_issues_count":4,"forks_count":13,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-11T02:07:11.292Z","etag":null,"topics":["16personalities","api","javascript","restful-api"],"latest_commit_sha":null,"homepage":"https://16personalities-api.com","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/SwapnilSoni1999.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":"2023-12-19T23:50:09.000Z","updated_at":"2025-04-09T11:07:19.000Z","dependencies_parsed_at":"2024-05-06T19:57:06.970Z","dependency_job_id":"4d856a4b-b0b3-4562-bf55-96b8d0a803d1","html_url":"https://github.com/SwapnilSoni1999/16personalities-api","commit_stats":null,"previous_names":["swapnilsoni1999/16personalities-api"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SwapnilSoni1999%2F16personalities-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SwapnilSoni1999%2F16personalities-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SwapnilSoni1999%2F16personalities-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SwapnilSoni1999%2F16personalities-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SwapnilSoni1999","download_url":"https://codeload.github.com/SwapnilSoni1999/16personalities-api/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248328167,"owners_count":21085261,"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":["16personalities","api","javascript","restful-api"],"created_at":"2024-11-14T11:32:30.022Z","updated_at":"2025-04-11T02:07:15.450Z","avatar_url":"https://github.com/SwapnilSoni1999.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 16Personalities API (Unofficial)\n\nThis is an unofficial API for the official [16Personalities](https://16personalities.com) website. It allows you to get information about the personality types, such as the type's name, description, and more.\n\n## How to use\n\n\u003c!-- There are 2 API endpoints --\u003e\n\n1. **Get All Questions**\n\n```http\nGET https://16personalities-api.com/api/personality/questions\n```\n\nThis endpoint returns all the questions that are used to determine the personality type.\nuse the `options` array's value as the answer.\n\n\u003c!-- table: value: answer --\u003e\n\n| Answer Text                | Value |\n| :------------------------- | :---- |\n| Disagree strongly          | -3    |\n| Disagree moderately        | -2    |\n| Disagree a little          | -1    |\n| Neither agree nor disagree | 0     |\n| Agree a little             | 1     |\n| Agree moderately           | 2     |\n| Agree strongly             | 3     |\n\n2. **Get Personality Type**\n\n```http\nPOST https://16personalities-api.com/api/personality\n\n{\n  \"answers\": [\n    {\n      \"id\": \"WW91IHJlZ3VsYXJseSBtYWtlIG5ldyBmcmllbmRzLg\",\n      \"value\": 3\n    },\n    {\n      \"id\": \"...\",\n      \"value\": 1\n    }\n  ],\n  \"gender\": \"Male\"\n}\n\n```\n\nThe `gender` field can be `Male`, `Female`, or `Other`.\n\n\u003cbr/\u003e\n\u003c!-- Sample response --\u003e\n\nThe response will look like this:\n\n```json\n{\n  \"niceName\": \"Virtuoso\",\n  \"fullCode\": \"ISTP-A\",\n  \"avatarSrc\": \"https://www.16personalities.com/static/animations/avatars/all/virtuoso-male.json\",\n  \"avatarAlt\": \"ISTP avatar\",\n  \"avatarSrcStatic\": \"https://www.16personalities.com/static/images/personality-types/avatars/istp-virtuoso-male.svg?v=3\",\n  \"snippet\": \"Virtuosos are innovative and practical experimenters, masters of all kinds of tools.\",\n  \"scales\": [\"Energy\", \"Mind\", \"Nature\", \"Tactics\", \"Identity\"],\n  \"traits\": [\n    {\n      \"key\": \"introverted\",\n      \"label\": \"Energy\",\n      \"color\": \"blue\",\n      \"score\": 32,\n      \"pct\": 66,\n      \"trait\": \"Introverted\",\n      \"link\": \"https://www.16personalities.com/articles/energy-introverted-vs-extraverted\",\n      \"reverse\": false,\n      \"titles\": [null],\n      \"description\": \"Introverted individuals tend to prefer fewer, yet deep and meaningful, social interactions and often feel drawn to calmer environments.\",\n      \"snippet\": \"You likely prefer fewer, yet deep and meaningful, social interactions and feel drawn to calmer environments.\",\n      \"imageAlt\": \"A scene showing a man sitting by a tree and listening to music.\",\n      \"imageSrc\": \"https://www.16personalities.com/static/images/theory/traits/16personalities_trait_introverted.svg\"\n    },\n    {\n      \"key\": \"observant\",\n      \"label\": \"Mind\",\n      \"color\": \"yellow\",\n      \"score\": 37,\n      \"pct\": 69,\n      \"trait\": \"Observant\",\n      \"reverse\": false,\n      \"link\": \"https://www.16personalities.com/articles/mind-intuitive-vs-observant\",\n      \"titles\": [null],\n      \"description\": \"Observant individuals are pragmatic and down-to-earth. They tend to have a strong focus on what is happening or very likely to happen.\",\n      \"snippet\": \"You’re likely pragmatic and down-to-earth, with a strong focus on what is happening or very likely to happen.\",\n      \"imageAlt\": \"A scene showing a couple discussing a house purchase.\",\n      \"imageSrc\": \"https://www.16personalities.com/static/images/theory/traits/16personalities_trait_observant.svg\"\n    },\n    {\n      \"key\": \"thinking\",\n      \"label\": \"Nature\",\n      \"color\": \"green\",\n      \"score\": 35,\n      \"pct\": 68,\n      \"trait\": \"Thinking\",\n      \"reverse\": true,\n      \"link\": \"https://www.16personalities.com/articles/nature-thinking-vs-feeling\",\n      \"titles\": [null],\n      \"description\": \"Thinking individuals focus on objectivity and rationality, often dismissing emotions in favor of logic. They tend to see effectiveness as more important than social harmony.\",\n      \"snippet\": \"You likely focus on objectivity and rationality, putting effectiveness above social harmony.\",\n      \"imageAlt\": \"A scene showing a girl and a guy, with the guy introducing himself and the girl analyzing his behavior, with a thought bubble full of checkboxes floating above her head.\",\n      \"imageSrc\": \"https://www.16personalities.com/static/images/theory/traits/16personalities_trait_thinking.svg\"\n    },\n    {\n      \"key\": \"prospecting\",\n      \"label\": \"Tactics\",\n      \"color\": \"purple\",\n      \"score\": 22,\n      \"pct\": 61,\n      \"trait\": \"Prospecting\",\n      \"link\": \"https://www.16personalities.com/articles/tactics-judging-vs-prospecting\",\n      \"titles\": [null],\n      \"reverse\": false,\n      \"description\": \"Prospecting individuals are very good at improvising and adapting to opportunities. They tend to be flexible nonconformists who value novelty above stability.\",\n      \"snippet\": \"You’re likely very good at improvising and adapting. You tend to be flexible and value novelty above stability.\",\n      \"imageAlt\": \"A scene showing a couple buying a bunch of items that are on sale.\",\n      \"imageSrc\": \"https://www.16personalities.com/static/images/theory/traits/16personalities_trait_prospecting.svg\"\n    },\n    {\n      \"key\": \"assertive\",\n      \"label\": \"Identity\",\n      \"color\": \"red\",\n      \"score\": 38,\n      \"pct\": 69,\n      \"trait\": \"Assertive\",\n      \"link\": \"https://www.16personalities.com/articles/identity-assertive-vs-turbulent\",\n      \"titles\": [null],\n      \"reverse\": true,\n      \"description\": \"Assertive individuals are self-assured, even-tempered, and resistant to stress. They refuse to worry too much and tend to be self-confident when striving to achieve goals.\",\n      \"snippet\": \"You’re likely self-assured, even-tempered, and resistant to stress, refusing to worry too much.\",\n      \"imageAlt\": \"A scene showing a relaxed office worker paying no attention to their manager who is walking up to them.\",\n      \"imageSrc\": \"https://www.16personalities.com/static/images/theory/traits/16personalities_trait_assertive.svg\"\n    }\n  ]\n}\n```\n\n# How to self deploy/run\n\n1. Clone the repository\n\n```bash\ngit clone https://github.com/SwapnilSoni1999/16personalities-api.git\n```\n\n2. Install the dependencies\n\n```bash\npnpm install\n```\n\n3. Take reference from `.env.example` and create a `.env.dev` for development and `.env.prod` for production.\n\n4. Build\n\n```bash\npnpm run build\n```\n\n5. Start the server\n\nfor production\n\n```bash\npnpm run start\n```\n\nfor development\n\n```bash\npnpm run dev\n```\n\n## Note\n\n- For Developers and Users:\n\nThis project is not affiliated with 16Personalities in any way. It is an unofficial API. The data is fetched from the official website. The API may break if the website changes its structure. If you find any issues, please open an issue.\n\n- For Official 16Personalities:\n\nIf you are from 16Personalities and want this project to be taken down, please contact me on my email. (You can find it on my GitHub profile)\n\n### Thanks\n\n- [16Personalities](https://16personalities.com) for the data.\n- [tux](https://github.com/tuxdotrs) - For providing proxy server for the API.\n\n### License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fswapnilsoni1999%2F16personalities-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fswapnilsoni1999%2F16personalities-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fswapnilsoni1999%2F16personalities-api/lists"}