PUBLIC API

API change history

App and Web developers, travel platforms and data aggregators can access the most complete and reliable Visitor Economy platform in Puerto Rico.

Get Venue

Returns the first sixty venues searched by the following parameters:

  • Id
  • Name
  • Neighbourhood
  • Address
  • City
  • Coordinates and radius of influence
  • Business Status (0,1,2,3,4)
    • Unkown: 0
    • Open: 1
    • Open in Special Schedule: 4
    • Temporally Closed: 2
    • Closed: 3
  • lastUpdated: Date of the last change in the venue

The values of each parameter can be partial. For example, you can search for a venue named "Casita" and you will get "La Casita Blanca", "La Casita de Miramar", "La Casita del Mofongo" as results. You can enter a latitude, longitude (in decimal degrees) and radius (in miles) and the system will return the destinations meeting the search criteria around the specified location.

The Activity field can have the following values and categories

  • Gastronomy

    • Chinchorro
    • Restaurant
    • Bar / Pub
    • Bakery
    • Cafeteria
    • Deli
    • Fast Food
    • Coffee Shop
    • Food Truck
    • Diner
    • Specialty
  • Attraction

    • Historic Sites and Landmarks
    • Night Life
    • Culture & Science
    • Adventure & Sports
    • Nature
    • Leisure & Recreational
  • Accommodation

    • Campsite
    • Hotel
    • Time Share
    • Vacation Rental / Short Term Rental
    • Home Stay
  • Services

    • Tours
    • Business
    • Educational Services
    • Personal Care
    • Medical Tourism
    • Shopping
    • Rentals
    • Volunteerism
    • Entertainment
  • Essentials

    • Money
    • Health
    • Getting Around
    • Essentials

The complete list of classifications can be found in the taxonomy endpoint.

The response is a JSON array with the following fields.

  • Id: Identification number of the venue
  • name: Name of the venue
  • address: number, street name, city and zip code.
  • city
  • zone: one of the zones defined in the system (north, east, west, south, metro, central mountain, Vieques & Culebra).
  • neighborhood
  • description
  • phone: contact phone
  • email: contact email
  • website: web address
  • timetables: Array of schedules. Days of week starting with 0 (Sunday) until 6 (Satuday) showing opening and closing hours.
  • latitude: in decimal form
  • longitude: in decimal form
  • google_place_id: If found, ID in Google Places API
  • activity: economic activity
  • category: category under the activity
  • types: type under the category
  • amenities: amenities under the activity
  • characteristics: characteristics under the activity
  • businessStatus: shows if the venue is open or not with the above values
  • hurricaneNeeds: Describes what is needed in other to open or keep in business after hurricane Maria
  • media: Array of links to images
  • properties: Array of object containing diferent kinds of properties (links, videos, audios, etc.)

If a field does is not shown is because it has a NULL value.

The content can be received gzipped if the "Accept-Encoding" HTTP Header is present in the request with the value gzip.

Try it

Request

Request URL

Request parameters

  • (optional)
    string

    Name of the destination. It can be a partial name.

  • (optional)
    string

    Address of the destination. It can be a partial address

  • (optional)
    string

    Neighborhood of the destination. It can be a partial name.

  • (optional)
    string

    City of the destination. It can be a partial name

  • (optional)
    number

    latitude in decimal degress

  • (optional)
    number

    longitude in decimal degress

  • (optional)
    string

    radius in miles around the location

  • (optional)
    number

    If the business is in an Unknown status (0), Open (1), Temporaly Closed (2), Closed (3) or Open in Special Schedule (4)

  • (optional)
    string

    Type of activity

  • (optional)
    string

    Type of category

  • (optional)
    string

    Subtype of category

  • (optional)
    string
  • (optional)
    string
  • (optional)
    date

    Date of the last change in the venue. Format: mm/dd/yyyy

  • (optional)
    number

    Identification number

Request headers

  • string
    Subscription key which provides access to this API. Found in your Profile.

Request body

Responses

200 OK

Returned in all cases.

Representations

