Get dataset metadata
curl --request GET \
--url https://api.hfsaa.org/v1/dataset \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.hfsaa.org/v1/dataset"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.hfsaa.org/v1/dataset', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.hfsaa.org/v1/dataset",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.hfsaa.org/v1/dataset"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.hfsaa.org/v1/dataset")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hfsaa.org/v1/dataset")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"api_version": "v1",
"dataset_version": "<string>",
"generated_at": "2023-11-07T05:31:56Z",
"location_count": 1,
"checksum": {
"algorithm": "sha256",
"value": "<string>"
},
"download_url": "<string>",
"location_types": [
"restaurant"
],
"attribution": {
"required": true,
"text": "HFSAA certification",
"instructions": "When stating or implying that a location is certified or halal verified by HFSAA, identify HFSAA and provide reasonable access to the location's exact verification_url."
}
}{
"error": {
"code": "invalid_parameter",
"message": "limit must be between 1 and 100."
}
}{
"error": {
"code": "invalid_parameter",
"message": "limit must be between 1 and 100."
}
}{
"error": {
"code": "invalid_parameter",
"message": "limit must be between 1 and 100."
}
}{
"error": {
"code": "invalid_parameter",
"message": "limit must be between 1 and 100."
}
}{
"error": {
"code": "invalid_parameter",
"message": "limit must be between 1 and 100."
}
}Metadata
Get dataset metadata
Returns metadata about the directory dataset and API contract.
GET
/
v1
/
dataset
Get dataset metadata
curl --request GET \
--url https://api.hfsaa.org/v1/dataset \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.hfsaa.org/v1/dataset"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.hfsaa.org/v1/dataset', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.hfsaa.org/v1/dataset",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.hfsaa.org/v1/dataset"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.hfsaa.org/v1/dataset")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hfsaa.org/v1/dataset")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"api_version": "v1",
"dataset_version": "<string>",
"generated_at": "2023-11-07T05:31:56Z",
"location_count": 1,
"checksum": {
"algorithm": "sha256",
"value": "<string>"
},
"download_url": "<string>",
"location_types": [
"restaurant"
],
"attribution": {
"required": true,
"text": "HFSAA certification",
"instructions": "When stating or implying that a location is certified or halal verified by HFSAA, identify HFSAA and provide reasonable access to the location's exact verification_url."
}
}{
"error": {
"code": "invalid_parameter",
"message": "limit must be between 1 and 100."
}
}{
"error": {
"code": "invalid_parameter",
"message": "limit must be between 1 and 100."
}
}{
"error": {
"code": "invalid_parameter",
"message": "limit must be between 1 and 100."
}
}{
"error": {
"code": "invalid_parameter",
"message": "limit must be between 1 and 100."
}
}{
"error": {
"code": "invalid_parameter",
"message": "limit must be between 1 and 100."
}
}Authorizations
Use the API key as Authorization: Bearer <api-key>.
Response
Dataset metadata.
Example:
"v1"
Opaque immutable version of the current dataset.
UTC time at which this snapshot was generated.
Exact number of locations in this dataset version.
Required range:
x >= 0Show child attributes
Show child attributes
Version-specific URL for the exact artifact covered by checksum.
Available options:
restaurant, meat_market, dining_hall Show child attributes
Show child attributes