forked from matthewhuie/foursquare-dart
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfoursquare.postman_collection.json
2188 lines (2188 loc) · 75.2 KB
/
foursquare.postman_collection.json
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
{
"info": {
"_postman_id": "7dd19ffd-909d-4a59-82a3-1e93c0136045",
"name": "Foursquare Places API",
"description": "## API Status\nStatus for the API can be found at [status.foursquare.com](http://status.foursquare.com)!\n\n## Getting Started\nUsing Foursquare's Places API, you can do just about anything you can do on foursquare.com, while using your programming language of choice. The Foursquare API is a RESTful API based on HTTP requests and JSON responses.\n\nThis version of the API, version 2, uses OAuth 2.0. This means that all requests will need to be encrypted and sent via HTTPS. It also means that you need to register your application, even if you aren't allowing users to login.\n\nWe highly encourage looking at the endpoints in the Popular Endpoints folder first to evaluate if they suit your needs, before exploring the others.",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"item": [
{
"name": "Popular Endpoints",
"item": [
{
"name": "Search for Venues (intent: checkin)",
"event": [
{
"listen": "test",
"script": {
"id": "fce96bc7-2060-4ab6-beae-a87958173e70",
"exec": [
""
],
"type": "text/javascript"
}
}
],
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "https://api.foursquare.com/v2/venues/search?client_id={{client_id}}&client_secret={{client_secret}}&v={{v}}&ll=40.7099,-73.9622&intent=checkin&radius=200&query=hot pot",
"protocol": "https",
"host": [
"api",
"foursquare",
"com"
],
"path": [
"v2",
"venues",
"search"
],
"query": [
{
"key": "client_id",
"value": "{{client_id}}"
},
{
"key": "client_secret",
"value": "{{client_secret}}"
},
{
"key": "v",
"value": "{{v}}"
},
{
"key": "ll",
"value": "40.7099,-73.9622",
"description": "REQUIRED unless near is provided. Latitude and longitude of the user’s location."
},
{
"key": "near",
"value": "new york",
"description": "REQUIRED unless ll is provided. A string naming a place in the world. If the near string is not geocodable, returns a failed_geocode error. Otherwise, searches within the bounds of the geocode and adds a geocode object to the response.",
"disabled": true
},
{
"key": "intent",
"value": "checkin",
"description": "Finds venues that the current user (or, for userless requests, a typical user) is likely to checkin to at the provided ll, at the current moment in time."
},
{
"key": "radius",
"value": "200",
"description": "Limit results to venues within this many meters of the specified location. Defaults to a city-wide area. Valid for requests with intent=checkin and categoryId or query. The maximum supported radius is currently 100,000 meters."
},
{
"key": "query",
"value": "hot pot",
"description": "A search term to be applied against venue names.\n"
},
{
"key": "limit",
"value": "20",
"description": "Number of results to return, up to 50.",
"disabled": true
},
{
"key": "categoryId",
"value": "4d954b0ea243a5684a65b473",
"description": "A comma separated list of categories to limit results to. If you specify categoryId. Specifying a radius may improve results. If specifying a top-level category, all sub-categories will also match the query.",
"disabled": true
},
{
"key": "alt",
"value": "0",
"description": "Altitude of the user’s location, in meters.",
"disabled": true
},
{
"key": "llAcc",
"value": "10000",
"description": "Accuracy of latitude and longitude, in meters.",
"disabled": true
}
]
},
"description": "Returns a list of venues near the current location, optionally matching a search term.\n\nTo ensure the best possible results, pay attention to the intent parameter below.\n\nNote that most of the fields returned inside a venue can be optional. The user may create a venue that has no address, city, or state (the venue is created instead at the lat/long specified). Your client should handle these conditions safely. For more robust venue information (photos/tips/etc.), please see our venue details endpoint.\n\n#### Response Model: [Venues/Response Fields](https://developer.foursquare.com/docs/api/venues/search)"
},
"response": []
},
{
"name": "Search for Venues (intent: browse)",
"event": [
{
"listen": "test",
"script": {
"id": "d33176d7-4b29-42aa-80a4-16cf9b6dc727",
"exec": [
"var jsonData = JSON.parse(responseBody);",
"var venue_id = jsonData.response.venues[0].id;",
"var app_user_id = \"foursquare_postman_eoNXisMI\"",
"var currentDate = new Date();",
"var dd = currentDate.getDate();",
"var mm = currentDate.getMonth()+1;",
"var yyyy = currentDate.getFullYear();",
"",
"var hash = CryptoJS.HmacSHA256(app_user_id + venue_id + yyyy + mm + dd, \"secret\")",
"var visitSignature = CryptoJS.enc.Base64.stringify(hash);",
"",
"postman.setEnvironmentVariable(\"VENUE_ID\", venue_id);",
"postman.setEnvironmentVariable(\"requestId_select\", jsonData.meta.requestId);",
"postman.setEnvironmentVariable(\"visitSignature_select\", visitSignature);",
""
],
"type": "text/javascript"
}
}
],
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "https://api.foursquare.com/v2/venues/search?client_id={{client_id}}&client_secret={{client_secret}}&v={{v}}&ll=33.352825,-111.789024&intent=browse&radius=10000&query=hot pot&limit=10",
"protocol": "https",
"host": [
"api",
"foursquare",
"com"
],
"path": [
"v2",
"venues",
"search"
],
"query": [
{
"key": "client_id",
"value": "{{client_id}}"
},
{
"key": "client_secret",
"value": "{{client_secret}}"
},
{
"key": "v",
"value": "{{v}}"
},
{
"key": "ll",
"value": "33.352825,-111.789024",
"description": "REQUIRED unless near is provided. Latitude and longitude of the user’s location. "
},
{
"key": "near",
"value": "gilbert",
"description": "REQUIRED unless ll is provided. A string naming a place in the world. If the near string is not geocodable, returns a failed_geocode error. Otherwise, searches within the bounds of the geocode and adds a geocode object to the response.",
"disabled": true
},
{
"key": "intent",
"value": "browse",
"description": "Find venues within a given area. Browse searches an entire region instead of only finding venues closest to a point. A region to search can be defined by including either the ll and radius parameters, or the sw and ne. The region will be circular if you include the ll and radius parameters, or a bounding box if you include the sw and ne parameters."
},
{
"key": "radius",
"value": "10000",
"description": "Limit results to venues within this many meters of the specified location. Defaults to a city-wide area. Valid for requests with intent=browse. The maximum supported radius is currently 100,000 meters."
},
{
"key": "sw",
"value": "40.707770, -73.970390",
"description": "With ne, limits results to the bounding box defined by the latitude and longitude given by sw as its south-west corner, and ne as its north-east corner. Not valid with ll or radius. Bounding boxes with an area up to approximately 10,000 square kilometers are supported.",
"disabled": true
},
{
"key": "ne",
"value": "40.712388, -73.956614",
"description": "See sw",
"disabled": true
},
{
"key": "query",
"value": "hot pot",
"description": "A search term to be applied against venue names."
},
{
"key": "limit",
"value": "10",
"description": "Number of results to return, up to 50.\n"
},
{
"key": "categoryId",
"value": "4d954b0ea243a5684a65b473",
"description": "A comma separated list of categories to limit results to. If you specify categoryId. Specifying a radius may improve results. If specifying a top-level category, all sub-categories will also match the query.",
"disabled": true
},
{
"key": "llAcc",
"value": "10000.0",
"description": "Accuracy of latitude and longitude, in meters.",
"disabled": true
},
{
"key": "alt",
"value": "0",
"description": "Altitude of the user’s location, in meters.",
"disabled": true
},
{
"key": "altAcc",
"value": "10000.0",
"description": "Accuracy of the user’s altitude, in meters.",
"disabled": true
}
]
},
"description": "Returns a list of venues near the current location, optionally matching a search term.\n\nTo ensure the best possible results, pay attention to the intent parameter below.\n\nNote that most of the fields returned inside a venue can be optional. The user may create a venue that has no address, city, or state (the venue is created instead at the lat/long specified). Your client should handle these conditions safely. For more robust venue information (photos/tips/etc.), please see our venue details endpoint.\n\n#### Response Model: [Venues/Response Fields](https://developer.foursquare.com/docs/api/venues/search)"
},
"response": []
},
{
"name": "Get Details of a Venue",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "https://api.foursquare.com/v2/venues/{{VENUE_ID}}?client_id={{client_id}}&client_secret={{client_secret}}&v={{v}}",
"protocol": "https",
"host": [
"api",
"foursquare",
"com"
],
"path": [
"v2",
"venues",
"{{VENUE_ID}}"
],
"query": [
{
"key": "client_id",
"value": "{{client_id}}"
},
{
"key": "client_secret",
"value": "{{client_secret}}"
},
{
"key": "v",
"value": "{{v}}"
},
{
"key": "locale",
"value": "ja",
"description": "Allows API consumers to pull relevant information (if available) in the specified ISO 639-1 2-Letter Language Code. If langauge information is not available, response will be returned in English.\n",
"disabled": true
}
]
},
"description": "Gives the full details about a venue including location, tips, and categories.\n\nIf the venue ID given is one that has been merged into another “master” venue, the response will show data about the “master” instead of giving you an error.\n\n#### Response Model: [Venues/Response Fields](https://developer.foursquare.com/docs/api/venues/details)"
},
"response": []
},
{
"name": "Suggest Completion",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "https://api.foursquare.com/v2/venues/{{VENUE_ID}}?client_id={{client_id}}&client_secret={{client_secret}}&v={{v}}",
"protocol": "https",
"host": [
"api",
"foursquare",
"com"
],
"path": [
"v2",
"venues",
"{{VENUE_ID}}"
],
"query": [
{
"key": "client_id",
"value": "{{client_id}}"
},
{
"key": "client_secret",
"value": "{{client_secret}}"
},
{
"key": "v",
"value": "{{v}}"
},
{
"key": "locale",
"value": "ja",
"description": "Undocumented. Allows API consumers to pull relevant information (if available) in the specified ISO 639-1 2-Letter Language Code. If langauge information is not available, response will be returned in English.\n",
"disabled": true
}
]
},
"description": "Returns a list of mini-venues partially matching the search term, near the location."
},
"response": []
},
{
"name": "Get Venue Categories",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "https://api.foursquare.com/v2/venues/categories?client_id={{client_id}}&client_secret={{client_secret}}&v={{v}}",
"protocol": "https",
"host": [
"api",
"foursquare",
"com"
],
"path": [
"v2",
"venues",
"categories"
],
"query": [
{
"key": "client_id",
"value": "{{client_id}}"
},
{
"key": "client_secret",
"value": "{{client_secret}}"
},
{
"key": "v",
"value": "{{v}}"
},
{
"key": "locale",
"value": "es",
"description": "Undocumented. Allows API consumers to pull relevant information (if available) in the specified ISO 639-1 2-Letter Language Code. If langauge information is not available, response will be returned in English. Supported locales can be found at https://developer.foursquare.com/docs/api/configuration/internationalization\n",
"disabled": true
}
]
},
"description": "Returns a hierarchical list of categories applied to venues. This list is also available on our [categories](https://developer.foursquare.com/docs/resources/categories) page.\n\n#### Response Model: [Categories/Response Fields](https://developer.foursquare.com/docs/api/venues/categories)"
},
"response": []
}
],
"auth": {
"type": "noauth"
},
"protocolProfileBehavior": {}
},
{
"name": "Venues",
"item": [
{
"name": "Get Details of a Venue",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "https://api.foursquare.com/v2/venues/{{VENUE_ID}}?client_id={{client_id}}&client_secret={{client_secret}}&v={{v}}",
"protocol": "https",
"host": [
"api",
"foursquare",
"com"
],
"path": [
"v2",
"venues",
"{{VENUE_ID}}"
],
"query": [
{
"key": "client_id",
"value": "{{client_id}}"
},
{
"key": "client_secret",
"value": "{{client_secret}}"
},
{
"key": "v",
"value": "{{v}}"
},
{
"key": "locale",
"value": "ja",
"description": "Allows API consumers to pull relevant information (if available) in the specified ISO 639-1 2-Letter Language Code. If langauge information is not available, response will be returned in English.\n",
"disabled": true
}
]
},
"description": "Gives the full details about a venue including location, tips, and categories.\n\nIf the venue ID given is one that has been merged into another “master” venue, the response will show data about the “master” instead of giving you an error.\n\n#### Response Model: [Venues/Response Fields](https://developer.foursquare.com/docs/api/venues/details)"
},
"response": []
},
{
"name": "Search for Venues (intent: checkin)",
"event": [
{
"listen": "test",
"script": {
"id": "ace3f451-2282-4b58-b7c5-f8f3e98ead5c",
"exec": [
""
],
"type": "text/javascript"
}
}
],
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "https://api.foursquare.com/v2/venues/search?client_id={{client_id}}&client_secret={{client_secret}}&v={{v}}&ll=40.7099,-73.9622&intent=checkin&radius=200&query=peter luger steakhouse",
"protocol": "https",
"host": [
"api",
"foursquare",
"com"
],
"path": [
"v2",
"venues",
"search"
],
"query": [
{
"key": "client_id",
"value": "{{client_id}}"
},
{
"key": "client_secret",
"value": "{{client_secret}}"
},
{
"key": "v",
"value": "{{v}}"
},
{
"key": "ll",
"value": "40.7099,-73.9622",
"description": "REQUIRED unless near is provided. Latitude and longitude of the user’s location."
},
{
"key": "near",
"value": "new york",
"description": "REQUIRED unless ll is provided. A string naming a place in the world. If the near string is not geocodable, returns a failed_geocode error. Otherwise, searches within the bounds of the geocode and adds a geocode object to the response.",
"disabled": true
},
{
"key": "intent",
"value": "checkin",
"description": "Finds venues that the current user (or, for userless requests, a typical user) is likely to checkin to at the provided ll, at the current moment in time."
},
{
"key": "radius",
"value": "200",
"description": "Limit results to venues within this many meters of the specified location. Defaults to a city-wide area. Valid for requests with intent=checkin and categoryId or query. The maximum supported radius is currently 100,000 meters."
},
{
"key": "query",
"value": "peter luger steakhouse",
"description": "A search term to be applied against venue names.\n"
},
{
"key": "limit",
"value": "20",
"description": "Number of results to return, up to 50.",
"disabled": true
},
{
"key": "categoryId",
"value": "4d954b0ea243a5684a65b473",
"description": "A comma separated list of categories to limit results to. If you specify categoryId. Specifying a radius may improve results. If specifying a top-level category, all sub-categories will also match the query.",
"disabled": true
},
{
"key": "alt",
"value": "0",
"description": "Altitude of the user’s location, in meters.",
"disabled": true
},
{
"key": "llAcc",
"value": "10000",
"description": "Accuracy of latitude and longitude, in meters.",
"disabled": true
}
]
},
"description": "Returns a list of venues near the current location, optionally matching a search term.\n\nTo ensure the best possible results, pay attention to the intent parameter below.\n\nNote that most of the fields returned inside a venue can be optional. The user may create a venue that has no address, city, or state (the venue is created instead at the lat/long specified). Your client should handle these conditions safely. For more robust venue information (photos/tips/etc.), please see our venue details endpoint.\n\n#### Response Model: [Venues/Response Fields](https://developer.foursquare.com/docs/api/venues/search)"
},
"response": []
},
{
"name": "Search for Venues (intent: browse)",
"event": [
{
"listen": "test",
"script": {
"id": "0a711fd3-2af5-42b8-bfdb-0737cbaa3699",
"exec": [
"var jsonData = JSON.parse(responseBody);",
"var venue_id = jsonData.response.venues[0].id;",
"var app_user_id = \"foursquare_postman_eoNXisMI\"",
"var currentDate = new Date();",
"var dd = currentDate.getDate();",
"var mm = currentDate.getMonth()+1;",
"var yyyy = currentDate.getFullYear();",
"",
"var hash = CryptoJS.HmacSHA256(app_user_id + venue_id + yyyy + mm + dd, \"secret\")",
"var visitSignature = CryptoJS.enc.Base64.stringify(hash);",
"",
"postman.setEnvironmentVariable(\"VENUE_ID\", venue_id);",
"postman.setEnvironmentVariable(\"requestId_select\", jsonData.meta.requestId);",
"postman.setEnvironmentVariable(\"visitSignature_select\", visitSignature);",
""
],
"type": "text/javascript"
}
}
],
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "https://api.foursquare.com/v2/venues/search?client_id={{client_id}}&client_secret={{client_secret}}&v={{v}}&near=new york&intent=browse&radius=10000&query=peter luger steak house&limit=10",
"protocol": "https",
"host": [
"api",
"foursquare",
"com"
],
"path": [
"v2",
"venues",
"search"
],
"query": [
{
"key": "client_id",
"value": "{{client_id}}"
},
{
"key": "client_secret",
"value": "{{client_secret}}"
},
{
"key": "v",
"value": "{{v}}"
},
{
"key": "ll",
"value": "40.7099,-73.9622",
"description": "REQUIRED unless near is provided. Latitude and longitude of the user’s location. ",
"disabled": true
},
{
"key": "near",
"value": "new york",
"description": "REQUIRED unless ll is provided. A string naming a place in the world. If the near string is not geocodable, returns a failed_geocode error. Otherwise, searches within the bounds of the geocode and adds a geocode object to the response."
},
{
"key": "intent",
"value": "browse",
"description": "Find venues within a given area. Browse searches an entire region instead of only finding venues closest to a point. A region to search can be defined by including either the ll and radius parameters, or the sw and ne. The region will be circular if you include the ll and radius parameters, or a bounding box if you include the sw and ne parameters."
},
{
"key": "radius",
"value": "10000",
"description": "Limit results to venues within this many meters of the specified location. Defaults to a city-wide area. Valid for requests with intent=browse. The maximum supported radius is currently 100,000 meters."
},
{
"key": "sw",
"value": "40.707770, -73.970390",
"description": "With ne, limits results to the bounding box defined by the latitude and longitude given by sw as its south-west corner, and ne as its north-east corner. Not valid with ll or radius. Bounding boxes with an area up to approximately 10,000 square kilometers are supported.",
"disabled": true
},
{
"key": "ne",
"value": "40.712388, -73.956614",
"description": "See sw",
"disabled": true
},
{
"key": "query",
"value": "peter luger steak house",
"description": "A search term to be applied against venue names."
},
{
"key": "limit",
"value": "10",
"description": "Number of results to return, up to 50.\n"
},
{
"key": "categoryId",
"value": "4d954b0ea243a5684a65b473",
"description": "A comma separated list of categories to limit results to. If you specify categoryId. Specifying a radius may improve results. If specifying a top-level category, all sub-categories will also match the query.",
"disabled": true
},
{
"key": "llAcc",
"value": "10000.0",
"description": "Accuracy of latitude and longitude, in meters.",
"disabled": true
},
{
"key": "alt",
"value": "0",
"description": "Altitude of the user’s location, in meters.",
"disabled": true
},
{
"key": "altAcc",
"value": "10000.0",
"description": "Accuracy of the user’s altitude, in meters.",
"disabled": true
}
]
},
"description": "Returns a list of venues near the current location, optionally matching a search term.\n\nTo ensure the best possible results, pay attention to the intent parameter below.\n\nNote that most of the fields returned inside a venue can be optional. The user may create a venue that has no address, city, or state (the venue is created instead at the lat/long specified). Your client should handle these conditions safely. For more robust venue information (photos/tips/etc.), please see our venue details endpoint.\n\n#### Response Model: [Venues/Response Fields](https://developer.foursquare.com/docs/api/venues/search)"
},
"response": []
},
{
"name": "Search for Venues (intent: global)",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "https://api.foursquare.com/v2/venues/search?client_id={{client_id}}&client_secret={{client_secret}}&v={{v}}&intent=global&query=airport&limit=10",
"protocol": "https",
"host": [
"api",
"foursquare",
"com"
],
"path": [
"v2",
"venues",
"search"
],
"query": [
{
"key": "client_id",
"value": "{{client_id}}"
},
{
"key": "client_secret",
"value": "{{client_secret}}"
},
{
"key": "v",
"value": "{{v}}"
},
{
"key": "intent",
"value": "global",
"description": "Finds the most globally relevant venues for the search, independent of location. Ignores all parameters other than query and limit."
},
{
"key": "query",
"value": "airport",
"description": "A search term to be applied against venue names."
},
{
"key": "limit",
"value": "10",
"description": "Number of results to return, up to 50."
}
]
},
"description": "Returns a list of venues near the current location, optionally matching a search term.\n\nTo ensure the best possible results, pay attention to the intent parameter below.\n\nNote that most of the fields returned inside a venue can be optional. The user may create a venue that has no address, city, or state (the venue is created instead at the lat/long specified). Your client should handle these conditions safely. For more robust venue information (photos/tips/etc.), please see our venue details endpoint.\n\n#### Response Model: [Venues/Response Fields](https://developer.foursquare.com/docs/api/venues/search)"
},
"response": []
},
{
"name": "Search for Venues (intent: match)",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "https://api.foursquare.com/v2/venues/search?client_id={{client_id}}&client_secret={{client_secret}}&v={{v}}&ll=40.7099,-73.9622&name=peter luger steakhouse&intent=match",
"protocol": "https",
"host": [
"api",
"foursquare",
"com"
],
"path": [
"v2",
"venues",
"search"
],
"query": [
{
"key": "client_id",
"value": "{{client_id}}"
},
{
"key": "client_secret",
"value": "{{client_secret}}"
},
{
"key": "v",
"value": "{{v}}"
},
{
"key": "ll",
"value": "40.7099,-73.9622",
"description": "REQUIRED. Latitude and longitude of the user’s location"
},
{
"key": "name",
"value": "peter luger steakhouse"
},
{
"key": "intent",
"value": "match",
"description": "Finds a venue that is the near-exact match for the given parameters. This intent is primarily used when trying to harmonize an existing place database with Foursquare’s and is highly sensitive to the provided location. The result will take into account distance and spelling variations. name and ll are the only required parameters for this intent, but we also suggest sending phone, address, city, state, zip, and twitter for better results. There’s no specified format for these parameters—we do our best to normalize them and drop them from the search if unsuccessful."
},
{
"key": "phone",
"value": "",
"disabled": true
},
{
"key": "address",
"value": "",
"disabled": true
},
{
"key": "city",
"value": "",
"disabled": true
},
{
"key": "state",
"value": "",
"disabled": true
},
{
"key": "zip",
"value": "",
"disabled": true
},
{
"key": "twitter",
"value": "",
"disabled": true
}
]
},
"description": "Returns a list of venues near the current location, optionally matching a search term.\n\nTo ensure the best possible results, pay attention to the intent parameter below.\n\nNote that most of the fields returned inside a venue can be optional. The user may create a venue that has no address, city, or state (the venue is created instead at the lat/long specified). Your client should handle these conditions safely. For more robust venue information (photos/tips/etc.), please see our venue details endpoint.\n\n#### Response Model: [Venues/Response Fields](https://developer.foursquare.com/docs/api/venues/search)"
},
"response": []
},
{
"name": "Get Venue Recommendations",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "https://api.foursquare.com/v2/venues/explore?client_id={{client_id}}&client_secret={{client_secret}}&v={{v}}&ll=1.283644,103.860753&query=steak&limit=10&offset=5&price=2,3",
"protocol": "https",
"host": [
"api",
"foursquare",
"com"
],
"path": [
"v2",
"venues",
"explore"
],
"query": [
{
"key": "client_id",
"value": "{{client_id}}"
},
{
"key": "client_secret",
"value": "{{client_secret}}"
},
{
"key": "v",
"value": "{{v}}"
},
{
"key": "ll",
"value": "1.283644,103.860753",
"description": "REQUIRED unless near is provided. Latitude and longitude of the user’s location."
},
{
"key": "near",
"value": "marina bay singapore",
"description": "REQUIRED unless ll is provided. A string naming a place in the world. If the near string is not geocodable, returns a failed_geocode error. Otherwise, searches within the bounds of the geocode and adds a geocode object to the response.",
"disabled": true
},
{
"key": "llAcc",
"value": "10000.0",
"description": "Accuracy of latitude and longitude, in meters.",
"disabled": true
},
{
"key": "alt",
"value": "0",
"description": "Altitude of the user’s location, in meters.",
"disabled": true
},
{
"key": "altAcc",
"value": "10000.0",
"description": "Accuracy of the user’s altitude, in meters.",
"disabled": true
},
{
"key": "radius",
"value": "250",
"description": "Radius to search within, in meters. If radius is not specified, a suggested radius will be used based on the density of venues in the area. The maximum supported radius is currently 100,000 meters.",
"disabled": true
},
{
"key": "section",
"value": "food",
"description": "One of food, drinks, coffee, shops, arts, outdoors, sights, trending, nextVenues (venues frequently visited after a given venue), or topPicks (a mix of recommendations generated without a query from the user). Choosing one of these limits results to venues with the specified category or property.",
"disabled": true
},
{
"key": "query",
"value": "steak",
"description": "A term to be searched against a venue’s tips, category, etc. The query parameter has no effect when a section is specified."
},
{
"key": "limit",
"value": "10",
"description": "Number of results to return, up to 50.\n"
},
{
"key": "offset",
"value": "5",
"description": "Used to page through results, up to 50."
},
{
"key": "novelty",
"value": null,
"description": "Use only if you have user's Foursquare OAUTH token. \nPass new or old to limit results to places the acting user hasn’t been or has been, respectively. Omitting this parameter returns a mixture of old and new venues.",
"disabled": true
},
{
"key": "friendVisits",
"value": null,
"description": "Use only if you have user's Foursquare OAUTH token. \nPass visited or notvisited to limit results to places the acting user’s friends have or haven’t been, respectively. Omitting this parameter returns a mixture of venues to which the user’s friends have or haven’t been.",
"disabled": true
},
{
"key": "time",
"value": "any",
"description": "Pass any to retrieve results for any time of day. Omitting this parameter returns results targeted to the current time of day.",
"disabled": true
},
{
"key": "day",
"value": "any",
"description": "Pass any to retrieve results for any day of the week. Omitting this parameter returns results targeted to the current day of the week.",
"disabled": true
},
{
"key": "lastVenue",
"value": null,
"description": "Use only if you have user's Foursquare OAUTH token. \nA venue ID to use in combination with the intent=nextVenues parameter, which returns venues users often visit after a given venue. If intent=nextVenues is specified but lastVenue is not, the user’s last check-in will be used if it is within 2 hours. If the user has not checked in within the last 2 hours, no results will be returned.",
"disabled": true
},
{
"key": "intent",
"value": "nextVenue",
"description": "Use only if you have user's Foursquare OAUTH token. \nUsed alongside the lastVenue parameter, and will tell you venues that the Foursquare user will often visit after the given lastVenue.",
"disabled": true
},
{
"key": "openNow",
"value": "1",
"description": "Boolean flag to only include venues that are open now. This prefers official provider hours but falls back to popular check-in hours.",
"disabled": true
},
{
"key": "sortByDistance",
"value": "1",
"description": "Boolean flag to sort the results by distance instead of relevance.",
"disabled": true
},
{
"key": "price",
"value": "2,3",
"description": "Comma separated list of price points. Currently the valid range of price points are [1,2,3,4], 1 being the least expensive, 4 being the most expensive. For food venues, in the United States, 1 is < $10 an entree, 2 is $10-$20 an entree, 3 is $20-$30 an entree, 4 is > $30 an entree."
},
{
"key": "saved",
"value": "1",
"description": "Use only if you have user's Foursquare OAUTH token. \nBoolean flag to only include venues that the user has saved on their To-Do list or to another list.",
"disabled": true
}
]
},
"description": "Recommended only if you require the user to log into their Foursquare accounts for personalised recommendations. If not, consider \"Search for Venues (intent: browse)\" for a list of recommendations.\n\nReturns a list of recommended venues near the current location. For more robust information about the venues themselves (photos/tips/etc.), please see our venue details endpoint.\n\nIf authenticated, the method will personalize the ranking based on you and your friends.\n\n#### Response Model: [Venues/Response Fields](https://developer.foursquare.com/docs/api/venues/explore)"
},
"response": []
},
{
"name": "Report Venue Selection",
"request": {
"method": "POST",
"header": [],
"url": {
"raw": "https://api.foursquare.com/v2/venues/{{VENUE_ID}}/select?client_id={{client_id}}&client_secret={{client_secret}}&v={{v}}&requestId={{requestId_select}}&type=currentLocation&visitSignature={{visitSignature_select}}",
"protocol": "https",
"host": [
"api",
"foursquare",
"com"
],
"path": [
"v2",
"venues",
"{{VENUE_ID}}",
"select"
],
"query": [
{
"key": "client_id",
"value": "{{client_id}}"
},
{
"key": "client_secret",
"value": "{{client_secret}}"
},
{
"key": "v",
"value": "{{v}}"
},
{
"key": "requestId",
"value": "{{requestId_select}}",
"description": "REQUIRED. The request ID returned in the search response leading to the venue selection."
},
{
"key": "type",
"value": "currentLocation",
"description": "REQUIRED. The type of selection the user has made. One of currentLocation, destination, or save."
},
{
"key": "visitSignature",
"value": "{{visitSignature_select}}",
"description": "REQUIRED. The HMAC hex digest of the message \"APP_USER_ID, VENUE_ID, CURRENT_YYYYMMDD\". This allows us to distinguish between three selections at a venue by a single user vs. by three distinct users while preserving user privacy."
}
]
},
"description": "Report the selection of a venue as the result of a search, explore, or suggestcompletion request.\n\nVenue selections or ‘pingbacks’ are used exclusively as inputs for training our underlying venue search model; this helps us improve accuracy at the places you and your users care about. \n\nNo personally identifiable information is collected at any point.\n\n"
},
"response": []
},
{
"name": "Get a Venue's Photos",
"event": [
{
"listen": "test",
"script": {
"id": "ad0a4a6c-5967-4bc8-a6e7-545f9f63fc1d",
"exec": [
"var jsonData = JSON.parse(responseBody);",
"postman.setEnvironmentVariable(\"prefix_photo\", jsonData.response.photos.items[0].prefix);",
"postman.setEnvironmentVariable(\"suffix_photo\", jsonData.response.photos.items[0].suffix);",
"postman.setEnvironmentVariable(\"PHOTO_ID\", jsonData.response.photos.items[0].id);"