summaryrefslogtreecommitdiff
path: root/data/docs/11
blob: 5e5962c7d4ffec5c980905c1210cf60732f699a6 (plain)
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
:TITLE:Public Database API
:INC:index

:SUB:Introduction
<p>
 This document describes the public API of VNDB and is intended to be read by
  programmers. This API allows programs and websites to access (parts of) the
  VNDB database without actually visiting the website.
 <br /><br />
 In addition to this real-time API, we also provide some information in the
 form of <a href="/d14">database dumps</a>.
 <br /><br />
</p>

<b>Design goals</b>
<ul>
 <li>
  Simple in implementation of both client and server. "Simple" here means that
  it shouldn't take much code to write a secure and full implementation and that
  client applications shouldn't require huge dependency trees just to use this API.
 </li>
 <li>Powerful: Not as powerful as raw SQL, but not as rigid as commonly used REST or RPC protocols.</li>
 <li>High-level: common applications need to perform only few actions to get what they want.</li>
 <li>Fast: minimal bandwidth overhead and simple and customizable queries.</li>
</ul>
<br />

<b>Design overview</b>
<ul>
 <li>TCP-based, all communication between the client and the server is done
  using one TCP connection. This connection stays alive until it is explicitely
  closed by either the client or the server.</li>
 <li>Request/response, client sends a request and server replies with a response.</li>
 <li>Session-based: clients are required to login before issuing commands to
  the server. A session is created by issuing the 'login' command, this session
  stays valid for the lifetime of the TCP connection.</li>
 <li><b>Everything</b> sent between the client and the server is encoded in UTF-8.</li>
</ul>
<br />

<b>Limits</b>
<p>The following limits are enforced by the server, in order to limit the
server resources and prevent abuse of this service.</p>
<ul>
 <li>10 connections per IP. All connections that are opened after reaching this limit will be immediately closed.</li>
 <li>200 commands per 10 minutes per ip. Server will reply with a 'throttled' error (type="cmd") when reaching this limit.</li>
 <li>
  1 second of SQL time per minute per ip. SQL time is the total time taken to
  run the database queries for each command.  This depends on both the command
  (filters and get flags) and server load, and is thus not very predictable.
  Server will reply with a 'throttled' error with type="sql" upon reaching
  this limit.
 </li>
 <li>Each command returns at most 25 results, with the exception of get
   votelist/vnlist/wishlist, which returns at most 100 results.</li>
</ul>
<p>
 These limits may sound strict, but in practice you won't have to worry much
 about it. As long as your application properly waits when the server replies
 with a "throttle" error, everything will be handled automatically. In the event
 that your application does require more resources, don't hesitate to ask.
</p>


