Airbnb Reviews From URL API
Extract listing reviews directly from any Airbnb URL without extracting the listing ID first.
Overview
Simplified Workflow
Automatically extracts listing ID from URL and retrieves reviews in one API call.
This endpoint simplifies the review extraction process by accepting any Airbnb listing URL. It automatically parses the listing ID and retrieves the comprehensive review data, eliminating the need for manual ID extraction.
Endpoint URL
Query Parameters
Parameter | Type | Required | Description |
---|---|---|---|
url | string | Required | Full Airbnb listing URL |
limit | integer | Optional | Number of reviews per page (1-50, default: 10) |
offset | string | Optional | Pagination offset (default: "0") |
sort_by | string | Optional | Sort order: BEST_QUALITY or MOST_RECENT (default: BEST_QUALITY) |
check_in | string | Optional | Check-in date for contextual reviews (YYYY-MM-DD) |
check_out | string | Optional | Check-out date for contextual reviews (YYYY-MM-DD) |
Supported URL Formats
Accepted Airbnb URL Patterns
https://www.airbnb.com/rooms/22120898
- Standard listing URL
https://airbnb.co.uk/rooms/22120898?check_in=2025-10-31
- With parameters
https://m.airbnb.com/rooms/22120898
- Mobile URL
https://www.airbnb.de/listing/22120898
- Alternative format
Response Structure
The response structure is identical to the standard listing reviews endpoint, with the addition of the extracted listing ID.
Response Fields
listing_id
- Extracted listing IDtotal_count
- Total number of reviewsreview_count
- Reviews in current responsehas_more
- Whether more reviews existreviews
- Array of review objects
Usage Tips
URL Encoding
Always URL-encode the Airbnb URL parameter to handle special characters and query parameters correctly.
URL Validation
The endpoint automatically validates and normalizes Airbnb URLs, supporting various international domains and URL formats.
Pagination
Use the offset parameter to paginate through large review sets. Check the has_more field to determine if additional pages exist.
Date Filtering
Provide check_in and check_out dates to get reviews most relevant to specific booking periods.
curl -X GET "https://api.stayapi.com/v1/airbnb/listing/reviews-from-url?url=https://www.airbnb.com/rooms/22120898&limit=5" \ -H "x-api-key: YOUR_API_KEY"
const url = "https://www.airbnb.com/rooms/22120898"; const params = new URLSearchParams({ url: url, limit: "5", sort_by: "MOST_RECENT" }); const response = await fetch( `https://api.stayapi.com/v1/airbnb/listing/reviews-from-url?${params}`, { headers: { "x-api-key": "YOUR_API_KEY" } } ); const data = await response.json(); console.log(`Extracted listing ID: ${data.listing_id}`); console.log(`Total reviews: ${data.total_count}`); // Process reviews data.reviews.forEach(review => { console.log(`${review.rating}/5 stars`); console.log(`Guest: ${review.reviewer.name}`); console.log(`Review: ${review.text}`); });
import requests # Any Airbnb listing URL airbnb_url = "https://www.airbnb.com/rooms/22120898" url = "https://api.stayapi.com/v1/airbnb/listing/reviews-from-url" headers = {"x-api-key": "YOUR_API_KEY"} params = { "url": airbnb_url, "limit": 5, "sort_by": "MOST_RECENT" } response = requests.get(url, headers=headers, params=params) data = response.json() print(f"Extracted listing ID: {data['listing_id']}") print(f"Total reviews: {data['total_count']}") print(f"Fetched: {data['review_count']} reviews\n") # Display reviews for review in data["reviews"]: stars = "⭐" * review["rating"] print(f"{stars} - {review['reviewer']['name']}") print(f"Date: {review['created_at']}") print(f"{review['text'][:200]}...") print("-" * 50)
<?php $airbnbUrl = "https://www.airbnb.com/rooms/22120898"; $url = "https://api.stayapi.com/v1/airbnb/listing/reviews-from-url"; $params = http_build_query([ "url" => $airbnbUrl, "limit" => 5, "sort_by" => "MOST_RECENT" ]); $ch = curl_init($url . "?" . $params); curl_setopt($ch, CURLOPT_HTTPHEADER, ["x-api-key: YOUR_API_KEY"]); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $response = curl_exec($ch); $data = json_decode($response, true); curl_close($ch); echo "Extracted listing ID: " . $data["listing_id"] . "\n"; echo "Total reviews: " . $data["total_count"] . "\n\n"; // Display reviews foreach ($data["reviews"] as $review) { echo str_repeat("⭐", $review["rating"]) . " - " . $review["reviewer"]["name"] . "\n"; echo "Review: " . $review["text"] . "\n"; echo "---\n"; } ?>
require "net/http" require "json" require "uri" airbnb_url = "https://www.airbnb.com/rooms/22120898" uri = URI("https://api.stayapi.com/v1/airbnb/listing/reviews-from-url") uri.query = URI.encode_www_form({ url: airbnb_url, limit: 5, sort_by: "MOST_RECENT" }) http = Net::HTTP.new(uri.host, uri.port) http.use_ssl = true request = Net::HTTP::Get.new(uri) request["x-api-key"] = "YOUR_API_KEY" response = http.request(request) data = JSON.parse(response.body) puts "Extracted listing ID: \#{data['listing_id']}" puts "Total reviews: \#{data['total_count']}" puts "" # Display reviews data["reviews"].each do |review| stars = "⭐" * review["rating"] puts "\#{stars} - \#{review['reviewer']['name']}" puts "Date: \#{review['created_at']}" puts review["text"][0..200] + "..." puts "-" * 50 end
{ "success": true, "listing_id": 22120898, "total_count": 321, "review_count": 5, "has_more": true, "reviews": [ { "id": "1092837465", "rating": 5, "text": "Absolutely perfect stay! The apartment exceeded our expectations in every way. The location was ideal for exploring the city, and the host was incredibly responsive and helpful.", "language": "en", "created_at": "2024-03-20", "reviewer": { "id": "user_789012", "name": "Emma Wilson", "picture_url": "https://a0.muscache.com/im/pictures/user/789012.jpg" }, "host_response": { "text": "Thank you Emma! It was a pleasure hosting you. You're welcome back anytime!", "created_at": "2024-03-21", "author": "Host" } }, { "id": "1092736284", "rating": 4, "text": "Great apartment with beautiful views. Everything was clean and well-maintained. The only minor issue was the Wi-Fi speed could be better for remote work.", "language": "en", "created_at": "2024-03-18", "reviewer": { "id": "user_345678", "name": "David Martinez", "picture_url": "https://a0.muscache.com/im/pictures/user/345678.jpg" }, "host_response": null } ] }
{ "error": "Invalid URL", "detail": "The provided URL is not a valid Airbnb listing URL", "status_code": 400 }