-
Notifications
You must be signed in to change notification settings - Fork 3
/
index.html
854 lines (805 loc) · 26.4 KB
/
index.html
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
<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="None">
<link rel="shortcut icon" href="img/favicon.ico">
<title>LosePrivacy API</title>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Lato:400,700|Roboto+Slab:400,700|Inconsolata:400,700" />
<link rel="stylesheet" href="css/theme.css" />
<link rel="stylesheet" href="css/theme_extra.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/github.min.css" />
<script>
// Current page data
var mkdocs_page_name = "API";
var mkdocs_page_input_path = "index.md";
var mkdocs_page_url = null;
</script>
<script src="js/jquery-2.1.1.min.js" defer></script>
<script src="js/modernizr-2.8.3.min.js" defer></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
</head>
<body class="wy-body-for-nav" role="document">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side stickynav">
<div class="wy-side-scroll">
<div class="wy-side-nav-search">
<a href="." class="icon icon-home"> LosePrivacy API</a>
<div role="search">
<form id ="rtd-search-form" class="wy-form" action="./search.html" method="get">
<input type="text" name="q" placeholder="Search docs" title="Type search term here" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
<ul class="current">
<li class="toctree-l1 current"><a class="reference internal current" href=".">API</a>
<ul class="current">
<li class="toctree-l2"><a class="reference internal" href="#_1">概述</a>
<ul>
<li class="toctree-l3"><a class="reference internal" href="#_2">应用场景</a>
</li>
<li class="toctree-l3"><a class="reference internal" href="#_3">接入须知</a>
</li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="#loseprivacy-api-v1_1">LosePrivacy API v1接口列表</a>
<ul>
<li class="toctree-l3"><a class="reference internal" href="#_4">数据格式</a>
</li>
<li class="toctree-l3"><a class="reference internal" href="#_5">错误码简介</a>
</li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="#_6">访问认证</a>
<ul>
<li class="toctree-l3"><a class="reference internal" href="#api-key">获取 API KEY</a>
</li>
<li class="toctree-l3"><a class="reference internal" href="#_7">数据样例</a>
</li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="#_8">获得可以查询的敏感数据类型</a>
<ul>
<li class="toctree-l3"><a class="reference internal" href="#_9">数据请求</a>
<ul>
<li class="toctree-l4"><a class="reference internal" href="#_10">样例</a>
</li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="#_11">数据结果</a>
</li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="#_12">数据泄露事件数据:查询数据泄露事件及数据源</a>
<ul>
<li class="toctree-l3"><a class="reference internal" href="#_13">查询所有或部分的数据泄露事件的详细信息</a>
<ul>
<li class="toctree-l4"><a class="reference internal" href="#_14">数据请求</a>
</li>
<li class="toctree-l4"><a class="reference internal" href="#_16">数据结果</a>
</li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="#_17">查询某个数据泄露事件的详情</a>
<ul>
<li class="toctree-l4"><a class="reference internal" href="#_18">数据请求</a>
</li>
<li class="toctree-l4"><a class="reference internal" href="#_20">数据结果</a>
</li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="#_22">查询数据泄露事件的数据源</a>
<ul>
<li class="toctree-l4"><a class="reference internal" href="#_23">数据请求</a>
</li>
<li class="toctree-l4"><a class="reference internal" href="#_25">数据结果</a>
</li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="#_26">数据泄露专题数据:查询数据泄露专题及数据源</a>
<ul>
<li class="toctree-l3"><a class="reference internal" href="#_27">查询所有数据泄露专题的详细信息</a>
<ul>
<li class="toctree-l4"><a class="reference internal" href="#_28">数据请求</a>
</li>
<li class="toctree-l4"><a class="reference internal" href="#_30">数据结果</a>
</li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="#_31">查询某个数据泄露专题的详细信息</a>
<ul>
<li class="toctree-l4"><a class="reference internal" href="#_32">数据请求</a>
</li>
<li class="toctree-l4"><a class="reference internal" href="#_34">数据结果</a>
</li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="#_36">查询数据泄露专题的数据源</a>
<ul>
<li class="toctree-l4"><a class="reference internal" href="#_37">数据请求</a>
</li>
<li class="toctree-l4"><a class="reference internal" href="#_39">数据结果</a>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
<ul>
<li class="toctree-l1"><a class="reference internal" href="cli/">命令行工具</a>
</li>
</ul>
<ul>
<li class="toctree-l1"><a class="reference internal" href="about/">关于</a>
</li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" role="navigation" aria-label="top navigation">
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href=".">LosePrivacy API</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href=".">Docs</a> »</li>
<li>API</li>
<li class="wy-breadcrumbs-aside">
</li>
</ul>
<hr/>
</div>
<div role="main">
<div class="section">
<p><link rel="stylesheet" type="text/css" href="css/cus.css" /></p>
<h1 id="loseprivacy-api-v1">LosePrivacy API v1</h1>
<h2 id="_1">概述</h2>
<p>LosePrivacy API v1提供了对LosePrivacy收录的所有数据泄露事件、数据泄露专题及其数据源的查询功能。主要功能包括:</p>
<ul>
<li>展示所有已收录数据泄露事件的详细信息</li>
<li>对所有数据泄露事件的数据源进行基本的查询</li>
<li>展示所有LosePrivacy数据泄露事件专题的详细信息</li>
<li>对所有数据泄露专题的数据源进行基本的查询</li>
</ul>
<p>目前主要支持的查询类型至少包括:</p>
<ul>
<li>查询<strong>用户名</strong></li>
<li>查询<strong>密码</strong></li>
<li>查询<strong>身份证</strong></li>
<li>查询<strong>手机号</strong></li>
<li>查询<strong>邮箱</strong></li>
<li>查询<strong>QQ</strong></li>
<li>查询<strong>微博</strong></li>
<li>查询<strong>Facebook</strong></li>
</ul>
<h3 id="_2">应用场景</h3>
<p>利用LosePrivacy API提供的查询功能,开发者可以快速开发出很多有趣、实用的应用。例如:</p>
<ul>
<li>个人隐私相关的应用,例如查询个人隐私数据的泄露情况</li>
<li>私人服务相关的应用,例如帮助用户找回丢失的密码/账号</li>
<li>安全订阅相关的应用,例如当某些人的数据出现泄露,及时通知用户进行相应的防范</li>
<li>密码管理器相关的应用,例如当用户使用了高频的已泄露密码时及时通知用户</li>
<li>企业数据泄露相关的应用,例如当某些企业数据发生泄露时,帮助企业更准确地评估风险</li>
<li>Telegram机器人相关的应用,例如个人社工库、尽职调查等</li>
<li>其他数据挖掘相关应用,例如筛选排除高风险贷款用户等</li>
</ul>
<h3 id="_3">接入须知</h3>
<ul>
<li>请勿滥用API接口,有恶意进行攻击、妨碍他人使用等行为将会被限制使用API接口</li>
<li>请在应用中标注数据来源于LosePrivacy</li>
<li>API KEY和API网关地址在LosePrivacy官网的用户中心中获取</li>
</ul>
<h2 id="loseprivacy-api-v1_1">LosePrivacy API v1接口列表</h2>
<p>API网关地址在LosePrivacy官网的用户中心中可见。API网关地址不定期更换,但API接口保持稳定。</p>
<table>
<thead>
<tr>
<th>URL</th>
<th>简述</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>/api/v1/dataclasses</code></td>
<td>获取可查询的敏感数据类型</td>
</tr>
<tr>
<td><code>/api/v1/breaches</code></td>
<td>查询所有或某些类别的数据泄露事件</td>
</tr>
<tr>
<td><code>/api/v1/breach</code></td>
<td>查询某个数据泄露事件的详情</td>
</tr>
<tr>
<td><code>/api/v1/search_breach</code></td>
<td>查询数据泄露事件的数据源</td>
</tr>
<tr>
<td><code>/api/v1/topics</code></td>
<td>查询所有数据泄露专题的详细信息</td>
</tr>
<tr>
<td><code>/api/v1/topic</code></td>
<td>查询某个数据泄露专题的详细信息</td>
</tr>
<tr>
<td><code>/api/v1/search_topic</code></td>
<td>查询数据泄露专题的数据源</td>
</tr>
</tbody>
</table>
<h3 id="_4">数据格式</h3>
<p>LosePrivacy API v1所有的接口均返回json格式的内容,格式为:</p>
<pre><code>{
"code":错误码,
"msg":错误信息,
"data":具体数据包
}
</code></pre>
<h3 id="_5">错误码简介</h3>
<table>
<thead>
<tr>
<th>返回代码</th>
<th>解释</th>
</tr>
</thead>
<tbody>
<tr>
<td>200</td>
<td>OK, 成功</td>
</tr>
<tr>
<td>400</td>
<td>Bad Request, 参数错误</td>
</tr>
<tr>
<td>401</td>
<td>Unauthorised, 认证失败(API KEY不正确)</td>
</tr>
<tr>
<td>403</td>
<td>Forbidden, 如User-Agent的值不正确</td>
</tr>
<tr>
<td>404</td>
<td>Not found,未找到内容</td>
</tr>
<tr>
<td>429</td>
<td>Too many requests,请求频率过高</td>
</tr>
<tr>
<td>503</td>
<td>Service unavailable, 服务暂时不可用</td>
</tr>
</tbody>
</table>
<h2 id="_6">访问认证</h2>
<p>LosePrivacy API的所有接口调用需要进行身份认证。认证方式为API KEY,每次调用时需要将API KEY放入HTTP header(header头为<code>loseprivacy-auth-key</code>)中。另外,LosePrivacy API要求所有的http请求的user agent的值为:<code>loseprivacy</code></p>
<table>
<thead>
<tr>
<th>HTTP头</th>
<th>HTTP值</th>
</tr>
</thead>
<tbody>
<tr>
<td>loseprivacy-auth-key</td>
<td>你的API KEY</td>
</tr>
<tr>
<td>user-agent</td>
<td>loseprivacy</td>
</tr>
</tbody>
</table>
<p>若访问认证失败,对应的错误码如下:</p>
<table>
<thead>
<tr>
<th>返回代码</th>
<th>解释</th>
</tr>
</thead>
<tbody>
<tr>
<td>401</td>
<td>认证失败(API KEY不正确)</td>
</tr>
<tr>
<td>403</td>
<td>User-Agent的值不正确</td>
</tr>
</tbody>
</table>
<h3 id="api-key">获取 API KEY</h3>
<p>API KEY可以登录LosePrivacy官网后在用户中心中的开发者页面申请获得。请珍惜API KEY,切勿滥用或转借他人使用。API网关地址也发布在LosePrivacy官网中的用户中心中。</p>
<h3 id="_7">数据样例</h3>
<p>API KEY认证失败的数据包样例:</p>
<pre><code>{"code":401,"msg":"Unauthorised","data":null}
</code></pre>
<p>User Agent错误值的数据包样例:</p>
<pre><code>{"code":403,"msg":"Forbidden","data":null}
</code></pre>
<h2 id="_8">获得可以查询的敏感数据类型</h2>
<h3 id="_9">数据请求</h3>
<ul>
<li>Method: <code>GET/POST</code></li>
<li>URL: <code>/api/v1/dataclasses</code></li>
<li>Headers: <code>`Content-Type:application/json</code>- Parameters: 无</li>
</ul>
<h4 id="_10">样例</h4>
<ul>
<li>获得可以查询的数据类型:<code>/api/v1/dataclasses</code></li>
</ul>
<h3 id="_11">数据结果</h3>
<ul>
<li>Data: 数组。三元组:name(字段解释), field(字段名称), value(字段 ID)</li>
</ul>
<pre><code>{
"code":200,
"msg":"OK",
"data": [
{"name":"搜QQ号","field":"field_qq","value":"qq"},
{"name":"搜微博","field":"field_weibo","value":"weibo"},
{"name":"搜手机号","field":"field_phone","value":"phone"},
{"name":"搜邮箱","field":"field_email","value":"email"},
{"name":"搜用户名","field":"field_username","value":"username"},
{"name":"搜身份证","field":"field_identity","value":"identity"},
{"name":"搜密码","field":"field_password","value":"password"},
{"name":"搜Facebook","field":"field_facebook","value":"facebook"}
]
}
</code></pre>
<p>其中field或value后续可用于查询具体的数据源。</p>
<h2 id="_12">数据泄露事件数据:查询数据泄露事件及数据源</h2>
<h3 id="_13">查询所有或部分的数据泄露事件的详细信息</h3>
<h4 id="_14">数据请求</h4>
<ul>
<li>Method: <code>GET/POST</code></li>
<li>URL: <code>/api/v1/breaches</code></li>
<li>Headers: <code>Content-Type:application/json</code></li>
<li>Parameters:</li>
</ul>
<table>
<thead>
<tr>
<th>参数</th>
<th>是否必须</th>
<th>样例</th>
<th>解释</th>
</tr>
</thead>
<tbody>
<tr>
<td>field</td>
<td>否</td>
<td>?field=qq</td>
<td>筛选有特定数据类型(字段名称)的数据泄露事件</td>
</tr>
</tbody>
</table>
<pre><code>{
'field': <敏感数据类型,如field_username/field_qq/field_phone等,具体见敏感数据类型接口field字段>
}
</code></pre>
<h5 id="_15">样例</h5>
<ul>
<li>查询所有数据泄露事件:<code>/api/v1/breaches</code></li>
<li>查询泄露了用户名相关数据的数据泄露事件:<code>/api/v1/breaches?field=username</code></li>
</ul>
<h4 id="_16">数据结果</h4>
<ul>
<li>data: 符合查询条件的结果,以数组形式</li>
</ul>
<pre><code>{
"code":200,
"msg":'OK',
"data": [
{
"id":9,
"name":"QQ",
"title":"QQ用户数据",
"domain":"https:\/\/qq.com",
"description":"2018年泄露的QQ用户数据,主要涉及QQ用户的手机绑定信息......",
"breach_time":1574352000,
"update_time":1651517895,
"logo":"\/static\/upload\/breach\/9\/logo.jpg",
"author_name":"佚名",
"breach_count":668304163,
...
},
{
"id":10,
"name":"微博",
"title":"微博用户数据",
...
}
]
}
</code></pre>
<h3 id="_17">查询某个数据泄露事件的详情</h3>
<h4 id="_18">数据请求</h4>
<ul>
<li>Method: <code>GET/POST</code></li>
<li>URL: <code>/api/v1/breach</code></li>
<li>Headers: <code>Content-Type:application/json</code></li>
<li>Parameters: </li>
</ul>
<table>
<thead>
<tr>
<th>参数</th>
<th>是否必须</th>
<th>样例</th>
<th>解释</th>
</tr>
</thead>
<tbody>
<tr>
<td>breach_id</td>
<td>是</td>
<td>?breach_id=1</td>
<td>根据ID筛选某个数据泄露事件。每个泄露事件的ID数固定的</td>
</tr>
</tbody>
</table>
<h5 id="_19">样例</h5>
<ul>
<li>可以查询网易邮箱数据泄露事件详情:<code>/api/v1/breach?breach_id=1</code></li>
</ul>
<h4 id="_20">数据结果</h4>
<ul>
<li>Data: 数据泄露事件详情,breach和catelist。</li>
</ul>
<table>
<thead>
<tr>
<th>返回值</th>
<th>解释</th>
</tr>
</thead>
<tbody>
<tr>
<td>breach</td>
<td>数据泄露事件的详细信息</td>
</tr>
<tr>
<td>catelist</td>
<td>数据源中可查询的数据类型</td>
</tr>
</tbody>
</table>
<h5 id="_21">样例</h5>
<pre><code>{
"code":200,
"msg":"OK",
"data":
{
"breach":
{
"id":1,
"name":"网易邮箱",
"title":"网易邮箱数据",
"domain":"https:\/\/163.com",
"description":"...",
"breach_time":1450800000,
"download":"...",
......
},
"catelist":
[
{
"name":"邮箱",
"field":"field_email",
"value":"email"
},
{
"name":"密码",
"field":"field_password",
"value":"password"
}
]
}
}
</code></pre>
<h3 id="_22">查询数据泄露事件的数据源</h3>
<h4 id="_23">数据请求</h4>
<ul>
<li>Method: <code>GET/POST</code></li>
<li>URL: <code>/api/v1/search_breach</code></li>
<li>Headers: <code>Content-Type:application/json</code></li>
<li>Parameters:</li>
</ul>
<table>
<thead>
<tr>
<th>参数</th>
<th>是否必须</th>
<th>样例</th>
<th>解释</th>
</tr>
</thead>
<tbody>
<tr>
<td>breach_id</td>
<td>是</td>
<td>?breach_id=1</td>
<td>指定查询数据泄露事件ID为1的数据源</td>
</tr>
<tr>
<td>field_value</td>
<td>是</td>
<td>?field_value=qq</td>
<td>查询的关键词所在的字段ID</td>
</tr>
<tr>
<td>keyword</td>
<td>是</td>
<td>?keyword=18647547584</td>
<td>查询关键词</td>
</tr>
</tbody>
</table>
<h5 id="_24">样例</h5>
<ul>
<li>URL: <code>/api/v1/search_breach?breach_id=1&field_value=email&keyword=10086</code></li>
</ul>
<h4 id="_25">数据结果</h4>
<ul>
<li>Data:符合查询结果的数据结果,数组形式(若查询结果较多,最多返回256条信息)。样例:</li>
</ul>
<pre><code>{"code":200,"msg":"OK","data":[[{"id":89668455,"breach_id":0,"email":"10086","password":"610555586"}]]}
</code></pre>
<h2 id="_26">数据泄露专题数据:查询数据泄露专题及数据源</h2>
<h3 id="_27">查询所有数据泄露专题的详细信息</h3>
<h4 id="_28">数据请求</h4>
<ul>
<li>Method: <code>GET/POST</code></li>
<li>URL: <code>/api/v1/topics</code></li>
<li>Headers: <code>Content-Type:application/json</code></li>
<li>Parameters: 无</li>
</ul>
<h5 id="_29">样例</h5>
<ul>
<li>查询所有数据泄露专题:<code>/api/v1/topics</code></li>
</ul>
<h4 id="_30">数据结果</h4>
<ul>
<li>Data:符合查询结果的专题详情。</li>
</ul>
<h3 id="_31">查询某个数据泄露专题的详细信息</h3>
<h4 id="_32">数据请求</h4>
<ul>
<li>Method: <code>GET/POST</code></li>
<li>URL: <code>/api/v1/topic</code></li>
<li>Headers: <code>Content-Type:application/json</code></li>
<li>Parameters: topic_id</li>
</ul>
<table>
<thead>
<tr>
<th>参数</th>
<th>是否必须</th>
<th>样例</th>
<th>解释</th>
</tr>
</thead>
<tbody>
<tr>
<td>topic_id</td>
<td>是</td>
<td>?breach_id=1</td>
<td>指定查询数据泄露专题ID为1的数据源</td>
</tr>
</tbody>
</table>
<h5 id="_33">样例</h5>
<ul>
<li>查询数据泄露专题ID为1的信息:<code>/api/v1/topic?topic_id=1</code></li>
</ul>
<h4 id="_34">数据结果</h4>
<ul>
<li>Data:符合查询结果的专题详情,包括topic和catelist字段,</li>
</ul>
<table>
<thead>
<tr>
<th>返回值</th>
<th>解释</th>
</tr>
</thead>
<tbody>
<tr>
<td>topic</td>
<td>数据泄露专题的详细信息</td>
</tr>
<tr>
<td>catelist</td>
<td>数据源中可查询的数据类型</td>
</tr>
</tbody>
</table>
<h5 id="_35">样例</h5>
<pre><code>{
"code":200,
"msg":"OK",
"data":
{
"topic":
{
"id":1,
"name":"QQ群关系数据",
"desc":"QQ所有的QQ群关系数据......",
"status":1,
"cover_url":"\/static\/upload\/topic\/ee\/02cfde2afb899fc377105e64cf084b.png",
"create_time":1651681867,
"update_time":1651812774,
......
},
"catelist":
[
{"name":"搜QQ群号","value":"qqgroup"}
]
}
}
</code></pre>
<h3 id="_36">查询数据泄露专题的数据源</h3>
<h4 id="_37">数据请求</h4>
<ul>
<li>Method: <code>GET/POST</code></li>
<li>URL: <code>/api/v1/search_topic</code></li>
<li>Headers: <code>Content-Type:application/json</code></li>
<li>Parameters:</li>
</ul>
<table>
<thead>
<tr>
<th>参数</th>
<th>是否必须</th>
<th>样例</th>
<th>解释</th>
</tr>
</thead>
<tbody>
<tr>
<td>topic_id</td>
<td>是</td>
<td>?topic_id=1</td>
<td>指定查询数据泄露事件ID为1的数据源</td>
</tr>
<tr>
<td>field_value</td>
<td>是</td>
<td>?field_value=qqgroup</td>
<td>查询的关键词所在的字段ID</td>
</tr>
<tr>
<td>keyword</td>
<td>是</td>
<td>?keyword=18647547584</td>
<td>查询关键词</td>
</tr>
<tr>
<td>自定义,由返回值确定</td>
<td>否</td>
<td>?table=td_gov_company_abnormal</td>
<td>连续查询参数</td>
</tr>
</tbody>
</table>
<h5 id="_38">样例</h5>
<ul>
<li>URL: <code>/api/v1/search_topic?topic_id=1&field_value=email&keyword=10086</code></li>
<li>URL:<code>/api/v1/search_topic?keyword=北京字节跳动科技有限公司&field_value=company&topic_id=2</code></li>
</ul>
<h4 id="_39">数据结果</h4>
<ul>
<li>Data:符合查询结果的数据结果(若查询结果较多,最多返回256条信息)。</li>
</ul>
<table>
<thead>
<tr>
<th>返回值</th>
<th>是否可选</th>
<th>解释</th>
</tr>
</thead>
<tbody>
<tr>
<td>查询结果json</td>
<td>否</td>
<td>查询结果</td>
</tr>
<tr>
<td>subcommands</td>
<td>是</td>
<td>后续继续查询时需要提供的请求参数</td>
</tr>
</tbody>
</table>
<h5 id="subcommands">没有subcommands的返回值样例</h5>
<pre><code>{"code":200,"msg":"OK","data":[[{"id":89668455,"breach_id":0,"email":"10086","password":"610555586"}]]}
</code></pre>
<h5 id="subcommands_1">有subcommands的返回值样例</h5>
<pre><code>{
"code":200,
"msg":"OK",
"data":
{
"公司基本信息":
[
{
"id":5320886,
"company_id":18310359,"unified_code":"911101085923662400","ent_name":"北京字节跳动科技有限公司","
reg_capital":"1,000万(元)",
"real_capital":"-",
"reg_no":"911101085923662400",
"ent_type":"有限责任公司",
...
}
],
"subcommands":
[
"table=td_gov_company_abnormal",
"table=td_gov_company_announcementcourt",
"table=td_gov_company_basic",
]
}
}
</code></pre>
<p>对于有subcommands返回值的部分,subcommands数组指定了后续每次请求时需要携带的参数。为了获取更完整的查询内容,首次调用请求:</p>
<pre><code>/api/v1/search_topic?keyword=北京字节跳动科技有限公司&field_value=company&topic_id=2
</code></pre>
<p>之后可以根据subcommands的内容依次进行后续调用:</p>
<pre><code>/api/v1/search_topic?keyword=北京字节跳动科技有限公司&field_value=company&topic_id=2&table=td_gov_company_abnormal
</code></pre>
<pre><code>/api/v1/search_topic?keyword=北京字节跳动科技有限公司&field_value=company&topic_id=2&table=td_gov_company_announcementcourt
</code></pre>
<pre><code>/api/v1/search_topic?keyword=北京字节跳动科技有限公司&field_value=company&topic_id=2&table=td_gov_company_basic
</code></pre>
</div>
</div>
<div style="text-align:center;">LosePrivacy API</div>
<br />
<div style="text-align:center;">
<a href="https://loseprivacy.net"><i class="fa fa-home">LosePrivacy隐私查询器官网</i></a> |
<a href="https://twitter.com/loseprivacy"><i class="fa fa-twitter">LosePrivacy Twitter</i></a></div>
</div>
</div>
</section>
</div>
<div class="rst-versions" role="note" aria-label="versions">
<span class="rst-current-version" data-toggle="rst-current-version">
<span style="margin-left: 15px"><a href="cli/" style="color: #fcfcfc">Next »</a></span>
</span>
</div>
<script>var base_url = '.';</script>
<script src="js/theme.js" defer></script>
<script src="search/main.js" defer></script>
<script defer>
window.onload = function () {
SphinxRtdTheme.Navigation.enable(true);
};
</script>
</body>
</html>
<!--
MkDocs version : 1.1.2
Build Date UTC : 2022-05-08 19:12:34.799367+00:00
-->