<br />
<b>Connection info:</b>
<dl>
 <dt>Host</dt><dd>api.vndb.org</dd>
 <dt>Port (plain tcp)</dt><dd>19534 ('VN')</dd>
 <dt>Port (TLS)</dt><dd>19535<br />For improved security, make sure to verify that the certificate is valid for 'api.vndb.org' and is signed by a trusted root (in particular, by <a href="https://letsencrypt.org/certificates/">Let's Encrypt</a>).</dd>
</dl>

<br />
<b>Disclaimer</b>
<p>These notes should be obvious, but I'll point it out anyway.</p>
<ul>
 <li>
  This service is still experimental and is provided for free. No guarantees
  are given about the stability and uptime of this service. It may disappear
  at any time, and access to it can be restricted without prior notice.
 </li>
 <li>
  Changes to this API can be made without prior notice. Backwards compatibility
  is provided when feasable, but non-compatible changes may be made at some
  point.  It is the responsibility of the application developers to keep their
  applications up-to-date.
 </li>
 <li>
  This service does not grant anyone the right to copy or republish the
  information fetched using the API. VNDB does not have a clear copyright
  statement, and in general we're not very strict about other people copying
  our information, but this API is not intended to be used for fetching and
  publishing more than half of our database. When in doubt, ask.
 </li>
 <li>
  Lastly, this API is not complete. If you have any specific features you'd
  like to see, don't hesitate to ask.
 </li>
</ul>

<br />
<b>Implementation tips</b>
<p>Like the disclaimer, these notes should be obvious, but it can't hurt to state them anyway.</p>
<ul>
 <li>
  Cache as much as you can, the data on VNDB doesn't change very often. Even if
  you only refresh the cached information once every month, you can be sure
  that most of the data hasn't changed within that time.
 </li>
 <li>
  Program defensively. Even when the documentation says that a string will be
  returned, it may very well happen that this is later changed into an array.
  Make sure your application doesn't completely crash in such an event. Also keep
  in mind that for every command you send, the server can reply with an error, or
  can immediately close the connection (but this should be rare).
 </li>
 <li>
  Regularly check this page to see if anything has changed to the API, and
  update your client when necessary. A change log can be found on the bottom of
  this page. It is recommended to subscribe to the <a
  href="/feeds/announcements.atom">announcements Atom feed</a>.
 </li>
 <li>
  Use a JSON library for both encoding and decoding JSON data. While the format
  is relatively easy to use, you're much more likely to introduce bugs when you're
  writing your own parser.
 </li>
</ul>



:SUB:Request/response syntax
<p>
 The VNDB API uses the JSON format for data in various places, this document assumes
 you are familiar with it. See <a href="http://json.org/">JSON.org</a> for a quick
 overview and <a href="http://www.ietf.org/rfc/rfc4627.txt?number=4627">RFC 4627</a>
 for the glory details.
 <br /><br />
 The words <i>object</i>, <i>array</i>, <i>value</i>, <i>string</i>,
 <i>number</i> and <i>integer</i> refer to the JSON data types. In addition the following
 definitions are used in this document:
</p>
<dl>
 <dt><i>request</i> or <i>command</i></dt><dd>
  Message sent from the client to the server.
 </dd><dt><i>response</i></dt><dd>
  Message sent from the server to the client.
 </dd><dt><i>whitespace</i></dt><dd>
  Any sequence of the following characters: space, tab, line feed and carriage
  return.  (hexadecimal: 20, 09, 0A, 0D, respectively). This is in line with the
  definition of whitespace in the JSON specification.
 </dd><dt><i>date</i></dt><dd>
  A <i>string</i> signifying a date (in particular: release date). The
  following formats are used: "yyyy" (when day and month are unknown), "yyyy-mm"
  (when day is unknown) "yyyy-mm-dd", and "tba" (To Be Announced). If the year is
  not known and the date is not "tba", the special value <b>null</b> is used.
 </dd>
</dl>
<br />

<b>Message format</b>
<p>
 A message is formatted as a command or response name, followed by any number of
 arguments, followed by the End Of Transmission character (04 in hexadecimal).
 Arguments are separated by one or more whitespace characters, and any sequence
 of whitespace characters is allowed before and after the message.<br />
 The command or response name is an unescaped string containing only lowercase
 alphabetical ASCII characters, and indicates what kind of command or response
 this message contains.<br />
 An argument can either be an unescaped string (not containing whitespace), any
 JSON value, or a filter string. The following two examples demonstrate a
 'login' command, with an object as argument. Both messages are equivalent, as
 the whitespace is ignored. '0x04' is used to indicate the End Of Transmission
 character.
</p>
<pre>
 login {"protocol":1,"username":"ayo"}<b class="standout">0x04</b>
</pre><pre>
 login {
  "protocol" : 1,
  "username" : "ayo"
 }
 <b class="standout">0x04</b>
</pre>
The 0x04 byte will be ommitted in the other examples in this document. It is
however still required.<br />

<br />
<b>Filter string syntax</b>
<p>
 Some commands accept a filter string as argument. This argument is formatted
 similar to boolean expressions in most programming languages. A filter consists
 of one or more <i>expressions</i>, separated by the boolean operators "and" or
 "or" (lowercase). Each filter expression can be surrounded by parentheses to
 indicate precedence, the filter argument itself must be surrounded by parentheses.
 <br />
 An <i>expression</i> consists of a <i>field name</i>, followed by an
 <i>operator</i> and a <i>value</i>. The field name must consist entirely of
 lowercase alphanumeric characters and can also contain an underscore. The
 operator must be one of the following characters: =, !=, &lt;, &lt;=, &gt;,
 &gt;= or ~.  The <i>value</i> can be any valid JSON value. Whitespace
 characters are allowed, but not required, between all expressions, field names,
 operators and values.<br />
 The following two filters are equivalent:
</p>
<pre>
 (title~"osananajimi"or(id=2))
</pre><pre>
 (
   id = 2
   or
   title ~ "osananajimi"
 )
</pre>
<p>More complex filters are also possible:</p>
<pre>
 ((platforms = ["win", "ps2"] or languages = "ja") and released > "2009-01-10")
</pre>
<p>See the individual commands for more details.</p>


:SUB:The 'login' command
<pre>
 login {"protocol":1,"client":"test","clientver":0.1,"username":"ayo","password":"hi-mi-tsu!"}
</pre>
<p>
 Every client is required to login before issuing other commands. The login
 command accepts a JSON object as argument. This object has the following members:
</p>
<dl>
 <dt>protocol</dt><dd>An integer that indicates which protocol version the client implements. Must be 1.</dd>
 <dt>client</dt><dd>
  A string identifying the client application. Between the 3 and 50 characters,
  must contain only alphanumeric ASCII characters, space, underscore and hyphens.
  When writing a client, think of a funny (unique) name and hardcode it into
  your application.
 </dd><dt>clientver</dt><dd>A number or string indicating the software version of the client.</dd>
 <dt>username</dt><dd>(optional) String containing the username of the person using the client.</dd>
 <dt>password</dt><dd>(optional) String, password of that user in plain text.</dd>
</dl>
<p>
 The server replies with either 'ok' (no arguments), or 'error' (see below).
 Note that logging in using a username and password is optional, but some
 commands are only available when logged in. It is strongly recommended to
 connect with TLS when logging in with a username and password.
</p>


:SUB:The 'dbstats' command
<p>
 This command gives the global database statistics that are visible in the main
 menu of the site. The command is simply:
</p>
<pre>
 dbstats
</pre>
<p>And the response has the following format:</p>
<pre>
 dbstats <b class="standout">stats</b>
</pre>
<p>Where <i>stats</i> is a JSON object with integer values. Example response:</p>
<pre>
 dbstats {"users":49084,
          "threads":3998,
          "tags":1627,
          "releases":28071,
          "producers":3456,
          "chars":14046,
          "posts":52470,
          "vn":13051,
          "traits":1272}
</pre>


:SUB:The 'get' command
<p>
 This command is used to fetch data from the database. It accepts 4 arguments:
 the type of data to fetch (e.g. visual novels or producers), what part of that
 data to fetch (e.g. only the VN titles, or the descriptions and relations as
 well), a filter expression, and lastly some options.
</p>
<pre>
 get <b class="standout">type flags filters options</b>
</pre>
<p>
 <i>type</i> and <i>flags</i> are unescaped strings. The accepted values for <i>type</i> are
 documented below.  <i>flags</i> is a comma-separated list of flags indicating what
 info to fetch. The filters, available flags and their meaning are documented
 separately for each type. The last <i>options</i> argument is optional, and
 influences the behaviour of the returned results. When present, <i>options</i>
 should be a JSON object with the following members (all are optional):
</p>
<dl>
 <dt>page</dt><dd>
  integer, used for pagination. Page 1 (the default) returns the first 10
  results (1-10), page 2 returns the following 10 (11-20), etc. (The actual
  number of results per page can be set with the "results" option below).
 </dd><dt>results</dt><dd>
  integer, maximum number of results to return. Also affects the "page" option
  above. For example: with "page" set to 2 and "results" set to 5, the second
  five results (that is, results 6-10) will be returned. Default: 10.
 </dd><dt>sort</dt><dd>
  string, the field to order the results by. The accepted field names differ
  per type, the default sort field is the ID of the database entry.
 </dd>
 <dt>reverse</dt><dd>boolean, default false. Set to true to reverse the order of the results.</dd>
</dl>
<p>
 The following example will fetch basic information and information about the
 related anime of the visual novel with id = 17:
</p>
<pre>
 get vn basic,anime (id = 17)
</pre>
<p>
 The server will reply with a 'results' message, this message is followed by a
 JSON object describing the results. This object has three members: 'num', which
 is an integer indicating the number of results returned, 'more', which is true
 when there are more results available (i.e. increasing the <i>page</i> option
 described above will give new results) and 'items', which contains the results
 as an array of objects. For example, the server could reply to the previous
 command with the following message:
</p>
<pre>
 results {"num":1, "more":false, "items":[{
   "id": 17, "title": "Ever17 -the out of infinity-", "original": null,
   "released": "2002-08-29", "languages": ["en","ja","ru","zh"],
   "platforms": ["drc","ps2","psp","win"],"anime": []
 }]}
</pre>
<p>
 Note that the actual result from the server can (and likely will) be formatted
 differently and that the order of the members may not be the same. What each
 member means and what possible values they can have differs per type and is
 documented below.
</p>

:SUBSUB:get vn
<p>The following members are returned from a 'get vn' command:</p>
<table style="margin: 5px 2%; width: 95%">
 <thead><tr>
  <td style="width: 80px">Member</td>
  <td style="width: 50px">Flag</td>
  <td style="width: 90px">Type</td>
  <td style="width: 40px">null</td>
  <td>Description</td>
 </tr></thead>
 <tr class="odd">
  <td>id</td>
  <td>-</td>
  <td>integer</td>
  <td>no</td>
  <td>Visual novel ID</td>
 </tr>
 <tr>
  <td>title</td>
  <td>basic</td>
  <td>string</td>
  <td>no</td>
  <td>Main title</td>
 </tr>
 <tr class="odd">
  <td>original</td>
  <td>basic</td>
  <td>string</td>
  <td>yes</td>
  <td>Original/official title.</td>
 </tr>
 <tr>
  <td>released</td>
  <td>basic</td>
  <td>date (string)</td>
  <td>yes</td>
  <td>Date of the first release.</td>
 </tr>
 <tr class="odd">
  <td>languages</td>
  <td>basic</td>
  <td>array of strings</td>
  <td>no</td>
  <td>Can be an empty array when nothing has been released yet.</td>
 </tr>
 <tr>
  <td>orig_lang</td>
  <td>basic</td>
  <td>array of strings</td>
  <td>no</td>
  <td>Language(s) of the first release. Can be an empty array.</td>
 </tr>
 <tr class="odd">
  <td>platforms</td>
  <td>basic</td>
  <td>array of strings</td>
  <td>no</td>
  <td>Can be an empty array when unknown or nothing has been released yet.</td>
 </tr>
 <tr>
  <td>aliases</td>
  <td>details</td>
  <td>string</td>
  <td>yes</td>
  <td>Aliases, separated by newlines.</td>
 </tr>
 <tr class="odd">
  <td>length</td>
  <td>details</td>
  <td>integer</td>
  <td>yes</td>
  <td>Length of the game, 1-5</td>
 </tr>
 <tr>
  <td>description</td>
  <td>details</td>
  <td>string</td>
  <td>yes</td>
  <td>Description of the VN. Can include formatting codes as described in <a href="/d9.3">d9.3</a>.</td>
 </tr>
 <tr class="odd">
  <td>links</td>
  <td>details</td>
  <td>object</td>
  <td>no</td>
  <td>
   Contains the following members:<br />
   "wikipedia", string, name of the related article on the English Wikipedia.<br />
   "encubed", string, the URL-encoded tag used on <a href="http://novelnews.net/">encubed</a>.<br />
   "renai", string, the name part of the url on <a href="http://renai.us/">renai.us</a>.<br />
   All members can be <b>null</b> when no links are available or known to us.
  </td>
 </tr>
 <tr>
  <td>image</td>
  <td>details</td>
  <td>string</td>
  <td>yes</td>
  <td>HTTP link to the VN image.</td>
 </tr>
 <tr class="odd">
  <td>image_nsfw</td>
  <td>details</td>
  <td>boolean</td>
  <td>no</td>
  <td>Whether the VN image is flagged as NSFW or not.</td>
 </tr>
 <tr>
  <td>anime</td>
  <td>anime</td>
  <td>array of objects</td>
  <td>no</td>
  <td>
   (Possibly empty) list of anime related to the VN, each object has the following members:<br />
   "id", integer, <a href="http://anidb.net/">AniDB</a> ID<br />
   "ann_id", integer, <a href="http://animenewsnetwork.com/">AnimeNewsNetwork</a> ID<br />
   "nfo_id", string, <a href="http://animenfo.com/">AnimeNfo</a> ID<br />
   "title_romaji", string<br />
   "title_kanji", string<br />
   "year", integer, year in which the anime was aired<br />
   "type", string<br />
   All members except the "id" can be <b>null</b>. Note that this data is courtesy of AniDB,
   and may not reflect the latest state of their information due to caching.
  </td>
 </tr>
 <tr class="odd">
  <td>relations</td>
  <td>relations</td>
  <td>array of objects</td>
  <td>no</td>
  <td>
   (Possibly empty) list of related visual novels, each object has the following members:<br />
   "id", integer<br />
   "relation", string, relation to the VN<br />
   "title", string, (romaji) title<br />
   "original", string, original/official title, can be <b>null</b>.
  </td>
 </tr>
 <tr>
  <td>tags</td>
  <td>tags</td>
  <td>array of arrays</td>
  <td>no</td>
  <td>
   (Possibly empty) list of tags linked to this VN. Each tag is represented as
   an array with three elements:<br />
   tag id (integer),<br />
   score (number between 0 and 3),<br />
   spoiler level (integer, 0=none, 1=minor, 2=major)<br />
   Only tags with a positive score are included. Note that this list may be
   relatively large - more than 50 tags for a VN is quite possible.<br />
   General information for each tag is available in the <a href="/d14.2">tags
   dump</a>. Keep in mind that it is possible that a tag has only recently been
   added and is not available in the dump yet, though this doesn't happen
   often.
  </td>
 </tr>
 <tr class="odd">
  <td>popularity</td>
  <td>stats</td>
  <td>number</td>
  <td>no</td>
  <td>Between 0 (unpopular) and 100 (most popular).</td>
 </tr>
 <tr>
  <td>rating</td>
  <td>stats</td>
  <td>number</td>
  <td>no</td>
  <td>Bayesian rating, between 1 and 10.</td>
 </tr>
 <tr class="odd">
  <td>votecount</td>
  <td>stats</td>
  <td>integer</td>
  <td>no</td>
  <td>Number of votes.</td>
 </tr>
 <tr>
  <td>screens</td>
  <td>screens</td>
  <td>array of objects</td>
  <td>no</td>
  <td>
   (Possibly empty) list of screenshots, each object has the following members:<br />
   "image", string, URL of the full-size screenshot<br />
   "rid", integer, release ID<br />
   "nsfw", boolean<br />
   "height", integer, height of the full-size screenshot<br />
   "width", integer, width of the full-size screenshot<br />
 </tr>
</table>
<p>Sorting is possible on the following fields: id, title, released, popularity, rating, votecount.</p><br />

<p>'get vn' accepts the following filter expressions:</p>
<table style="margin: 5px 2%; width: 95%">
 <thead><tr>
  <td style="width: 80px">Field</td>
  <td style="width: 90px">Value</td>
  <td style="width: 90px">Operators</td>
  <td>&nbsp;</td>
 </tr></thead>
 <tr class="odd">
  <td>id</td>
  <td>integer<br />array of integers</td>
  <td>= != &gt; &gt;= &lt; &lt;=<br />= !=</td>
  <td>
   When you need to fetch info about multiple VNs, it is recommended to do so
   in one command using an array of integers as value. e.g. (id = [7,11,17]).
  </td>
 </tr>
 <tr>
  <td>title</td>
  <td>string</td>
  <td>= != ~</td>
  <td>&nbsp;</td>
 </tr>
 <tr class="odd">
  <td>original</td>
  <td>null<br />string</td>
  <td>= !=<br />= != ~</td>
  <td>&nbsp;</td>
 </tr>
 <tr>
  <td>firstchar</td>
  <td>null<br />string</td>
  <td>= !=<br />= !=</td>
  <td>
    Filter by the first character of the title, similar to the
    <a href="http://vndb.org/v/all">VN browser interface</a>. The character
    must either be a lowercase 'a' to 'z', or null to match all titles not
    starting with an alphabetic character.
   </td>
 </tr>
 <tr class="odd">
  <td>released</td>
  <td>null<br />date (string)</td>
  <td>= !=<br />= != &gt; &gt;= &lt; &lt;=</td>
  <td>
   Note that matching on partial dates (released = "2009") doesn't do what
   you want, use ranges instead, e.g. (released &gt; "2008" and released &lt;= "2009").
  </td>
 </tr>
 <tr>
  <td>platforms</td>
  <td>null<br />string<br />array of strings</td>
  <td><br />= !=</td>
  <td>&nbsp;</td>
 </tr>
 <tr class="odd">
  <td>languages</td>
  <td>null<br />string<br />array of strings</td>
  <td><br />= !=</td>
  <td>&nbsp;</td>
 </tr>
 <tr>
  <td>orig_lang</td>
  <td>string<br />array of strings</td>
  <td>= !=</td>
  <td>&nbsp;</td>
 </tr>
 <tr class="odd">
  <td>search</td>
  <td>string</td>
  <td>~</td>
  <td>
   This is not an actual field, but performs a search on the titles of the visual
   novel and its releases. Note that the algorithm of this search may change and
   that it can use a different algorithm than the search function on the website.
  </td>
 </tr>
</table>

:SUBSUB:get release
<p>Returned members:</p>
<table style="margin: 5px 2%; width: 95%">
 <thead><tr>
  <td style="width: 80px">Member</td>
  <td style="width: 50px">Flag</td>
  <td style="width: 90px">Type</td>
  <td style="width: 40px">null</td>
  <td>Description</td>
 </tr></thead>
 <tr class="odd">
  <td>id</td>
  <td>-</td>
  <td>integer</td>
  <td>no</td>
  <td>Release ID</td>
 </tr>
 <tr>
  <td>title</td>
  <td>basic</td>
  <td>string</td>
  <td>no</td>
  <td>Release title (romaji)</td>
 </tr>
 <tr class="odd">
  <td>original</td>
  <td>basic</td>
  <td>string</td>
  <td>yes</td>
  <td>Original/official title of the release.</td>
 </tr>
 <tr>
  <td>released</td>
  <td>basic</td>
  <td>date (string)</td>
  <td>yes</td>
  <td>Release date</td>
 </tr>
 <tr class="odd">
  <td>type</td>
  <td>basic</td>
  <td>string</td>
  <td>no</td>
  <td>"complete", "partial" or "trial"</td>
 </tr>
 <tr>
  <td>patch</td>
  <td>basic</td>
  <td>boolean</td>
  <td>no</td>
  <td>&nbsp;</td>
 </tr>
 <tr class="odd">
  <td>freeware</td>
  <td>basic</td>
  <td>boolean</td>
  <td>no</td>
  <td>&nbsp;</td>
 </tr>
 <tr>
  <td>doujin</td>
  <td>basic</td>
  <td>boolean</td>
  <td>no</td>
  <td>&nbsp;</td>
 </tr>
 <tr class="odd">
  <td>languages</td>
  <td>basic</td>
  <td>array of strings</td>
  <td>no</td>
  <td>&nbsp;</td>
 </tr>
 <tr>
  <td>website</td>
  <td>details</td>
  <td>string</td>
  <td>yes</td>
  <td>Official website URL</td>
 </tr>
 <tr class="odd">
  <td>notes</td>
  <td>details</td>
  <td>string</td>
  <td>yes</td>
  <td>Random notes, can contain formatting codes as described in <a href="/d9.3">d9.3</a></td>
 </tr>
 <tr>
  <td>minage</td>
  <td>details</td>
  <td>integer</td>
  <td>yes</td>
  <td>Age rating, 0 = all ages.</td>
 </tr>
 <tr class="odd">
  <td>gtin</td>
  <td>details</td>
  <td>string</td>
  <td>yes</td>
  <td>JAN/UPC/EAN code. This is actually an integer, but formatted as a string to avoid an overflow on 32bit platforms.</td>
 </tr>
 <tr>
  <td>catalog</td>
  <td>details</td>
  <td>string</td>
  <td>yes</td>
  <td>Catalog number.</td>
 </tr>
 <tr class="odd">
  <td>platforms</td>
  <td>details</td>
  <td>array of strings</td>
  <td>no</td>
  <td>Empty array when platform is unknown.</td>
 </tr>
 <tr>
  <td>media</td>
  <td>details</td>
  <td>array of objects</td>
  <td>no</td>
  <td>
   Objects have the following two members:<br />
   "medium", string<br />
   "qty", integer, the quantity. <b>null</b> when it is not applicable for the medium.<br />
   An empty array is returned when the media are unknown.
  </td>
 </tr>
 <tr class="odd">
  <td>vn</td>
  <td>vn</td>
  <td>array of objects</td>
  <td>no</td>
  <td>
   Array of visual novels linked to this release. Objects have the following members:
   id, title and original. These are the same as the members of the "get vn" command.
  </td>
 </tr>
 <tr>
  <td>producers</td>
  <td>producers</td>
  <td>array of objects</td>
  <td>no</td>
  <td>
   (Possibly empty) list of producers involved in this release. Objects have the following members:<br />
   "id", integer<br />
   "developer", boolean,<br />
   "publisher", boolean,<br />
   "name", string, romaji name<br />
   "original", string, official/original name, can be <b>null</b><br />
   "type", string, producer type
  </td>
 </tr>
</table>
<p>Sorting is possible on the 'id', 'title' and 'released' fields.</p><br />

<p>Accepted filters:</p>
<table style="margin: 5px 2%; width: 95%">
 <thead><tr>
  <td style="width: 80px">Field</td>
  <td style="width: 90px">Value</td>
  <td style="width: 90px">Operators</td>
  <td>&nbsp;</td>
 </tr></thead>
 <tr class="odd">
  <td>id</td>
  <td>integer<br />array of integers</td>
  <td>= != &gt; &gt;= &lt; &lt;=<br />= !=</td>
  <td>&nbsp;</td>
 </tr>
 <tr>
  <td>vn</td>
  <td>integer</td>
  <td>=</td>
  <td>Find releases linked to the given visual novel ID.</td>
 </tr>
 <tr class="odd">
  <td>producer</td>
  <td>integer</td>
  <td>=</td>
  <td>Find releases linked to the given producer ID.</td>
 </tr>
 <tr>
  <td>title</td>
  <td>string</td>
  <td>= != ~</td>
  <td>&nbsp;</td>
 </tr>
 <tr class="odd">
  <td>original</td>
  <td>null<br />string</td>
  <td>= !=<br />= != ~</td>
  <td>&nbsp;</td>
 </tr>
 <tr>
  <td>released</td>
  <td>null<br />date (string)</td>
  <td>= !=<br />= != &gt; &gt;= &lt; &lt;=</td>
  <td>Note about released filter for the vn type also applies here.</td>
 </tr>
 <tr class="odd">
  <td>patch</td>
  <td>boolean</td>
  <td>=</td>
  <td>&nbsp;</td>
 </tr>
 <tr>
  <td>freeware</td>
  <td>boolean</td>
  <td>=</td>
  <td>&nbsp;</td>
 </tr>
 <tr class="odd">
  <td>doujin</td>
  <td>boolean</td>
  <td>=</td>
  <td>&nbsp;</td>
 </tr>
 <tr>
  <td>type</td>
  <td>string</td>
  <td>= !=</td>
  <td>&nbsp;</td>
 </tr>
 <tr class="odd">
  <td>gtin</td>
  <td>int</td>
  <td>= !=</td>
  <td>Value can also be escaped as a string (if you risk an integer overflow otherwise)</td>
 </tr>
 <tr>
  <td>catalog</td>
  <td>string</td>
  <td>= !=</td>
  <td>&nbsp;</td>
 </tr>
 <tr class="odd">
  <td>languages</td>
  <td>string<br />array of strings</td>
  <td>= !=</td>
  <td>&nbsp;</td>
 </tr>
</table>

:SUBSUB:get producer
<p>Returned members:</p>
<table style="margin: 5px 2%; width: 95%">
 <thead><tr>
  <td style="width: 80px">Member</td>
  <td style="width: 50px">Flag</td>
  <td style="width: 90px">Type</td>
  <td style="width: 40px">null</td>
  <td>Description</td>
 </tr></thead>
 <tr class="odd">
  <td>id</td>
  <td>-</td>
  <td>integer</td>
  <td>no</td>
  <td>Producer ID</td>
 </tr>
 <tr>
  <td>name</td>
  <td>basic</td>
  <td>string</td>
  <td>no</td>
  <td>(romaji) producer name</td>
 </tr>
 <tr class="odd">
  <td>original</td>
  <td>basic</td>
  <td>string</td>
  <td>yes</td>
  <td>Original/official name</td>
 </tr>
 <tr>
  <td>type</td>
  <td>basic</td>
  <td>string</td>
  <td>no</td>
  <td>Producer type</td>
 </tr>
 <tr class="odd">
  <td>language</td>
  <td>basic</td>
  <td>string</td>
  <td>no</td>
  <td>Primary language</td>
 </tr>
 <tr>
  <td>links</td>
  <td>details</td>
  <td>object</td>
  <td>no</td>
  <td>
   External links, object has the following members:<br />
   "homepage", official homepage,<br />
   "wikipedia", title of the related article on the English wikipedia.<br />
   Both values can be <b>null</b>.
  </td>
 </tr>
 <tr class="odd">
  <td>aliases</td>
  <td>details</td>
  <td>string</td>
  <td>yes</td>
  <td>Comma separated list of alternative names</td>
 </tr>
 <tr>
  <td>description</td>
  <td>details</td>
  <td>string</td>
  <td>yes</td>
  <td>Description/notes of the producer, can contain formatting codes as described in <a href="/d9.3">d9.3</a></td>
 </tr>
 <tr class="odd">
  <td>relations</td>
  <td>relations</td>
  <td>array of objects</td>
  <td>no</td>
  <td>
   (possibly empty) list of related producers, each object has the following members:<br />
   "id", integer, producer ID,<br />
   "relation", string, relation to the current producer,<br />
   "name", string,<br />
   "original", string, can be <b>null</b>
  </td>
 </tr>
</table>
<p>Sorting is possible on the 'id' and 'name' fields.</p><br />

<p>The following filters are recognised:</p>
<table style="margin: 5px 2%; width: 95%">
 <thead><tr>
  <td style="width: 80px">Field</td>
  <td style="width: 90px">Value</td>
  <td style="width: 90px">Operators</td>
  <td>&nbsp;</td>
 </tr></thead>
 <tr class="odd">
  <td>id</td>
  <td>integer<br />array of integers</td>
  <td>= != &gt; &gt;= &lt; &lt;=<br />= !=</td>
  <td>&nbsp;</td>
 </tr>
 <tr>
  <td>name</td>
  <td>string</td>
  <td>= != ~</td>
  <td>&nbsp;</td>
 </tr>
 <tr class="odd">
  <td>original</td>
  <td>null<br />string</td>
  <td>= !=<br />= != ~</td>
  <td>&nbsp;</td>
 </tr>
 <tr>
  <td>type</td>
  <td>string</td>
  <td>= !=</td>
  <td>&nbsp;</td>
 </tr>
 <tr class="odd">
  <td>language</td>
  <td>string<br />array of strings</td>
  <td>= !=</td>
  <td>&nbsp;</td>
 </tr>
 <tr>
  <td>search</td>
  <td>string</td>
  <td>~</td>
  <td>Not an actual field. Performs a search on the name, original and aliases fields.</td>
 </tr>
</table>

:SUBSUB:get character
<p>Returned members:</p>
<table style="margin: 5px 2%; width: 95%">
 <thead><tr>
  <td style="width: 80px">Member</td>
  <td style="width: 50px">Flag</td>
  <td style="width: 90px">Type</td>
  <td style="width: 40px">null</td>
  <td>Description</td>
 </tr></thead>
 <tr class="odd">
  <td>id</td>
  <td>-</td>
  <td>integer</td>
  <td>no</td>
  <td>Character ID</td>
 </tr>
 <tr>
  <td>name</td>
  <td>basic</td>
  <td>string</td>
  <td>no</td>
  <td>(romaji) name</td>
 </tr>
 <tr class="odd">
  <td>original</td>
  <td>basic</td>
  <td>string</td>
  <td>yes</td>
  <td>Original (kana/kanji) name</td>
 </tr>
 <tr>
  <td>gender</td>
  <td>basic</td>
  <td>string</td>
  <td>yes</td>
  <td>"m" (male), "f" (female) or "b" (both)</td>
 </tr>
 <tr class="odd">
  <td>bloodt</td>
  <td>basic</td>
  <td>string</td>
  <td>yes</td>
  <td>Blood type, "a", "b", "ab" or "o"</td>
 </tr>
 <tr>
  <td>birthday</td>
  <td>basic</td>
  <td>array</td>
  <td>no</td>
  <td>
   Array of two numbers: day of the month (1-31) and the month (1-12). Either can be null.
  </td>
 </tr>
 <tr class="odd">
  <td>aliases</td>
  <td>details</td>
  <td>string</td>
  <td>yes</td>
  <td>Alternative names, separated with a newline.</td>
 </tr>
 <tr>
  <td>description</td>
  <td>details</td>
  <td>string</td>
  <td>yes</td>
  <td>Description/notes, can contain formatting codes as described in <a href="/d9.3">d9.3</a>. May also include [spoiler] tags!</td>
 </tr>
 <tr class="odd">
  <td>image</td>
  <td>details</td>
  <td>string</td>
  <td>yes</td>
  <td>HTTP link to the character image. Always (supposed to be) SFW.</td>
 </tr>
 <tr>
  <td>bust</td>
  <td>meas</td>
  <td>integer</td>
  <td>yes</td>
  <td>cm</td>
 </tr>
 <tr class="odd">
  <td>waist</td>
  <td>meas</td>
  <td>integer</td>
  <td>yes</td>
  <td>cm</td>
 </tr>
 <tr>
  <td>hip</td>
  <td>meas</td>
  <td>integer</td>
  <td>yes</td>
  <td>cm</td>
 </tr>
 <tr class="odd">
  <td>height</td>
  <td>meas</td>
  <td>integer</td>
  <td>yes</td>
  <td>cm</td>
 </tr>
 <tr>
  <td>weight</td>
  <td>meas</td>
  <td>integer</td>
  <td>yes</td>
  <td>kg</td>
 </tr>
 <tr class="odd">
  <td>traits</td>
  <td>traits</td>
  <td>array of arrays</td>
  <td>no</td>
  <td>(Possibly empty) list of traits linked to this character. Each trait is
    represented as an array of two elements: The trait id (integer) and the
    spoiler level (integer, 0-2). General information for each trait is
    available in the <a href="/d14.3">traits dump</a>.</td>
 </tr>
 <tr>
  <td>vns</td>
  <td>vns</td>
  <td>array of arrays</td>
  <td>no</td>
  <td>List of VNs linked to this character. Each VN is an array of 4 elements:
    VN id, release ID (0 = "all releases"), spoiler level (0-2) and the role
    (string).<br />
    Available roles: "main", "primary", "side" and "appears".</td>
 </tr>
</table>
<p>Sorting is possible on the 'id' and 'name' fields.</p><br />

<p>The following filters are recognised:</p>
<table style="margin: 5px 2%; width: 95%">
 <thead><tr>
  <td style="width: 80px">Field</td>
  <td style="width: 90px">Value</td>
  <td style="width: 90px">Operators</td>
  <td>&nbsp;</td>
 </tr></thead>
 <tr class="odd">
  <td>id</td>
  <td>integer<br />array of integers</td>
  <td>= != &gt; &gt;= &lt; &lt;=<br />= !=</td>
  <td>&nbsp;</td>
 </tr>
 <tr>
  <td>name</td>
  <td>string</td>
  <td>= != ~</td>
  <td>&nbsp;</td>
 </tr>
 <tr class="odd">
  <td>original</td>
  <td>null<br />string</td>
  <td>= !=<br />= != ~</td>
  <td>&nbsp;</td>
 </tr>
 <tr>
  <td>search</td>
  <td>string</td>
  <td>~</td>
  <td>Not an actual field. Performs a search on the name, original and aliases fields.</td>
 </tr>
 <tr class="odd">
  <td>vn</td>
  <td>id</td>
  <td>=</td>
  <td>Find characters linked to the given visual novel ID. Note that this may
    also include characters that are normally hidden by spoiler settings.
  </td>
 </tr>
</table>


:SUBSUB:get votelist
<p>Returned members:</p>
<table style="margin: 5px 2%; width: 95%">
 <thead><tr>
  <td style="width: 80px">Member</td>
  <td style="width: 50px">Flag</td>
  <td style="width: 90px">Type</td>
  <td style="width: 40px">null</td>
  <td>Description</td>
 </tr></thead>
 <tr class="odd">
  <td>vn</td>
  <td>basic</td>
  <td>integer</td>
  <td>no</td>
  <td>Visual Novel ID</td>
 </tr>
 <tr>
  <td>vote</td>
  <td>basic</td>
  <td>integer</td>
  <td>no</td>
  <td>In the range of 10 (lowest) to 100 (highest). These are displayed on the site as a fractional number between 1 and 10.</td>
 </tr>
 <tr class="odd">
  <td>added</td>
  <td>basic</td>
  <td>integer</td>
  <td>no</td>
  <td>Unix timestamp of when this vote has been added.</td>
 </tr>
</table>
<p>The returned list is always sorted on the 'vn' field.</p><br />

<p>The following filters are recognised:</p>
<table style="margin: 5px 2%; width: 95%">
 <thead><tr>
  <td style="width: 80px">Field</td>
  <td style="width: 90px">Value</td>
  <td style="width: 90px">Operators</td>
  <td>&nbsp;</td>
 </tr></thead>
 <tr class="odd">
  <td>uid</td>
  <td>integer</td>
  <td>=</td>
  <td>This filter must be present. The special value '0' is recognized as the currently logged in user.</td>
 </tr>
</table>
<p>
 Note: It's possible that a user has voted on a VN that has been deleted. The
 vote is still included this list, but a 'get vn' command on its id will not
 return anything.<br />
 Note#2: This command will not return any results for users who have their vote
 list hidden from the public in their preferences, except when the user itself
 has logged into the API.
</p>

:SUBSUB:get vnlist
<p>Returned members:</p>
<table style="margin: 5px 2%; width: 95%">
 <thead><tr>
  <td style="width: 80px">Member</td>
  <td style="width: 50px">Flag</td>
  <td style="width: 90px">Type</td>
  <td style="width: 40px">null</td>
  <td>Description</td>
 </tr></thead>
 <tr class="odd">
  <td>vn</td>
  <td>basic</td>
  <td>integer</td>
  <td>no</td>
  <td>Visual Novel ID</td>
 </tr>
 <tr>
  <td>status</td>
  <td>basic</td>
  <td>integer</td>
  <td>no</td>
  <td>0=Unknown, 1=playing, 2=finished, 3=stalled, 4=dropped.</td>
 </tr>
 <tr class="odd">
  <td>added</td>
  <td>basic</td>
  <td>integer</td>
  <td>no</td>
  <td>Unix timestamp of when this item has been added.</td>
 </tr>
 <tr>
  <td>notes</td>
  <td>basic</td>
  <td>string</td>
  <td>yes</td>
  <td>User-set notes</td>
 </tr>
</table>
<p>The returned list is always sorted on the 'vn' field.</p><br />

<p>The following filters are recognised:</p>
<table style="margin: 5px 2%; width: 95%">
 <thead><tr>
  <td style="width: 80px">Field</td>
  <td style="width: 90px">Value</td>
  <td style="width: 90px">Operators</td>
  <td>&nbsp;</td>
 </tr></thead>
 <tr class="odd">
  <td>uid</td>
  <td>integer</td>
  <td>=</td>
  <td>This filter must be present. The special value '0' is recognized as the currently logged in user.</td>
 </tr>
</table>
<p>The notes mentioned under 'get votelist' also apply here.</p>

:SUBSUB:get wishlist
<p>Returned members:</p>
<table style="margin: 5px 2%; width: 95%">
 <thead><tr>
  <td style="width: 80px">Member</td>
  <td style="width: 50px">Flag</td>
  <td style="width: 90px">Type</td>
  <td style="width: 40px">null</td>
  <td>Description</td>
 </tr></thead>
 <tr class="odd">
  <td>vn</td>
  <td>basic</td>
  <td>integer</td>
  <td>no</td>
  <td>Visual Novel ID</td>
 </tr>
 <tr>
  <td>priority</td>
  <td>basic</td>
  <td>integer</td>
  <td>no</td>
  <td>0=high, 1=medium, 2=low, 3=blacklist.</td>
 </tr>
 <tr class="odd">
  <td>added</td>
  <td>basic</td>
  <td>integer</td>
  <td>no</td>
  <td>Unix timestamp of when this item has been added.</td>
 </tr>
</table>
<p>The returned list is always sorted on the 'vn' field.</p><br />

<p>The following filters are recognised:</p>
<table style="margin: 5px 2%; width: 95%">
 <thead><tr>
  <td style="width: 80px">Field</td>
  <td style="width: 90px">Value</td>
  <td style="width: 90px">Operators</td>
  <td>&nbsp;</td>
 </tr></thead>
 <tr class="odd">
  <td>uid</td>
  <td>integer</td>
  <td>=</td>
  <td>This filter must be present. The special value '0' is recognized as the currently logged in user.</td>
 </tr>
</table>
<p>The notes mentioned under 'get votelist' also apply here.</p>


:SUB:The 'set' command
<p>
 The set command can be used to modify stuff in the database. It can only be
 used when logged in as a user. The command has the following syntax:
</p>
<pre>
 set <b class="standout">type id fields</b>
</pre>
<p>
 Here, <i>type</i> is similar to the type argument to the 'get' command,
 <i>id</i> is the (integer) identifier of the database entry to change, and
 <i>fields</i> is an object with the fields to set or modify. If the
 <i>fields</i> object is not present, the set command works as a 'delete'. The
 interpretation of the <i>id</i> and <i>fields</i> arguments depend on the
 <i>type</i>, and are documented in the sections below.<br />
 <br />
 But before that, let me present some examples to get a feel on what the
 previous paragraph meant. The following example adds a '10' vote on <a
 href="/v17">v17</a>, or changes the vote to a 10 if a previous vote was
 already present:
</p>
<pre>
 set votelist 17 {"vote":100}
</pre>
<p>And here's how to remove the previous vote:</p>
<pre>
 set votelist 17
</pre>
<p>
 'set' replies with a simple 'ok' on success, or with an 'error' (see below) on
 failure. Note that, due to my laziness, no error is currently returned if the
 identifier does not exist. So voting on a VN that does not exist will return
 an 'ok', but no vote is actually added. This behaviour may change in the
 future. Note that this API doesn't care whether the VN has been deleted or
 not, so you can manage votes and stuff for deleted VNs (Which isn't very
 helpful, because 'get vn' won't return a thing for deleted VNs).
</p>

:SUBSUB:set votelist
<p>
 This command facilitates adding, removing and modifying votes. The
 <i>identifier</i> argument is the visual novel ID, and the following fields
 are recognized:
</p>
<table style="margin: 5px 2%; width: 95%">
 <thead><tr>
  <td style="width: 80px">Field</td>
  <td style="width: 90px">Type</td>
  <td>Description</td>
 </tr></thead>
 <tr class="odd">
  <td>vote</td>
  <td>integer</td>
  <td>Same as the 'vote' member returned by 'get votelist', in the range 10 to 100. This field has no default; it must always be present.</td>
 </tr>
</table>
<p>
 The 'added' member returned by 'get votelist' is, as its name implies, only
 set when the vote is added. Changing an existing vote will not update the
 'added' field.
</p>

:SUBSUB:set vnlist
<p>
 This command facilitates adding, removing and modifying your VN list. The
 <i>identifier</i> argument is the visual novel ID, and the following fields
 are recognized:
</p>
<table style="margin: 5px 2%; width: 95%">
 <thead><tr>
  <td style="width: 80px">Field</td>
  <td style="width: 90px">Type</td>
  <td>Description</td>
 </tr></thead>
 <tr class="odd">
  <td>status</td>
  <td>integer</td>
  <td>Same as the 'status' member returned by 'get vnlist'. Default: 0</td>
 </tr>
 <tr>
  <td>notes</td>
  <td>string</td>
  <td>Same as the 'notes' member returned by 'get vnlist'. An empty string is considered equivalent to 'null'. A newline is currently not allowed because the web interface won't handle them well. Default: null.</td>
 </tr>
</table>
<p>
 Sames notes about the 'added' member for 'set votelist' applies here.<br />
 Also note that, when removing a vnlist item, any releases associated with the
 VN will be removed from the users' list as well. The release list
 functionality is not currently exposed to the API, so this will only be
 visible when the web interface is used.
</p>

:SUBSUB:set wishlist
<p>
 This command facilitates adding, removing and modifying VNs from your
 wishlist. The <i>identifier</i> argument is the visual novel ID, and the
 following fields are recognized:
</p>
<table style="margin: 5px 2%; width: 95%">
 <thead><tr>
  <td style="width: 80px">Field</td>
  <td style="width: 90px">Type</td>
  <td>Description</td>
 </tr></thead>
 <tr class="odd">
  <td>priority</td>
  <td>integer</td>
  <td>Same as the 'priority' member returned by 'get wishlist'.</td>
 </tr>
</table>
<p>
 Sames notes about the 'added' member for 'set votelist' applies here.<br />
</p>



:SUB:The 'error' response
<p>
 Every command to the server can receive an 'error' response, this response has one
 argument: a JSON object containing at least a member named "id", which identifies
 the error, and a "msg", which contains a human readable message explaining what
 went wrong. Other members are also possible, depending on the value of "id".
 Example error message:
</p>
<pre>
 error {"id":"parse", "msg":"Invalid command or argument"}
</pre>
<p>
 Note that the value of "msg" is not directly linked to the error identifier:
 the message explains what went wrong in more detail, there are several
 different messages for the same id. The following error identifiers are currently
 defined:
</p>
<dl>
 <dt>parse</dt><dd>Syntax error, unknown command or invalid argument type.</dd>
 <dt>missing</dt><dd>A JSON object argument is missing a required member. The name of which is given in the additional "field" member.</dd>
 <dt>badarg</dt><dd>A JSON value is of the wrong type or in the wrong format. The name of the incorrect field is given in a "field" member.</dd>
 <dt>needlogin</dt><dd>Need to be logged in to issue this command.</dd>
 <dt>throttled</dt><dd>
  You have used too many server resources within a short time, and need to wait
  a bit before sending the next command.  The type of throttle is given in the
  "type" member, and the "minwait" and "fullwait" members tell you how long you
  need to wait before sending the next command and when you can start bursting
  again (this is the recommended waiting time), respectively.  Both values are in
  seconds, with one decimal after the point.
 </dd>
 <dt>auth</dt><dd>(login) Incorrect username/password combination.</dd>
 <dt>loggedin</dt><dd>(login) Already logged in. Only one successful login command can be issues on one connection.</dd>
 <dt>gettype</dt><dd>(get) Unknown type argument to the 'get' command.</dd>
 <dt>getinfo</dt><dd>(get) Unknown info flag to the 'get' command. The name of the unrecognised flag is given in an additional "flag" member.</dd>
 <dt>filter</dt><dd>(get) Unknown filter field or invalid combination of field/operator/argument type. Includes three additional members: "field", "op" and "value" of the incorrect expression.</dd>
 <dt>settype</dt><dd>(set) Unknown type argument to the 'set' command.</dd>
</dl>



:SUB:Change Log
<p>
 This section lists the changes made in each version of the VNDB code.
 Check out the <a href="/t/an">announcements board</a> for more information about updates.
</p>
<b>2.25</b>
<ul>
 <li>Increased connection limit per IP from 5 to 10</li>
 <li>Increased command limit from 100 to 200 commands per 10 minutes</li>
 <li>Added support for TLS</li>
 <li>Added "screens" flag and member to "get vn"</li>
 <li>Added "vns" flag and member to "get character"</li>
 <li>Allow sorting "get vn" on popularity, rating and votecount</li>
</ul>
<b>2.23</b>
<ul>
 <li>Added new 'dbstats' command</li>
 <li>Added new 'get' types: character, votelist, vnlist and wishlist</li>
 <li>Added 'set' command, with types: votelist, vnlist and wishlist</li>
 <li>New error id: 'settype'</li>
 <li>Added "tags" flag and member to "get vn"</li>
 <li>Added "stats" flag to "get vn"</li>
 <li>Added "firstchar" filter to "get vn"</li>
 <li>Added "vn" filter to "get character"</li>
</ul>
<b>2.15</b>
<ul>
 <li>Fixed a bug with the server not allowing extra whitespace after a "get .. " command</li>
 <li>Allow non-numbers as "clientver" for the login command</li>
 <li>Added "image_nsfw" member to "get vn"</li>
 <li>Added "results" option to the "get .. {<options>}"</li>
 <li>Increased the maximum number of results for the "get .." command to 25</li>
 <li>Added "orig_lang" member and filter to the "get vn .." command</li>
 <li>Throttle the commands and sqltime per IP instead of per user</li>
 <li>Removed the limit on the number of open sessions per user</li>
 <li>Allow the API to be used without logging in with a username/password</li>
</ul>
<b>2.12</b>
<ul>
 <li>Added "image" member to "get vn"</li>
 <li>A few minor fixes in some error messages</li>
 <li>Switched to a different (and faster) search algorithm for "get vn .. (search ~ ..)"</li>
</ul>