Nav Wyre Data UK Hygiene Rating API Documentation

Wyre Data - UK Restaurant API

An API to search for all restaurants, pubs, bars, hotels, cafes, coffee shops and nightclubs in the UK. Find establishment names, addresses, postcodes, food hygiene ratings, local authorities, latitudes, longitudes and plenty more!





How to test an API with Postman or CURL


To test an API endpoint you can use a free API test tool like Postman. Head over to their site to download their software:
https://www.postman.com/downloads/

Test tools like Postman save you having to build a front end to use the API. You can skip building the front end and just test the API directly, to see if it works and what data it will return. Once you have Postman you will then need to set it up.

Postman Setup

Refer to the screenshot below when you go through these 4 x steps:
1. Select 'GET' as you're making a GET request to retrieve information
2. Fill in the endpoint URL you would like to test (see below for all Wyre Data endpoints)
3. Next, select 'Headers' tab. Enter the 'key' for your RapidAPI key e.g. 'x-rapidapi-key'
4. Finally, enter the 'value' for your RapidAPI key (see section below on how to get your RapidAPI key)

postman


How to get your RapidAPI Key

1. Go to https://rapidapi.com/ and sign up for a free account
2. Search for 'Wyre Data' in the search bar, on the RapidAPI homepage, to find the API
3. Click the blue 'Subscribe to test' button to signup for Wyre Data API
4. Finally, you can find your RapidAPI key in the right hand pane 'Code Snippets' - see screenshot below:

rapidapi


Example of a successful Postman request

In this screenshot you can see the data that is returned from the endpoint. In this case the search was for the restaurant 'Baha', using the 'Find a Restaurant' endpoint. 24 x fields of data are returned. Here's the screenshot:

result2


Using CURL

From Postman you can generate the code to use CURL very easily. Just click 'code' on the right hand side and you will get a popup with the CURL code. Here's the screenshot:

curl



Endpoints


Some endpoints are limited to 25 x max responses. Other endpoints, such as the Local Authority and Town endpoints, are not limited. The Local Authority will return all establishments within its administrative area. A search against the Town endpoint will return all restaurants in that town/city.


Get your API key from RapidAPI to use these endpoints.

Find a Restaurant

GET request - Enter the name of a restaurant to use this endpoint

Base URL
https://wyre-data.p.rapidapi.com

Path
/restaurants/{restaurantName}:

Example Request - CURL
curl --location --request GET 'https://wyre-data.p.rapidapi.com/restaurants/baha' \ --header 'x-rapidapi-key: INSERT_RAPIDAPI_KEY_HERE'

Parameters
Name In Type Required Example
restaurantName path string true Mowgli
x-rapidapi-key header string true 999034d4a5msha6f68db3ab64e43p12abf2jsnabff656340a7


Example Response (JSON)
         {
        "_id": "5f0f6d598ce8aa3307824e33",
        "FHRSID": 759801,
        "BusinessName": "Mowgli Indian Bistro & Bar",
        "BusinessType": "Restaurant/Cafe/Canteen",
        "BusinessTypeID": 1,
        "AddressLine1": "43 Marina",
        "AddressLine2": "Bexhill",
        "AddressLine3": "East Sussex",
        "PostCode": "TN40 1BQ",
        "RatingValue": 1,
        "RatingKey": "fhrs_1_en-GB",
        "RatingDate": "2020-02-20",
        "LocalAuthorityCode": 106,
        "LocalAuthorityName": "Rother",
        "LocalAuthorityWebSite": "http://www.rother.gov.uk",
        "LocalAuthorityEmailAddress": "envhealth@rother.gov.uk",
        "Scores/Hygiene": 15,
        "Scores/Structural": 15,
        "Scores/ConfidenceInManagement": 20,
        "SchemeType": "FHRS",
        "NewRatingPending": false,
        "Geocode/Longitude": 0.475814,
        "Geocode/Latitude": 50.838135
    }
        
        
Max Results
25


Find a Food Hygiene Rating for a restaurant

GET request - Enter the name of a restaurant to use this endpoint


Base URL
https://wyre-data.p.rapidapi.com

Path
/restaurants/ratings/{restaurantName}:

Example Request - CURL
curl --location --request GET 'https://wyre-data.p.rapidapi.com/restaurants/ratings/baha' \ --header 'x-rapidapi-key: INSERT_RAPIDAPI_KEY_HERE'

Parameters
Name In Type Required Example
restaurantName path string true Green Tree
x-rapidapi-key header string true 999034d4a5msha6f68db3ab64e43p12abf2jsnabff656340a7


Example Response (JSON)
          {
        "_id": "5f0f6d9d8ce8aa3307852c86",
        "BusinessName": "Green Tree",
        "BusinessType": "Pub/bar/nightclub",
        "AddressLine3": "Bedale",
        "PostCode": "DL8 1JW",
        "RatingValue": 5,
        "LocalAuthorityName": "Richmondshire"
    }
        
        
Max Results
25


Find all Restaurants within a Town/City

GET request- Enter the name of a town/city to use this endpoint


Base URL
https://wyre-data.p.rapidapi.com

Path
/restaurants/town/{town}:

Example Request - CURL
curl --location --request GET 'https://wyre-data.p.rapidapi.com/restaurants/town/hambleton' \ --header 'x-rapidapi-key: INSERT_RAPIDAPI_KEY_HERE'

Parameters
Name In Type Required Example
town path string true Hambleton
x-rapidapi-key header string true 999034d4a5msha6f68db3ab64e43p12abf2jsnabff656340a7


Example Response (JSON)
        {
        "_id": "5f0f6d838ce8aa33078438b1",
        "BusinessName": "Conifers Nursing Home",
        "AddressLine2": "Hambleton",
        "AddressLine3": "Lancashire",
        "PostCode": "FY6 9EP",
        "RatingValue": 4
    }
        
        
Max Results
No max - all results returned


Find all Restaurants within a Local Authority

GET request- Enter the name of a local authority to use this endpoint


Base URL
https://wyre-data.p.rapidapi.com

Path
/restaurants/localauthority/{localAuthority}:

Example Request - CURL
curl --location --request GET 'https://wyre-data.p.rapidapi.com/restaurants/localauthority/Wyre' \ --header 'x-rapidapi-key: INSERT_RAPIDAPI_KEY_HERE'

Parameters
Name In Type Required Example
localAuthority path string true Wyre
x-rapidapi-key header string true 999034d4a5msha6f68db3ab64e43p12abf2jsnabff656340a7


Example Response (JSON)
         {
        "_id": "5f0f6d828ce8aa33078437bb",
        "BusinessName": "BELLS GUEST HOUSE AND TEA ROOMS",
        "BusinessType": "Restaurant/Cafe/Canteen",
        "AddressLine1": "Bell Farm",
        "AddressLine2": "Bradshaw Lane",
        "AddressLine3": "Pilling",
        "PostCode": "PR3 6SN",
        "RatingValue": 3,
        "LocalAuthorityName": "Wyre"
    }
        
        
Max Results
No max - all results returned



Disclaimer
Every effort is made to ensure that the information provided on this site is accurate and up to date, but no legal responsibility is accepted for any errors, omissions or misleading statements.


Data Sources
Wyre Data uses a variety of data sources. The Food Standards Agency is amongst these data providers.

Attribution statement
Contains public sector information licensed under the Open Government Licence v3.0.

The usage of FSA data is in line with the Open Government License:
https://www.nationalarchives.gov.uk/doc/open-government-licence/version/