random user api

api result
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
{
"results": [
{
"gender": "male",
"name": {
"title": "Mr",
"first": "Alexis",
"last": "Petit"
},
"location": {
"street": {
"number": 4670,
"name": "Rue Abel-Gance"
},
"city": "Asnières-sur-Seine",
"state": "Côtes-D'Armor",
"country": "France",
"postcode": 50669,
"coordinates": {
"latitude": "1.5987",
"longitude": "-174.3996"
},
"timezone": {
"offset": "-3:30",
"description": "Newfoundland"
}
},
"email": "alexis.petit@example.com",
"login": {
"uuid": "0c475137-052f-4e2d-accd-e1f81134085b",
"username": "smallswan940",
"password": "roland",
"salt": "axj95jYj",
"md5": "9cb8a280ee2ea2c270304e789cf41c4d",
"sha1": "ad06d250bb7e2e63c41180190fd1a0a87310bed9",
"sha256": "dcd4a79c08ce63b11e0e210488be6c13d6479c1857978272d22de05743c5a0c8"
},
"dob": {
"date": "1948-07-11T03:52:55.239Z",
"age": 72
},
"registered": {
"date": "2019-03-02T05:37:55.591Z",
"age": 1
},
"phone": "01-02-20-53-73",
"cell": "06-62-80-71-34",
"id": {
"name": "INSEE",
"value": "1NNaN99470953 54"
},
"picture": {
"large": "https://randomuser.me/api/portraits/men/52.jpg",
"medium": "https://randomuser.me/api/portraits/med/men/52.jpg",
"thumbnail": "https://randomuser.me/api/portraits/thumb/men/52.jpg"
},
"nat": "FR"
}
],
"info": {
"seed": "40708dc84b376baf",
"results": 1,
"page": 1,
"version": "1.3"
}
}

fetch 예제

example.js
1
2
3
fetch('https://randomuser.me/api')
.then((res) => res.json())
.then(console.log);

참고

Author

chinsung

Posted on

2020-11-23

Updated on

2021-08-04

Licensed under

댓글