thefork.it APIthefork.it ↗
Search Italian restaurants by city, retrieve top-rated listings, and fetch detailed info including reviews, tags, and average prices via the TheFork Italy API.
curl -X GET 'https://api.parse.bot/scraper/ea22957c-867d-4aaf-9db6-e3cd3ba61e99/search_restaurants?page=1&city_id=461789&city_slug=roma' \ -H 'X-API-Key: $PARSE_API_KEY'
Search for restaurants in a city by city ID and slug. Returns up to 25 restaurants with ratings, addresses, and average prices. Use get_cities to discover valid city_id and city_slug values.
| Param | Type | Description |
|---|---|---|
| city_id | integer | City ID from get_cities endpoint (e.g., Roma=461789, Milano=348156, Torino=554404). |
| city_slug | string | City slug from get_cities endpoint (e.g., 'roma', 'milano', 'torino'). Must correspond to city_id. |
{
"type": "object",
"fields": {
"data": "array of restaurant objects with id, legacyId, name, rating, address, avgPrice, slug, city",
"status": "string, always 'success'"
},
"sample": {
"data": [
{
"id": "3bd44335-8e94-4633-98a0-d5e6fdde33c3",
"city": null,
"name": "Retrò",
"slug": "retro",
"rating": 9.6,
"address": {
"street": "Via Trionfale, 13921",
"country": "Italia",
"zipCode": "00123",
"locality": "Roma",
"__typename": "RestaurantAddress"
},
"avgPrice": {
"value": 4000,
"currency": {
"__typename": "Currency",
"isoCurrency": "EUR",
"decimalPosition": 2
},
"__typename": "Money"
},
"legacyId": 817822
}
],
"status": "success"
}
}About the thefork.it API
The TheFork Italy API exposes 4 endpoints covering restaurant search, top-rated rankings, and full restaurant details across Italian cities. Call search_restaurants to get up to 25 restaurants per city query — each result includes name, rating, address, average price, and slug identifiers ready to pass into get_restaurant_details for descriptions, cuisine tags, and up to 10 user reviews.
City Discovery and Restaurant Search
Start with get_cities to retrieve the full list of supported Italian cities, each with an id and slug. These values are required inputs for search_restaurants and get_top_rated_restaurants. For example, Roma maps to city_id=461789 and city_slug='roma'; Milano uses 348156 and 'milano'. The search_restaurants endpoint returns up to 25 restaurant objects per call, each containing id, legacyId, name, rating, address, avgPrice, slug, and city.
Top-Rated Listings
get_top_rated_restaurants accepts the same city_id and city_slug inputs plus an optional limit parameter to cap the number of results. Results are sorted by rating descending, making it straightforward to build curated lists or compare quality tiers across cities without a separate sort step on your end.
Restaurant Detail
get_restaurant_details requires a slug and a restaurant_id (the legacyId from search results as a string). The response adds fields not present in search results: a prose description, a tags array (cuisine type, atmosphere, and similar classifiers), and a reviews array of up to 10 entries each carrying reviewer name, text, and rating. This endpoint is the natural second call after a search — use the slug and legacyId fields from search_restaurants output directly.
Coverage and Scope
All coverage is scoped to Italy. City support is defined by what get_cities returns; there is no free-text city input — only city_id and city_slug pairs from that endpoint are accepted. Average price (avgPrice) is returned as a numeric value in the restaurant objects; the currency is EUR given the Italian market context.
- Build a city guide app that lists top-rated restaurants in Rome or Milan using
get_top_rated_restaurants - Aggregate restaurant ratings and average prices across Italian cities for a dining cost comparison tool
- Populate a travel itinerary feature with restaurant names, addresses, and cuisine tags from
get_restaurant_details - Feed a review sentiment pipeline using the up-to-10 user reviews returned per restaurant
- Create a restaurant discovery widget filtered by city slug for an Italian tourism website
- Cross-reference TheFork restaurant slugs with other data sources using the
legacyIdnumeric identifier - Monitor rating changes over time by periodically calling
search_restaurantsand storing theratingfield per restaurant
| Tier | Price | Credits/month | Rate limit |
|---|---|---|---|
| Free | $0/mo | 100 | 5 req/min |
| Hobby | $30/mo | 1,000 | 20 req/min |
| Developer | $100/mo | 5,000 | 250 req/min |
One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.
Does TheFork have an official public developer API?+
What does `get_restaurant_details` return that `search_restaurants` does not?+
search_restaurants returns core fields: id, legacyId, name, rating, address, avgPrice, slug, and city. get_restaurant_details adds a prose description, a tags array of cuisine and atmosphere classifiers, and a reviews array of up to 10 entries each with reviewer name, review text, and rating.Can I search restaurants by cuisine type or price range rather than city?+
city_id and city_slug only; there are no cuisine, price range, or keyword query parameters. You can fork this API on Parse and revise it to add filtering parameters if your use case requires cuisine- or price-based queries.