{"info":{"_postman_id":"e2010052-c5fa-4e56-8054-7bea551f145c","name":"RANDUS.ORG API 2.0 (EN)","description":"<html><head></head><body><h2 id=\"welcome-to-randusorg-api-documentation-in-english\">Welcome to RANDUS.ORG API Documentation in English!</h2>\n<p>To start using our API, you need to register on our <a href=\"https://randus.org/\">website</a> and get an authorization token, which is specified in the header of each request in the following format: <code>Authorization: Bearer &lt;your token&gt;</code>. Please keep in mind that we provide API access according to our <a href=\"https://randus.org/price\">Pricing Plans</a>. Therefore, we ask you to familiarize yourself with our tariff plans and their capabilities. After registration, you automatically have access to a Free tariff plan. Below you can find the available API methods.</p>\n<h4 id=\"example-of-api-request-in-python\">Example of API Request in Python</h4>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>import requests\nheaders = {\"Authorization\": \"Bearer Token\"} # instead of a Token, your valid token received on the site during registration is specified\nrequests.get(\"https://randus.org/api/person\", headers=headers).json()\n</code></pre><h3 id=\"support\">Support</h3>\n<p>If you have any technical questions, you can open a ticket in your Personal Account on our website.</p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"8649158","collectionId":"e2010052-c5fa-4e56-8054-7bea551f145c","publishedId":"SztEYRxL","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"publishDate":"2020-05-30T20:46:06.000Z"},"item":[{"name":"Get user data","id":"c81be163-644a-4257-869c-a68e096008cc","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://randus.org/api/user","description":"<p>This method allows you to get information about your account, including data about your tariff plan and current limits. </p>\n<p>Please pay attention to the fields <code>expired_at</code>, <code>left_requests</code> and <code>bulk_limit</code>. <code>expired_at</code> — date when your plan expires, <code>left_requests</code> — number of remaining daily requests, <code>bulk_limit</code> — maximum value of the <code>count</code> parameter.</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"Your Token"}]},"isInherited":true,"source":{"_postman_id":"e2010052-c5fa-4e56-8054-7bea551f145c","id":"e2010052-c5fa-4e56-8054-7bea551f145c","name":"RANDUS.ORG API 2.0 (EN)","type":"collection"}},"urlObject":{"path":["api","user"],"host":["https://randus.org"],"query":[],"variable":[]}},"response":[],"_postman_id":"c81be163-644a-4257-869c-a68e096008cc"},{"name":"Get information about Random Person","id":"ca9a1431-25c9-40f3-85ad-07de36eda172","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://randus.org/api/person","description":"<p>This is the main method of our API. It returns a json response with generated data about a random person. Please note that the response contains the fields that are provided by your pricing plan. You can find the available fields for your tariff plan <a href=\"https://randus.org/price\">here</a>.</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"Your Token"}]},"isInherited":true,"source":{"_postman_id":"e2010052-c5fa-4e56-8054-7bea551f145c","id":"e2010052-c5fa-4e56-8054-7bea551f145c","name":"RANDUS.ORG API 2.0 (EN)","type":"collection"}},"urlObject":{"path":["api","person"],"host":["https://randus.org"],"query":[],"variable":[]}},"response":[],"_postman_id":"ca9a1431-25c9-40f3-85ad-07de36eda172"},{"name":"Select API language","id":"0a4ff16f-0b2e-49a3-a66f-cdca84dba4e2","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://randus.org/api/person?lang=lang_code","description":"<p>This parameter allows you to select the language of the generated data. All pricing plans have different lists of available languages. You can find this list <a href=\"https://randus.org/price\">here</a>.</p>\n<h6 id=\"available-language-codes\">Available language codes:</h6>\n<ul>\n<li>en — English</li>\n<li>ru — Russian</li>\n<li>uk — Ukrainian</li>\n</ul>\n<p><em>You can combine this parameter with others through the &amp; sign.</em></p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"Your Token"}]},"isInherited":true,"source":{"_postman_id":"e2010052-c5fa-4e56-8054-7bea551f145c","id":"e2010052-c5fa-4e56-8054-7bea551f145c","name":"RANDUS.ORG API 2.0 (EN)","type":"collection"}},"urlObject":{"path":["api","person"],"host":["https://randus.org"],"query":[{"key":"lang","value":"lang_code"}],"variable":[]}},"response":[],"_postman_id":"0a4ff16f-0b2e-49a3-a66f-cdca84dba4e2"},{"name":"Select specific fields","id":"0ea9aabf-ec70-485d-8eea-928f5d41a3e9","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://randus.org/api/person?fields=fields_list","description":"<p>You can select the fields that should be returned in the json response. You can view the names of available fields using a normal query without using parameters. You can enter the names of the required fields separated by commas. For example, request with the parameter <code>fields=name,gender</code> will return only the name and gender of a random person.</p>\n<p><em>You can combine this parameter with others through the &amp; sign.</em></p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"Your Token"}]},"isInherited":true,"source":{"_postman_id":"e2010052-c5fa-4e56-8054-7bea551f145c","id":"e2010052-c5fa-4e56-8054-7bea551f145c","name":"RANDUS.ORG API 2.0 (EN)","type":"collection"}},"urlObject":{"path":["api","person"],"host":["https://randus.org"],"query":[{"key":"fields","value":"fields_list"}],"variable":[]}},"response":[],"_postman_id":"0ea9aabf-ec70-485d-8eea-928f5d41a3e9"},{"name":"Generation of multiple personalities","id":"91900ff3-afe7-46a6-a495-f45e68c2577d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://randus.org/api/person?count=count_value","description":"<p>You can generate multiple personalities at once within a single request. The maximum value of this parameter is regulated by the parameter <code>bulk_limit</code>, the value of which can be found by the request described in the section «Get user data». Please note that <code>bulk_limit</code> is the maximum value of the <code>count</code> parameter, its valid value is actually determined by the length of the response from the API.</p>\n<p><em>You can combine this parameter with others through the &amp; sign.</em> </p>\n<p><strong>Note that this parameter doesn't work with the</strong> <code>fileds=neuralPhoto</code> <strong>parameter.</strong></p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"Your Token"}]},"isInherited":true,"source":{"_postman_id":"e2010052-c5fa-4e56-8054-7bea551f145c","id":"e2010052-c5fa-4e56-8054-7bea551f145c","name":"RANDUS.ORG API 2.0 (EN)","type":"collection"}},"urlObject":{"path":["api","person"],"host":["https://randus.org"],"query":[{"key":"count","value":"count_value"}],"variable":[]}},"response":[],"_postman_id":"91900ff3-afe7-46a6-a495-f45e68c2577d"},{"name":"Choose gender of Random Person","id":"a8e91e31-3727-4763-bbc4-9008b9d64c7c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://randus.org/api/person?gender=gender_code","description":"<p>This parameter allows you to select the specific gender of the generated random person.</p>\n<h6 id=\"available-gender-codes\">Available gender codes:</h6>\n<ul>\n<li>0 — male</li>\n<li>1 — female</li>\n</ul>\n<p><em>You can combine this parameter with others through the &amp; sign.</em> </p>\n<p><strong>Note that this parameter doesn't work with the</strong> <code>fileds=neuralPhoto</code> <strong>parameter.</strong></p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"Your Token"}]},"isInherited":true,"source":{"_postman_id":"e2010052-c5fa-4e56-8054-7bea551f145c","id":"e2010052-c5fa-4e56-8054-7bea551f145c","name":"RANDUS.ORG API 2.0 (EN)","type":"collection"}},"urlObject":{"path":["api","person"],"host":["https://randus.org"],"query":[{"key":"gender","value":"gender_code"}],"variable":[]}},"response":[],"_postman_id":"a8e91e31-3727-4763-bbc4-9008b9d64c7c"},{"name":"Photo from Neural Networks (β-test)","id":"b5063355-dd47-4562-b3fe-d3c855eea36e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://randus.org/api/person?fields=neuralPhoto","description":"<p>You can generate a photo of a random person using neural networks, if this option is provided by your tariff plan. You can check the possibility of using neural networks <a href=\"https://randus.org/price\">here</a>.</p>\n<p>This method returns a single photo of a person generated by the neural network in <code>base64</code> format. Below is an example of Python code that decodes binary data obtained using our API:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>import requests\nfrom PIL import Image\nfrom io import BytesIO\nfrom base64 import b64decode\nheaders = {\"Authorization\": \"Bearer Token\"} # instead of a Token, your valid token received on the site during registration is specified\ncontent = requests.get(\"https://randus.org/api/person?fields=neuralPhoto\", headers=headers).json()['result'][0]\nwith BytesIO(b64decode(content['neuralPhoto'])) as f:\n    with Image.open(f) as img:\n        img.save('test.jpg')\n\n</code></pre><p><em>You can use this parameter with other fields that are available in your pricing plan.</em></p>\n<p><strong>Note that this parameter doesn't work with the</strong> <code>count=count_value</code> <strong>and</strong> <code>gender=gender_code</code> <strong>parameters.</strong></p>\n<p><strong>This function is in the beta test, so it may be unstable.</strong></p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"Your Token"}]},"isInherited":true,"source":{"_postman_id":"e2010052-c5fa-4e56-8054-7bea551f145c","id":"e2010052-c5fa-4e56-8054-7bea551f145c","name":"RANDUS.ORG API 2.0 (EN)","type":"collection"}},"urlObject":{"path":["api","person"],"host":["https://randus.org"],"query":[{"key":"fields","value":"neuralPhoto"}],"variable":[]}},"response":[],"_postman_id":"b5063355-dd47-4562-b3fe-d3c855eea36e"},{"name":"Combined requests","id":"1cc21b57-535f-40fa-af04-4bc90fd84fc9","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://randus.org/api/person?lang=lang_code&gender=gender_code&fields=fields_list&count=count_value","description":"<p>Here is an example of a combined request. You can use different combinations of parameters if they are compatible.</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"Your Token"}]},"isInherited":true,"source":{"_postman_id":"e2010052-c5fa-4e56-8054-7bea551f145c","id":"e2010052-c5fa-4e56-8054-7bea551f145c","name":"RANDUS.ORG API 2.0 (EN)","type":"collection"}},"urlObject":{"path":["api","person"],"host":["https://randus.org"],"query":[{"key":"lang","value":"lang_code"},{"key":"gender","value":"gender_code"},{"key":"fields","value":"fields_list"},{"key":"count","value":"count_value"}],"variable":[]}},"response":[],"_postman_id":"1cc21b57-535f-40fa-af04-4bc90fd84fc9"}],"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"Your Token"}]}},"event":[{"listen":"prerequest","script":{"id":"d6812552-0718-4b38-b4ba-6204a1000989","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"6e7fda06-6ae4-4793-b727-3916b7447282","type":"text/javascript","exec":[""]}}],"variable":[{"key":"token","value":"Your Token"},{"key":"site","value":"https://randus.org"},{"key":"lang_code","value":"lang_code"},{"key":"fields","value":"fields_list"},{"key":"count","value":"count_value"},{"key":"gender","value":"gender_code"}]}