-
Notifications
You must be signed in to change notification settings - Fork 0
/
schema.graphql
916 lines (754 loc) · 19.3 KB
/
schema.graphql
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
type Business {
"""
Yelp alias of this business.
"""
alias: String
"""
Business attributes.
"""
attributes: BusinessAttributes
"""
A list of category title and alias pairs associated with this business.
"""
categories: [Category]
"""
The coordinates of this business.
"""
coordinates: Coordinates
"""
Phone number of the business formatted nicely to be displayed to users. The format is the standard phone number format for the business's country.
"""
display_phone: String
"""
When searching, this provides the distance of the business from the search location in meters
"""
distance: Float
"""
Opening hours of the business.
"""
hours: [Hours]
"""
Yelp ID of this business.
"""
id: String
"""
Whether business has been claimed by a business owner.
"""
is_claimed: Boolean
"""
Whether business has been (permanently) closed.
"""
is_closed: Boolean
"""
The location of this business, including address, city, state, postal code and country.
"""
location: Location
"""
Information and action links for messaging with this business via Yelp, including requesting quotes.
"""
messaging: BusinessMessaging
"""
Name of this business.
"""
name: String
"""
Phone number of the business.
"""
phone: String
"""
URLs of up to three photos of the business.
"""
photos: [String]
"""
Price level of the business. Value is one of $, $$, $$$ and $$$$ or null if we don't have price available for the business.
"""
price: String
"""
Rating for this business (value ranges from 1, 1.5, ... 4.5, 5).
"""
rating: Float
"""
Number of reviews for this business.
"""
review_count: Int
"""
Review snippets from the business.
"""
reviews(limit: Int, offset: Int): [Review]
"""
Special hours of the business, these override regular opening hours of the business.
"""
special_hours: [SpecialHours]
"""
Information and action links for transacting with this business online.
"""
transactions: Transactions
"""
URL for business page on Yelp.
"""
url: String
}
type BusinessAttribute {
"""
The machine-friendly name of this business attribute.
"""
name_code: String
"""
The machine-friendly value of this business attribute.
"""
value_code: String
}
type BusinessAttributes {
"""
Whether business has gender neutral restrooms. See https://www.yelpblog.com/2017/06/find-gender-neutral-restrooms-160000-businesses-yelp for more details.
"""
gender_neutral_restrooms: BusinessAttribute
"""
Whether business has opted in to the "Open to All" pledge. See https://www.yelpblog.com/2018/07/opentoall for more details.
"""
open_to_all: BusinessAttribute
"""
Whether business is wheelchair accessible.
"""
wheelchair_accessible: BusinessAttribute
}
type BusinessMessaging {
"""
Visit this action link URL to go directly into the business messaging flow for this business.
"""
url: String
"""
The localized text description of the type of messaging this business is enabled for. Example: "Request a Quote"
"""
use_case_text: String
}
type BusinessUser {
"""
Name of the business user.
"""
name: String
"""
URL of the business user's profile photo.
"""
photo_url: String
"""
Business role for the business user.
"""
role: String
}
type Businesses {
"""
A list of business Yelp finds based on the search criteria.
"""
business: [Business]
"""
Total number of businesses found.
"""
total: Int
}
type Categories {
"""
The category objects.
"""
category: [Category]
"""
Total number of categories.
"""
total: Int
}
type Category {
"""
Alias of a category, when searching for business in certain categories, use alias rather than the title.
"""
alias: String
"""
Countries for which this category is blacklisted.
"""
country_blacklist: [Country]
"""
Countries for which this category is whitelisted.
"""
country_whitelist: [Country]
"""
List of parent categories.
"""
parent_categories: [Category]
"""
Title of a category for display purposes.
"""
title: String
}
type Coordinates {
"""
The latitude of this business.
"""
latitude: Float
"""
The longitude of this business.
"""
longitude: Float
}
type Country {
"""
The ISO 3166-1 alpha-2 code for this country.
"""
code: String
"""
Supported locales with this country.
"""
locales: [Locale]
}
"""
The `Date` scalar type represents a Date
value as specified by
[iso8601](https://en.wikipedia.org/wiki/ISO_8601).
"""
scalar Date
"""
The `DateTime` scalar type represents a DateTime
value as specified by
[iso8601](https://en.wikipedia.org/wiki/ISO_8601).
"""
scalar DateTime
type Event {
"""
Number of Yelp users attending this event.
"""
attending_count: String
"""
The business tied to this event.
"""
business: Business
"""
The ID of the related business.
"""
business_id: String
"""
The category of this event.
"""
category: String
"""
Cost of attending this event.
"""
cost: Int
"""
Maximum cost of this event.
"""
cost_max: Int
"""
Description excerpt of this event.
"""
description: String
"""
Yelp page of this event.
"""
event_site_url: String
"""
Event id.
"""
id: String
"""
Yelp image url of this event.
"""
image_url: String
"""
Number of Yelp users interested in attending this event.
"""
interested_count: String
"""
Whether this event is canceled.
"""
is_canceled: Boolean
"""
Whether this event is free.
"""
is_free: Boolean
"""
Whether this event is created by a Yelp community manager.
"""
is_official: Boolean
"""
Latitude of this event.
"""
latitude: Float
"""
The location of this business, including address, city, state, postal code and country.
"""
location: Location
"""
Longitude of this event.
"""
longitude: Float
"""
Name of this event.
"""
name: String
"""
URL to buy tickets for this event.
"""
tickets_url: String
"""
Time this event ends. Returns time and date in the following format - "YYYY-MM-DD HH-mm".
"""
time_end: String
"""
Time the event starts. Returns time and date in the following format - "YYYY-MM-DD HH-mm".
"""
time_start: String
}
type Events {
"""
List of events found matching search criteria.
"""
events: [Event]
"""
Total number of events found.
"""
total: Int
}
type Hours {
"""
The type of the opening hours information. Right now, this is always REGULAR.
"""
hours_type: String
"""
Describes if the business is open now.
"""
is_open_now: Boolean
"""
The specific open hours and days for a business.
"""
open: [OpenHours]
}
type Language {
"""
The ISO 639-1 alpha-2 code for this language. When such a code is unavailable for a language, it will be a ISO 639-2 alpha-3 code instead.
"""
code: String
"""
Supported locales with this language.
"""
locales: [Locale]
}
type Locale {
"""
The code for this locale, in the format of {language_code}_{country_code}.
"""
code: String
"""
The country component of this locale.
"""
country: Country
"""
The language component of this locale.
"""
language: Language
}
type Location {
"""
Street address of this business.
"""
address1: String
"""
Street address of this business, continued.
"""
address2: String
"""
Street address of this business, continued.
"""
address3: String
"""
City of this business.
"""
city: String
"""
ISO 3166-1 alpha-2 country code of this business.
"""
country: String
"""
Array of strings that if organized vertically give an address that is in the standard address format for the business's country.
"""
formatted_address: String
"""
Postal code of this business.
"""
postal_code: String
"""
ISO 3166-2 (with a few exceptions) state code of this business.
"""
state: String
}
"""
An enumeration.
"""
enum MatchThreshold {
DEFAULT
NONE
STRICT
}
type OpenHours {
"""
From 0 to 6, representing day of the week from Monday to Sunday. Notice that you may get the same day of the week more than once if the business has more than one opening time slots.
"""
day: Int
"""
End of the opening hours in a day, in 24-hour clock notation, like 2130 means 9:30 PM.
"""
end: String
"""
Whether the business opens overnight or not. When this is true, the end time will be lower than the start time.
"""
is_overnight: Boolean
"""
Start of the opening hours in a day, in 24-hour clock notation, like 1000 means 10 AM.
"""
start: String
}
type PublicReviewResponse {
"""
Details about business user associated with the business who posted this public review response comment.
"""
business_user: BusinessUser
"""
Text of this public review response.
"""
text: String
"""
The time that this public review response was created in ISO8601 format.
"""
time_created: DateTime
}
type Query {
"""
Load information about a specific business.
"""
business(
"""
The Yelp ID for the business you want to load.
"""
id: String
): Business
"""
Match detailed business location data to businesses on Yelp.
"""
business_match(
"""
Required. The first line of the business’s address. Maximum length is 64; only digits, letters, spaces, and ’/#&,.: are allowed. Note that the empty string is allowed; this will specifically match certain service businesses that have no street address.
"""
address1: String!
"""
Optional. The second line of the business’s address. Maximum length is 64; only digits, letters, spaces, and ’/#&,.: are allowed.
"""
address2: String
"""
Optional. The third line of the business’s address. Maximum length is 64; only digits, letters, spaces, and ’/#&,.: are allowed.
"""
address3: String
"""
Required. The city of the business. Maximum length is 64; only digits, letters, spaces, and ’.() are allowed.
"""
city: String!
"""
Required. The ISO 3166-1 alpha2 country code of the business. Maximum length is 2.
"""
country: String!
"""
Optional. The WGS84 latitude of the business in decimal degrees. Must be between -90 and +90.
"""
latitude: Float
"""
Optional. The maximum number of businesses to return.
"""
limit: Int = 3
"""
Optional. The WGS84 longitude of the business in decimal degrees. Must be between -180 and +180.
"""
longitude: Float
"""
Optional. A match quality threshold that will determine how closely businesses must match the input to be returned. Defaults to DEFAULT.
"""
match_threshold: MatchThreshold
"""
Required. The name of the business. Maximum length is 64; only digits, letters, spaces, and !#$%&+,./:?@'are allowed.
"""
name: String!
"""
Optional. The phone number of the business which can be submitted as (a) locally formatted with digits only (e.g., 016703080) or (b) internationally formatted with a leading + sign and digits only after (+35316703080). Maximum length is 32.
"""
phone: String
"""
Optional. The postal code of the business. Maximum length is 12.
"""
postal_code: String
"""
Required. The ISO 3166-2 code for the region/province of the business. Maximum length is 3.
"""
state: String!
): Businesses
categories(
"""
Optional. Alias of the category to search for. If alias is provided, up to one result will be returned.
"""
alias: String
"""
Optional. Country code used to filter categories available in a given country.
"""
country: String
"""
Optional. Locale used to localize the title of the category. By default, this is set to en_US.
"""
locale: String = "en_US"
): Categories
"""
Load information about a specific event.
"""
event(
"""
The Yelp ID for the event you want to load.
"""
id: String
): Event
"""
Search for events based on search parameters.
"""
event_search(
"""
Optional. The category filter can be a list of comma delimited categories to get OR'd results that include the categories provided. See the list of categories.
"""
categories: [String]
"""
Optional. Unix timestamp of the event end time. Will return events that only end at or before the specified time.
"""
end_date: Int
"""
Optional. Filter whether the events are free to attend. By default no filter is applied so both free and paid events will be returned.
"""
is_free: Boolean
"""
Optional. Latitude of the location you want to search nearby. If latitude is provided, longitude is required too.
"""
latitude: Float
"""
Optional. Number of events results to return. By default, it will return 3. Maximum is 50.
"""
limit: Int
"""
Optional. Specify the locale to return the event information in. See the list of supported locales.
"""
locale: String
"""
Optional. Specifies the combination of "address, neighborhood, city, state or zip, optional country" to be used when searching for events.
"""
location: String
"""
Optional. Longitude of the location you want to search nearby. If longitude is provided, latitude is required too.
"""
longitude: Float
"""
Optional. Offset the list of returned events results by this amount.
"""
offset: Int
"""
Optional. Search radius in meters. If the value is too large, a AREA_TOO_LARGE error may be returned. The max value is 40000 meters (25 miles).
"""
radius: Float
"""
Optional. Sort by either descending or ascending order. By default, it returns results in descending order.
"""
sort_by: String
"""
Optional. Sort on popularity or time start. By default, sorts on popularity.
"""
sort_on: String
"""
Optional. Unix timestamp of the event start time. Will return events that only begin at or after the specified time.
"""
start_date: Int
): Events
"""
Search for businesses on Yelp by their phone number.
"""
phone_search(
"""
Required. Phone number of the business you want to search for. It must start with + and include the country code, like +14159083801.
"""
phone: String
): Businesses
"""
Load reviews for a specific business.
"""
reviews(
"""
The Yelp ID for the business you want to load.
"""
business: String
limit: Int
"""
Output locale. Show reviews in the same language. See the list of supported locales.
"""
locale: String
offset: Int
): Reviews
"""
Search for businesses on Yelp.
"""
search(
"""
Additional filters to restrict search results.
"""
attributes: [String]
"""
Optional. Categories to filter the search results with. See the list of supported categories. The category filter can be a list of comma delimited categories. For example, "bars,french" will filter by Bars OR French. The category identifier should be used (for example "discgolf", not "Disc Golf").
"""
categories: String
country: String
"""
Required if location is not provided. Latitude of the location you want to search nearby.
"""
latitude: Float
"""
Optional. Number of business results to return. By default, it will return 20. Maximum is 50.
"""
limit: Int
"""
Optional. Specify the locale to return the event information in. See the list of supported locales.
"""
locale: String
"""
Required. Specifies the combination of "address, neighborhood, city, state or zip, optional country" to be used when searching for businesses.
"""
location: String
"""
Required if location is not provided. Longitude of the location you want to search nearby.
"""
longitude: Float
"""
Optional. Offset the list of returned business results by this amount.
"""
offset: Int
"""
Optional. An integer representing the Unix time in the same timezone of the search location. If specified, it will return business open at the given time. Notice that open_at and open_now cannot be used together.
"""
open_at: Int
"""
Optional. Default to false. When set to true, only return the businesses open now. Notice that open_at and open_now cannot be used together.
"""
open_now: Boolean
"""
Optional. Pricing levels to filter the search result with: 1 = $, 2 = $$, 3 = $$$, 4 = $$$$. The price filter can be a list of comma delimited pricing levels. For example, "1, 2, 3" will filter the results to show the ones that are $, $$, or $$$.
"""
price: String
"""
Optional. Search radius in meters. If the value is too large, a AREA_TOO_LARGE error may be returned. The max value is 40000 meters (25 miles).
"""
radius: Float
"""
Sort the results by one of the these modes: best_match, rating, review_count or distance. By default it's best_match. The rating sort is not strictly sorted by the rating value, but by an adjusted rating value that takes into account the number of ratings, similar to a Bayesian average. This is so a business with 1 rating of 5 stars doesn't immediately jump to the top.
"""
sort_by: String
"""
Optional. Search term (e.g. "food", "restaurants"). If term isn't included we search everything. The term keyword also accepts business names such as "Starbucks".
"""
term: String
): Businesses
}
type RestaurantReservations {
"""
Visit this action link URL to go directly into the Yelp Reservations flow for this business.
"""
url: String
}
type Review {
"""
Yelp ID of this review.
"""
id: String
"""
Details about the publicly visible response to this review posted by the business owner.
"""
public_response: PublicReviewResponse
"""
Rating of this review.
"""
rating: Int
"""
Text excerpt of this review.
"""
text: String
"""
The time that the review was created in PST.
"""
time_created: String
"""
URL of this review.
"""
url: String
"""
The user who wrote the review.
"""
user: User
}
type Reviews {
"""
The business associated with the reviews
"""
business: Business
"""
A list of languages for which the business has at least one review.
"""
possible_languages: [Language]
"""
The reviews objects.
"""
review: [Review]
"""
Total number of reviews.
"""
total: Int
}
type SpecialHours {
"""
The date for which the special hours apply inISO8601 format, AKA YYYY-MM-DD
"""
date: Date
"""
End of the opening hours in a day, in 24-hour clock notation, like 2130 means 9:30 PM.
"""
end: String
"""
Whether the business is closed on the indicated date.
"""
is_closed: Boolean
"""
Whether the business opens overnight or not. When this is true, the end time will be lower than the start time.
"""
is_overnight: Boolean
"""
Start of the opening hours in a day, in 24-hour clock notation, like 1000 means 10 AM.
"""
start: String
}
type Transactions {
"""
Online reservations via Yelp Reservations.
"""
restaurant_reservations: RestaurantReservations
}
type User {
"""
The User's ID, a 22 character string
"""
id: String
"""
URL of the user's profile photo.
"""
image_url: String
"""
Name of the user.
"""
name: String
"""
User's profile url
"""
profile_url: String
}