A
A
API
Search…
Get

Retrieve a list of our categories

Demo

URL Find your token on - yumpu.com Token
Run request
1
Copied!
curl
PHP
JavaScript
Java
Example:
1
curl -X GET -H "X-ACCESS-TOKEN: YOUR_ACCESS_TOKEN" "http://api.yumpu.com/2.0/document/categories.json"
Copied!
Example:
1
require_once('../yumpu.php');
2
$yumpu = new Yumpu();
3
$categories = $yumpu->getCategories();
4
print_r($categories);
Copied!
Example:
1
var yumpu = require('yumpu');
2
yumpu.setToken('yourToken');
3
yumpu.getDocumentCategories(function(statusCode, document){
4
console.log('Status: ' + statusCode);
5
console.log(document);
6
});
Copied!
Example:
1
Yumpu y = new Yumpu("your access token");
2
System.out.println(y.getCategories());
Copied!
Whatever language you are using, the result will be the same.
1
{
2
"total": 22,
3
"categories": [
4
{
5
"id": 0,
6
"name": "None"
7
},
8
{
9
"id": 1,
10
"name": "Auto & Vehicles"
11
},
12
{
13
"id": 2,
14
"name": "Business & Marketing"
15
},
16
{
17
"id": 18,
18
"name": "Cooking, Food & Wine"
19
},
20
{
21
"id": 3,
22
"name": "Creative"
23
},
24
{
25
"id": 23,
26
"name": "Fashion"
27
},
28
{
29
"id": 4,
30
"name": "Film & Music"
31
},
32
{
33
"id": 5,
34
"name": "Fun & Entertainment"
35
},
36
{
37
"id": 19,
38
"name": "Health & Beauty"
39
},
40
{
41
"id": 6,
42
"name": "Hobby & Home"
43
},
44
{
45
"id": 20,
46
"name": "Home & Garden"
47
},
48
{
49
"id": 21,
50
"name": "Humor & Fun"
51
},
52
{
53
"id": 7,
54
"name": "Knowledge & Resources"
55
},
56
{
57
"id": 8,
58
"name": "Nature & Animals"
59
},
60
{
61
"id": 9,
62
"name": "News & Politics"
63
},
64
{
65
"id": 10,
66
"name": "Nonprofits & Activism"
67
},
68
{
69
"id": 11,
70
"name": "Religion & Philosophy"
71
},
72
{
73
"id": 22,
74
"name": "Shopping & Lifestyle"
75
},
76
{
77
"id": 12,
78
"name": "Sports"
79
},
80
{
81
"id": 13,
82
"name": "Technology & Internet"
83
},
84
{
85
"id": 14,
86
"name": "Travel & Events"
87
},
88
{
89
"id": 15,
90
"name": "Weird & Bizarre"
91
}
92
],
93
"state": "success",
94
"completed_in": 0.0141
95
}
Copied!
Last modified 1yr ago