[{
  "phone": "(555) 556-8222",
  "amenities": "Air Conditioning , Outdoor Seating, Take-out, Credit Card, Free Parking, Casual Attire, Waiter Service, Smoking Area, Television , Bar, Bike Parking, Restrooms / Toilets",
  "neighborhood": "Santurce",
  "characteristics": "Budget, Group, Outdoors",
  "email": "contactme@happyplace.com",
  "website": "https://happly.place"
  "google_place_id": "ChIJy8c-ffplA4wRUyY3nRouNpA",
  "timetables":   [
        {
      "close_hour": "0200",
      "open_hour": "1600",
      "open_day": 3,
      "close_day": 4
    },
        {
      "close_hour": "0200",
      "open_hour": "1600",
      "open_day": 4,
      "close_day": 5
    },
        {
      "close_hour": "0200",
      "open_hour": "1600",
      "open_day": 5,
      "close_day": 6
    },
        {
      "close_hour": "0200",
      "open_hour": "1600",
      "open_day": 6,
      "close_day": 0
    },
        {
      "close_hour": "0200",
      "open_hour": "1600",
      "open_day": 0,
      "close_day": 1
    }
  ],
  "city": "San Juan",
  "id": 3197348,
  "address": "Calle Loíza - 00913 San Juan",
  "description": "Serving the usual local favorites and other Caribbean specialties, you may think this restaurant is not too different from others in the area.  However, as the name suggests this place is about having a fun time and creating happy memories. The food is made fresh and the local favorites all have a modern twist. Enjoy your food while listening to some trendy music in the outdoor terrace. The end.",
  "name": "$2 $3 $4 Happy Place",
  "categories": "Restaurant, Bar / Pub",
  "longitude": -66.0375416,
  "latitude": 18.44951467,
  "types": "Beer, Burgers, Caribbean, Criollo, Sports Bar",
  "media":   [
    "https://www.viewpr.org/media/1480",
    "https://www.viewpr.org/media/1481"
  ],
  "activity": "Gastronomy",
  "zone": "Metro",
  "businessStatus": 1
}]

Code samples

@ECHO OFF

curl -v -X GET "https://viewpr.azure-api.net/v1/venue?name={string}&address={string}&neighborhood={string}&city={string}&latitude={number}&longitude={number}&radiusOfBuffer={string}&businessStatus=1&activity={string}&category={string}&type={string}&amenity={string}&characteristic={string}&lastUpdated={date}&Id={number}"
-H "Ocp-Apim-Subscription-Key: {subscription key}"

--data-ascii "{body}" 
using System;
using System.Net.Http.Headers;
using System.Text;
using System.Net.Http;
using System.Web;

namespace CSHttpClientSample
{
    static class Program
    {
        static void Main()
        {
            MakeRequest();
            Console.WriteLine("Hit ENTER to exit...");
            Console.ReadLine();
        }
        
        static async void MakeRequest()
        {
            var client = new HttpClient();
            var queryString = HttpUtility.ParseQueryString(string.Empty);

            // Request headers
            client.DefaultRequestHeaders.Add("Ocp-Apim-Subscription-Key", "{subscription key}");

            // Request parameters
            queryString["name"] = "{string}";
            queryString["address"] = "{string}";
            queryString["neighborhood"] = "{string}";
            queryString["city"] = "{string}";
            queryString["latitude"] = "{number}";
            queryString["longitude"] = "{number}";
            queryString["radiusOfBuffer"] = "{string}";
            queryString["businessStatus"] = "1";
            queryString["activity"] = "{string}";
            queryString["category"] = "{string}";
            queryString["type"] = "{string}";
            queryString["amenity"] = "{string}";
            queryString["characteristic"] = "{string}";
            queryString["lastUpdated"] = "{date}";
            queryString["Id"] = "{number}";
            var uri = "https://viewpr.azure-api.net/v1/venue?" + queryString;

            var response = await client.GetAsync(uri);
        }
    }
}	
// // This sample uses the Apache HTTP client from HTTP Components (http://hc.apache.org/httpcomponents-client-ga/)
import java.net.URI;
import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.client.utils.URIBuilder;
import org.apache.http.impl.client.HttpClients;
import org.apache.http.util.EntityUtils;

