Repository navigation
Expand file tree
/
Copy pathopenapi.yaml
More file actions
872 lines (872 loc) · 27 KB
/
Copy pathopenapi.yaml
File metadata and controls
872 lines (872 loc) · 27 KB
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
openapi: 3.1.0
info:
title: lev8 API
version: "1.0"
license:
name: Proprietary
identifier: LicenseRef-Proprietary
servers:
- url: https://app.lev8.com
components:
securitySchemes:
ApiKeyAuth:
type: http
scheme: bearer
x-default: "lev8_live_..."
schemas:
ErrorEnvelope:
type: object
properties:
object:
type: string
const: error
error:
type: object
properties:
type:
type: string
message:
type: string
param:
type:
- string
- "null"
request_id:
type:
- string
- "null"
EntitySearchCreateTaskRequest:
type: object
additionalProperties: false
allOf:
- if:
required:
- entity_type
properties:
entity_type:
enum:
- xiaohongshu
- wechat
then:
required:
- enable_web_search
properties:
enable_web_search:
const: true
required:
- entity_type
- objective
properties:
entity_type:
type: string
description: 'Entity type to search. Use `wechat` for WeChat Official Account search. `xiaohongshu` and `wechat` require `enable_web_search: true` and usually take 1 to 2 minutes to produce results.'
enum:
- person
- company
- twitter_creator
- youtube_creator
- tiktok_creator
- instagram_creator
- shopify_store
- xiaohongshu
- wechat
x-default: "company"
example: company
objective:
type: string
minLength: 1
description: Natural-language objective, at most 4,000 UTF-8 bytes after trimming.
x-default: "AI startups that raised Series A in 2024"
example: "AI startups that raised Series A in 2024"
limit:
type: integer
minimum: 1
maximum: 500
default: 20
x-default: 20
example: 20
enable_web_search:
type: boolean
description: 'Keeps database search and additionally enables open web search mode. Required and must be `true` when `entity_type` is `xiaohongshu` or `wechat`; false or omitted returns `422 invalid_request_error`. Xiaohongshu and WeChat Official Account searches usually take 1 to 2 minutes to produce results.'
default: false
x-default: false
example: false
enrich_fields:
type:
- array
- "null"
description: Extra fields to return under `entities[].enrich_fields`, up to 20 items. Use this for descriptive attributes such as funding stage or headcount. It is not suitable for finding email addresses or phone numbers; use Contact Search for contact details.
items:
type: string
maxItems: 20
x-default:
- funding stage
- headcount
example:
- funding stage
- headcount
dedup_lev8_leads:
type: array
maxItems: 100
items:
type: string
x-default: []
example: []
dedup_custom_leads:
type: array
maxItems: 1000
items:
type: string
x-default: []
example: []
EntitySearchTask:
type: object
properties:
object:
type: string
const: entity_search_task
leads_search_id:
type: string
example: leads_search_01JABCDEF123456789
entity_type:
type: string
description: Entity type used by the task.
enum:
- person
- company
- twitter_creator
- youtube_creator
- tiktok_creator
- instagram_creator
- shopify_store
- xiaohongshu
- wechat
example: company
objective:
type: string
example: AI startups that raised Series A in 2024
limit:
type: integer
example: 20
status:
type: string
example: created
created_at:
type: string
format: date-time
example: "2026-08-04T00:00:00Z"
EntitySearchStatus:
type: object
properties:
object:
type: string
const: entity_search_status
leads_search_id:
type: string
example: leads_search_01JABCDEF123456789
status:
type: object
properties:
status:
type: string
enum:
- created
- running
- done
- error
example: running
verified_count:
type: integer
minimum: 0
example: 12
ready_count:
type: integer
minimum: 0
example: 10
stop_reason:
type: string
example: source_finished
error:
type: string
const: internal error
EntitySearchItems:
type: object
properties:
object:
type: string
const: entity_search_items
leads_search_id:
type: string
example: leads_search_01JABCDEF123456789
status:
type: string
example: running
pts:
type: integer
example: 0
num:
type: integer
example: 5
count:
type: integer
example: 5
ready_count:
type: integer
example: 10
limit:
type: integer
example: 20
entities:
type: array
items:
type: object
properties:
name:
type: string
example: Figure AI
links:
type: object
additionalProperties:
type: string
example:
website: https://www.figure.ai
linkedin_url: https://www.linkedin.com/company/figure-ai
description:
type:
- string
- "null"
example: AI robotics company building general purpose humanoid robots.
score:
type: object
properties:
score:
type: string
example: high
reason:
type: string
example: "..."
enrich_fields:
type: object
additionalProperties:
type: object
properties:
content:
type: string
reference:
type: string
example:
funding stage:
content: Series B
reference: "..."
ContactSearchRequest:
type: object
additionalProperties: false
required:
- contact_type
- objective
properties:
contact_type:
type: string
enum:
- email
- phone
x-default: "email"
example: email
objective:
type: string
minLength: 1
maxLength: 4000
x-default: "Find the work email of Jane Smith, VP of Engineering at Acme Corp. Owner signals: linkedin_url=https://www.linkedin.com/in/jane-smith-acme"
example: "Find the work email of Jane Smith, VP of Engineering at Acme Corp. Owner signals: linkedin_url=https://www.linkedin.com/in/jane-smith-acme"
ContactSearchResult:
type: object
properties:
object:
type: string
const: contact_search_result
request:
$ref: "#/components/schemas/ContactSearchRequest"
result:
type: object
properties:
content:
type:
- string
- "null"
example: jane.smith@acmecorp.com
reference:
type:
- string
- "null"
example: "..."
created_at:
type: string
format: date-time
example: "2026-07-29T00:00:00Z"
DeepSearchRequest:
type: object
additionalProperties: false
required:
- query
properties:
query:
type: string
minLength: 1
maxLength: 4000
description: Natural-language research question to answer with Deep Search.
x-default: "What does OpenAI do and who is its CEO?"
example: "What does OpenAI do and who is its CEO?"
DeepSearchResponse:
type: object
additionalProperties: false
required:
- success
- answer
properties:
success:
type: boolean
example: true
answer:
description: Any non-null JSON value returned by Deep Search. Clients must not assume a fixed string or object shape.
type:
- object
- array
- string
- number
- boolean
example:
Citations: []
Result: OpenAI is an AI research and product company. Its CEO is Sam Altman.
EnrichRequest:
type: object
additionalProperties: false
required:
- entity_context
- enrich_fields
properties:
entity_context:
type: string
minLength: 1
description: Context for the entity to enrich, such as name, website, social handles, or an existing description. Maximum 16 KiB after trimming.
x-default: "Company: OpenAI\nWebsite: https://openai.com"
example: "Company: OpenAI\nWebsite: https://openai.com"
enrich_fields:
type: object
required:
- type
- properties
properties:
type:
type: string
const: object
properties:
type: object
minProperties: 1
additionalProperties: true
description: Object JSON Schema that describes the fields to generate. Maximum 256 KiB, 12 levels, and 200 cumulative properties.
additionalProperties: true
example:
type: object
properties:
company_summary:
type: string
ceo:
type: string
required:
- company_summary
- ceo
EnrichResponse:
type: object
additionalProperties: false
required:
- success
- answer
properties:
success:
type: boolean
example: true
answer:
type: object
description: Enrichment result. Successful responses try to match the requested `enrich_fields` JSON Schema.
additionalProperties: true
example:
company_summary: OpenAI is an AI research and product company.
ceo: Sam Altman
ExtractRequest:
type: object
additionalProperties: false
required:
- type
- target
properties:
type:
type: string
enum:
- x_followers
- x_following
- github_user_followers
- github_user_following
- github_repo_stargazers
- github_repo_contributors
- ins_followers
- ins_following
- tiktok_followers
- tiktok_following
- web2list
description: Extraction type. `web2list` extracts a structured list from a web page; the other values return social or GitHub lists.
x-default: web2list
example: web2list
target:
type: string
minLength: 1
maxLength: 2048
description: Account handle, GitHub repository, repository URL, or web page URL to extract from.
x-default: "https://www.forbes.com/30-under-30/2026/ai"
example: "https://www.forbes.com/30-under-30/2026/ai"
instruction:
type:
- string
- "null"
maxLength: 4000
description: Required for `web2list`. Describes the list items and fields to extract.
x-default: "Extract all 30 Under 30 names, companies, and positions from the AI category list"
example: "Extract all 30 Under 30 names, companies, and positions from the AI category list"
limit:
type: integer
minimum: 1
maximum: 10000
default: 100
description: Maximum number of social or GitHub list results. `web2list` ignores this field.
x-default: 100
example: 20
ExtractMetadata:
type: object
properties:
type:
$ref: "#/components/schemas/ExtractRequest/properties/type"
target:
type: string
example: "https://www.forbes.com/30-under-30/2026/ai"
instruction:
type:
- string
- "null"
example: "Extract name and company"
limit:
type: integer
example: 100
ExtractResponse:
type: object
additionalProperties: false
required:
- success
- data
- metadata
properties:
success:
type: boolean
example: true
data:
description: Extracted list data on success, or a failure reason string when `success` is false.
oneOf:
- type: array
items:
type: object
additionalProperties: true
- type: string
example:
- name: Example Person
company: Example Co
metadata:
$ref: "#/components/schemas/ExtractMetadata"
CreditBalance:
type: object
properties:
object:
type: string
const: credit_balance
available_credits:
type: integer
example: 125
updated_at:
type: string
example: "2026-08-03 17:30:00"
next_credit_refresh_at:
type: string
example: "2026-09-03 17:30:00"
security:
- ApiKeyAuth: []
paths:
/v1/entity-search/create_task:
post:
summary: Create task
description: 'Create an asynchronous Entity Search task. Use `wechat` for WeChat Official Account search. `xiaohongshu` and `wechat` tasks require `enable_web_search: true` and usually take 1 to 2 minutes to produce results.'
operationId: createEntitySearchTask
parameters:
- name: Idempotency-Key
in: header
required: false
description: Optional stable key for this logical task. When omitted, lev8 generates one and returns it in the response Header.
schema:
type: string
maxLength: 128
requestBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/EntitySearchCreateTaskRequest"
example:
entity_type: company
objective: AI startups that raised Series A in 2024
limit: 20
enable_web_search: false
enrich_fields:
- funding stage
- headcount
dedup_lev8_leads: []
dedup_custom_leads: []
responses:
"200":
description: Task created.
headers:
Idempotency-Key:
description: The supplied or server-generated idempotency key.
schema:
type: string
content:
application/json:
schema:
$ref: "#/components/schemas/EntitySearchTask"
"401":
description: Missing or invalid API key.
"402":
description: Insufficient credits.
"403":
description: API key is forbidden or lacks Entity Search access.
"409":
description: Idempotency conflict, unresolved task creation, or an expired replay window.
"422":
description: 'Validation failed, including omitted or false `enable_web_search` for `xiaohongshu` or `wechat`.'
"429":
description: Active-task concurrency limit reached.
"500":
description: Server error.
"503":
description: Entity Search or pricing is not enabled.
/v1/entity-search/status:
get:
summary: Get status
description: Check Entity Search task progress and readable result count.
operationId: getEntitySearchStatus
parameters:
- name: leads_search_id
in: query
required: true
schema:
type: string
minLength: 1
maxLength: 128
x-default: leads_search_01JABCDEF123456789
example: leads_search_01JABCDEF123456789
responses:
"200":
description: Task status.
content:
application/json:
schema:
$ref: "#/components/schemas/EntitySearchStatus"
"401":
description: Missing or invalid API key.
"403":
description: API key is forbidden or lacks Entity Search access.
"404":
description: Task not found or belongs to another API key.
"422":
description: Query validation failed.
"500":
description: Server error.
"503":
description: Entity Search is not enabled.
/v1/entity-search/fetch:
get:
summary: Fetch results
description: Read available Entity Search results by position.
operationId: fetchEntitySearchResults
parameters:
- name: leads_search_id
in: query
required: true
schema:
type: string
minLength: 1
x-default: leads_search_01JABCDEF123456789
example: leads_search_01JABCDEF123456789
- name: pts
in: query
required: false
schema:
type: integer
minimum: 0
default: 0
x-default: 0
example: 0
- name: num
in: query
required: false
schema:
type: integer
minimum: 1
maximum: 500
default: 5
x-default: 5
example: 5
responses:
"200":
description: Current result items.
content:
application/json:
schema:
$ref: "#/components/schemas/EntitySearchItems"
"401":
description: Missing or invalid API key.
"403":
description: API key is forbidden or lacks Entity Search access.
"404":
description: Task not found or belongs to another API key.
"422":
description: Query validation failed.
"500":
description: Server error.
"503":
description: Entity Search is not enabled.
/v1/contact-search:
post:
summary: Search contact
description: Find an email address or phone number for one contact.
operationId: contactSearch
parameters:
- name: Idempotency-Key
in: header
required: false
description: Optional stable key for this logical lookup. When omitted, lev8 generates one and returns it in the response Header.
schema:
type: string
maxLength: 128
requestBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/ContactSearchRequest"
example:
contact_type: email
objective: "Find the work email of Jane Smith, VP of Engineering at Acme Corp. Owner signals: linkedin_url=https://www.linkedin.com/in/jane-smith-acme"
responses:
"200":
description: Contact search result.
headers:
Idempotency-Key:
description: The supplied or server-generated idempotency key.
schema:
type: string
content:
application/json:
schema:
$ref: "#/components/schemas/ContactSearchResult"
"401":
description: Missing or invalid API key.
"402":
description: Insufficient credits.
"403":
description: API key is forbidden or lacks Contact Search access.
"409":
description: Idempotency conflict or no completed response is available to replay.
"422":
description: Validation failed.
"429":
description: Concurrency limit reached.
"500":
description: Server error.
"503":
description: Contact Search or pricing is not enabled.
/v1/deep-search:
post:
summary: Run deep search
description: Answer a natural-language research question synchronously.
operationId: runDeepSearch
parameters:
- name: Idempotency-Key
in: header
required: false
description: Optional stable key for this logical request. When omitted, lev8 generates one and returns it in the response Header.
schema:
type: string
maxLength: 128
requestBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/DeepSearchRequest"
example:
query: What does OpenAI do and who is its CEO?
responses:
"200":
description: Deep Search answer.
headers:
Idempotency-Key:
description: The supplied or server-generated idempotency key.
schema:
type: string
content:
application/json:
schema:
$ref: "#/components/schemas/DeepSearchResponse"
"401":
description: Missing or invalid API key.
"402":
description: Insufficient credits.
"403":
description: API key is forbidden or lacks Deep Search access.
"409":
description: Idempotency conflict or no completed response is available to replay.
"422":
description: Validation failed.
"429":
description: Concurrency limit reached.
"500":
description: Server error.
"503":
description: Deep Search is not enabled.
/v1/enrich:
post:
summary: Enrich entity
description: Generate structured fields for an entity from context and a JSON Schema.
operationId: enrichEntity
parameters:
- name: Idempotency-Key
in: header
required: false
description: Optional stable key for this logical request. When omitted, lev8 generates one and returns it in the response Header.
schema:
type: string
maxLength: 128
requestBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/EnrichRequest"
example:
entity_context: "Company: OpenAI\nWebsite: https://openai.com"
enrich_fields:
type: object
properties:
company_summary:
type: string
ceo:
type: string
required:
- company_summary
- ceo
responses:
"200":
description: Enrichment result.
headers:
Idempotency-Key:
description: The supplied or server-generated idempotency key.
schema:
type: string
content:
application/json:
schema:
$ref: "#/components/schemas/EnrichResponse"
"401":
description: Missing or invalid API key.
"402":
description: Insufficient credits.
"403":
description: API key is forbidden or lacks Enrich access.
"409":
description: Idempotency conflict or no completed response is available to replay.
"422":
description: Validation failed.
"429":
description: Concurrency limit reached.
"500":
description: Server error.
"503":
description: Enrich is not enabled.
/v1/extract:
post:
summary: Extract data
description: Extract social, GitHub, or web page lists synchronously.
operationId: extractData
parameters:
- name: Idempotency-Key
in: header
required: false
description: Optional stable key for this logical request. When omitted, lev8 generates one and returns it in the response Header.
schema:
type: string
maxLength: 128
requestBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/ExtractRequest"
example:
type: web2list
target: "https://www.forbes.com/30-under-30/2026/ai"
instruction: Extract all 30 Under 30 names, companies, and positions from the AI category list
limit: 20
responses:
"200":
description: Extracted data.
headers:
Idempotency-Key:
description: The supplied or server-generated idempotency key.
schema:
type: string
content:
application/json:
schema:
$ref: "#/components/schemas/ExtractResponse"
"401":
description: Missing or invalid API key.
"402":
description: Insufficient credits.
"403":
description: API key is forbidden or lacks Extract access.
"409":
description: Idempotency conflict or no completed response is available to replay.
"422":
description: Validation failed.
"429":
description: Concurrency limit reached.
"500":
description: Server error.
"503":
description: Extract is not enabled.
/v1/credit/balance:
get:
summary: Get balance
description: Query available credits for the billing account attached to an API key.
operationId: getCreditBalance
responses:
"200":
description: Credit balance.
content:
application/json:
schema:
$ref: "#/components/schemas/CreditBalance"
"401":
description: Missing or invalid API key.
"403":
description: API key is revoked or expired.
"500":
description: Server error.
"503":
description: API is not enabled.