Documentation menu
Docs / Guides / Getting started and authentication
Getting started and authentication
Get an API key and make your first authenticated call in under five minutes.
NewLiquorLicenses is served through RapidAPI. Every request is authenticated with your personal RapidAPI key sent as a header, there is nothing to install.
1. Subscribe and get your key
Open the NewLiquorLicenses listing on RapidAPI, subscribe to a plan (there is a free tier), and copy your key from the Endpoints tab.
2. Send it on every request
Pass two headers with each call:
curl --request GET \
--url 'https://newliquorlicenses-us-liquor-license-data.p.rapidapi.com/liquor_license' \
--header 'x-rapidapi-host: newliquorlicenses-us-liquor-license-data.p.rapidapi.com' \
--header 'x-rapidapi-key: YOUR_RAPIDAPI_KEY'import requests
url = "https://newliquorlicenses-us-liquor-license-data.p.rapidapi.com/liquor_license"
headers = {"x-rapidapi-host": "newliquorlicenses-us-liquor-license-data.p.rapidapi.com", "x-rapidapi-key": "YOUR_RAPIDAPI_KEY"}
resp = requests.get(url, headers=headers)
print(resp.json())const res = await fetch("https://newliquorlicenses-us-liquor-license-data.p.rapidapi.com/liquor_license", {
headers: {
"x-rapidapi-host": "newliquorlicenses-us-liquor-license-data.p.rapidapi.com",
"x-rapidapi-key": "YOUR_RAPIDAPI_KEY",
},
});
const data = await res.json();
console.log(data);<?php
$ch = curl_init("https://newliquorlicenses-us-liquor-license-data.p.rapidapi.com/liquor_license");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"x-rapidapi-host: newliquorlicenses-us-liquor-license-data.p.rapidapi.com",
"x-rapidapi-key: YOUR_RAPIDAPI_KEY",
]);
echo curl_exec($ch);require "net/http"
require "uri"
uri = URI("https://newliquorlicenses-us-liquor-license-data.p.rapidapi.com/liquor_license")
req = Net::HTTP::Get.new(uri)
req["x-rapidapi-host"] = "newliquorlicenses-us-liquor-license-data.p.rapidapi.com"
req["x-rapidapi-key"] = "YOUR_RAPIDAPI_KEY"
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |h| h.request(req) }
puts res.bodypackage main
import (
"fmt"
"io"
"net/http"
)
func main() {
req, _ := http.NewRequest("GET", "https://newliquorlicenses-us-liquor-license-data.p.rapidapi.com/liquor_license", nil)
req.Header.Add("x-rapidapi-host", "newliquorlicenses-us-liquor-license-data.p.rapidapi.com")
req.Header.Add("x-rapidapi-key", "YOUR_RAPIDAPI_KEY")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}import java.net.URI;
import java.net.http.*;
HttpRequest req = HttpRequest.newBuilder()
.uri(URI.create("https://newliquorlicenses-us-liquor-license-data.p.rapidapi.com/liquor_license"))
.header("x-rapidapi-host", "newliquorlicenses-us-liquor-license-data.p.rapidapi.com")
.header("x-rapidapi-key", "YOUR_RAPIDAPI_KEY")
.build();
HttpResponse<String> res = HttpClient.newHttpClient()
.send(req, HttpResponse.BodyHandlers.ofString());
System.out.println(res.body());3. You're in
A 200 response returns JSON. A 401 or 403 means the key or host header is missing or wrong. See the endpoint reference for every route NewLiquorLicenses exposes.
Ready to build?Subscribe on RapidAPI to get your key and start calling NewLiquorLicenses in minutes.
Get your API key →