public class JavaSample 
{
    public static void main(String[] args) 
    {
        HttpClient httpclient = HttpClients.createDefault();

        try
        {
            URIBuilder builder = new URIBuilder("https://viewpr.azure-api.net/v1/venue");

            builder.setParameter("name", "{string}");
            builder.setParameter("address", "{string}");
            builder.setParameter("neighborhood", "{string}");
            builder.setParameter("city", "{string}");
            builder.setParameter("latitude", "{number}");
            builder.setParameter("longitude", "{number}");
            builder.setParameter("radiusOfBuffer", "{string}");
            builder.setParameter("businessStatus", "1");
            builder.setParameter("activity", "{string}");
            builder.setParameter("category", "{string}");
            builder.setParameter("type", "{string}");
            builder.setParameter("amenity", "{string}");
            builder.setParameter("characteristic", "{string}");
            builder.setParameter("lastUpdated", "{date}");
            builder.setParameter("Id", "{number}");

            URI uri = builder.build();
            HttpGet request = new HttpGet(uri);
            request.setHeader("Ocp-Apim-Subscription-Key", "{subscription key}");


            // Request body
            StringEntity reqEntity = new StringEntity("{body}");
            request.setEntity(reqEntity);

            HttpResponse response = httpclient.execute(request);
            HttpEntity entity = response.getEntity();

            if (entity != null) 
            {
                System.out.println(EntityUtils.toString(entity));
            }
        }
        catch (Exception e)
        {
            System.out.println(e.getMessage());
        }
    }
}

<!DOCTYPE html>
<html>
<head>
    <title>JSSample</title>
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>
</head>
<body>

<script type="text/javascript">
    $(function() {
        var params = {
            // Request parameters
            "name": "{string}",
            "address": "{string}",
            "neighborhood": "{string}",
            "city": "{string}",
            "latitude": "{number}",
            "longitude": "{number}",
            "radiusOfBuffer": "{string}",
            "businessStatus": "1",
            "activity": "{string}",
            "category": "{string}",
            "type": "{string}",
            "amenity": "{string}",
            "characteristic": "{string}",
            "lastUpdated": "{date}",
            "Id": "{number}",
        };
      
        $.ajax({
            url: "https://viewpr.azure-api.net/v1/venue?" + $.param(params),
            beforeSend: function(xhrObj){
                // Request headers
                xhrObj.setRequestHeader("Ocp-Apim-Subscription-Key","{subscription key}");
            },
            type: "GET",
            // Request body
            data: "{body}",
        })
        .done(function(data) {
            alert("success");
        })
        .fail(function() {
            alert("error");
        });
    });
</script>
</body>
</html>
#import <Foundation/Foundation.h>

int main(int argc, const char * argv[])
{
    NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
    
    NSString* path = @"https://viewpr.azure-api.net/v1/venue";
    NSArray* array = @[
                         // Request parameters
                         @"entities=true",
                         @"name={string}",
                         @"address={string}",
                         @"neighborhood={string}",
                         @"city={string}",
                         @"latitude={number}",
                         @"longitude={number}",
                         @"radiusOfBuffer={string}",
                         @"businessStatus=1",
                         @"activity={string}",
                         @"category={string}",
                         @"type={string}",
                         @"amenity={string}",
                         @"characteristic={string}",
                         @"lastUpdated={date}",
                         @"Id={number}",
                      ];
    
    NSString* string = [array componentsJoinedByString:@"&"];
    path = [path stringByAppendingFormat:@"?%@", string];

    NSLog(@"%@", path);

    NSMutableURLRequest* _request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:path]];
    [_request setHTTPMethod:@"GET"];
    // Request headers
    [_request setValue:@"{subscription key}" forHTTPHeaderField:@"Ocp-Apim-Subscription-Key"];
    // Request body
    [_request setHTTPBody:[@"{body}" dataUsingEncoding:NSUTF8StringEncoding]];
    
    NSURLResponse *response = nil;
    NSError *error = nil;
    NSData* _connectionData = [NSURLConnection sendSynchronousRequest:_request returningResponse:&response error:&error];

    if (nil != error)
    {
        NSLog(@"Error: %@", error);
    }
    else
    {
        NSError* error = nil;
        NSMutableDictionary* json = nil;
        NSString* dataString = [[NSString alloc] initWithData:_connectionData encoding:NSUTF8StringEncoding];
        NSLog(@"%@", dataString);
        
        if (nil != _connectionData)
        {
            json = [NSJSONSerialization JSONObjectWithData:_connectionData options:NSJSONReadingMutableContainers error:&error];
        }
        
        if (error || !json)
        {
            NSLog(@"Could not parse loaded json with error:%@", error);
        }
        
        NSLog(@"%@", json);
        _connectionData = nil;
    }
    
    [pool drain];

    return 0;
}
<?php
// This sample uses the Apache HTTP client from HTTP Components (http://hc.apache.org/httpcomponents-client-ga/)
require_once 'HTTP/Request2.php';

$request = new Http_Request2('https://viewpr.azure-api.net/v1/venue');
$url = $request->getUrl();

$headers = array(
    // Request headers
    'Ocp-Apim-Subscription-Key' => '{subscription key}',
);

$request->setHeader($headers);

$parameters = array(
    // Request parameters
    'name' => '{string}',
    'address' => '{string}',
    'neighborhood' => '{string}',
    'city' => '{string}',
    'latitude' => '{number}',
    'longitude' => '{number}',
    'radiusOfBuffer' => '{string}',
    'businessStatus' => '1',
    'activity' => '{string}',
    'category' => '{string}',
    'type' => '{string}',
    'amenity' => '{string}',
    'characteristic' => '{string}',
    'lastUpdated' => '{date}',
    'Id' => '{number}',
);

$url->setQueryVariables($parameters);

$request->setMethod(HTTP_Request2::METHOD_GET);

// Request body
$request->setBody("{body}");

try
{
    $response = $request->send();
    echo $response->getBody();
}
catch (HttpException $ex)
{
    echo $ex;
}

?>
########### Python 2.7 #############
import httplib, urllib, base64

headers = {
    # Request headers
    'Ocp-Apim-Subscription-Key': '{subscription key}',
}

params = urllib.urlencode({
    # Request parameters
    'name': '{string}',
    'address': '{string}',
    'neighborhood': '{string}',
    'city': '{string}',
    'latitude': '{number}',
    'longitude': '{number}',
    'radiusOfBuffer': '{string}',
    'businessStatus': '1',
    'activity': '{string}',
    'category': '{string}',
    'type': '{string}',
    'amenity': '{string}',
    'characteristic': '{string}',
    'lastUpdated': '{date}',
    'Id': '{number}',
})

try:
    conn = httplib.HTTPSConnection('viewpr.azure-api.net')
    conn.request("GET", "/v1/venue?%s" % params, "{body}", headers)
    response = conn.getresponse()
    data = response.read()
    print(data)
    conn.close()
except Exception as e:
    print("[Errno {0}] {1}".format(e.errno, e.strerror))

####################################

########### Python 3.2 #############
import http.client, urllib.request, urllib.parse, urllib.error, base64

headers = {
    # Request headers
    'Ocp-Apim-Subscription-Key': '{subscription key}',
}

params = urllib.parse.urlencode({
    # Request parameters
    'name': '{string}',
    'address': '{string}',
    'neighborhood': '{string}',
    'city': '{string}',
    'latitude': '{number}',
    'longitude': '{number}',
    'radiusOfBuffer': '{string}',
    'businessStatus': '1',
    'activity': '{string}',
    'category': '{string}',
    'type': '{string}',
    'amenity': '{string}',
    'characteristic': '{string}',
    'lastUpdated': '{date}',
    'Id': '{number}',
})

try:
    conn = http.client.HTTPSConnection('viewpr.azure-api.net')
    conn.request("GET", "/v1/venue?%s" % params, "{body}", headers)
    response = conn.getresponse()
    data = response.read()
    print(data)
    conn.close()
except Exception as e:
    print("[Errno {0}] {1}".format(e.errno, e.strerror))

####################################
require 'net/http'

uri = URI('https://viewpr.azure-api.net/v1/venue')

query = URI.encode_www_form({
    # Request parameters
    'name' => '{string}',
    'address' => '{string}',
    'neighborhood' => '{string}',
    'city' => '{string}',
    'latitude' => '{number}',
    'longitude' => '{number}',
    'radiusOfBuffer' => '{string}',
    'businessStatus' => '1',
    'activity' => '{string}',
    'category' => '{string}',
    'type' => '{string}',
    'amenity' => '{string}',
    'characteristic' => '{string}',
    'lastUpdated' => '{date}',
    'Id' => '{number}'
})
if query.length > 0
  if uri.query && uri.query.length > 0
    uri.query += '&' + query
  else
    uri.query = query
  end
end

request = Net::HTTP::Get.new(uri.request_uri)
# Request headers
request['Ocp-Apim-Subscription-Key'] = '{subscription key}'
# Request body
request.body = "{body}"

response = Net::HTTP.start(uri.host, uri.port, :use_ssl => uri.scheme == 'https') do |http|
    http.request(request)
end

puts response.body