Before you start
- Get an API keySign up for 100 free credits, no card. Keys start with
gs_live_. - Put it in the environmentEvery example reads it from
GROUNDSOCIAL_API_KEY:export GROUNDSOCIAL_API_KEY=gs_live_… - Set up TypeScript
npm init -y && npm pkg set type=module && npm i -D tsx typescript @types/node
Call Get an Airbnb listing API from TypeScript
GET /v1/airbnb/listing. Save this as main.ts and run npx tsx main.ts. It prints listing.title and listing.host.rating.
// The fields this script reads, as the recorded response has them.
interface Page {
listing: {
title: string
host: {
rating: number
}
}
}
class ApiError extends Error {
constructor(
readonly code: string,
readonly hint: string,
readonly retryable: boolean,
) {
super(`${code}: ${hint}`)
}
}
async function call<T>(path: string, params: Record<string, string> = {}): Promise<T> {
const url = new URL(path, 'https://api.groundsocial.dev')
for (const [k, v] of Object.entries(params)) url.searchParams.set(k, v)
const res = await fetch(url, {
headers: {
Authorization: `Bearer ${process.env.GROUNDSOCIAL_API_KEY}`,
},
signal: AbortSignal.timeout(60_000),
})
if (!res.ok) {
const { error } = (await res.json()) as {
error: { code: string; message: string; hint?: string; retryable: boolean }
}
throw new ApiError(error.code, error.hint ?? error.message, error.retryable)
}
return (await res.json()) as T
}
const data = await call<Page>('/v1/airbnb/listing', { id: '29990558' })
console.log(data.listing.title, data.listing.host.rating)The response
A real Airbnb response to this call, recorded from the live source and shortened for display: arrays keep their first items and … marks every cut. Live calls return current data in the same shape.
{
"listing": {
"id": "29990558",
"url": "https://www.airbnb.com/rooms/29990558",
"title": "Tram 28 - Marvelous Balcony & Tagus River Views 3D",
"summary": "Entire rental unit in Lisbon, Portugal",
"property_type": "APARTMENT",
"room_type": "ENTIRE_HOME",
"person_capacity": 4,
"overview": [
"4 guests",
"1 bedroom",
"… 2 more"
],
"description": "This cozy apartment in the vibrant neighborhood of Graça is everything you’ve been dreaming of for your Lisbon getaway! …",
"description_html": "This cozy apartment in the vibrant neighborhood of Graça is everything you’ve been dreaming of for your Lisbon getaway! …",
"location": {
"subtitle": "Lisbon, Portugal",
"country_code": "PT",
"latitude": 38.71785,
"longitude": -9.12793,
"is_exact": false
},
"rating": {
"overall": 4.92,
"review_count": 741,
"categories": {
"ACCURACY": 4.91,
"CHECKIN": 4.91,
"COMMUNICATION": 4.93,
"VALUE": 4.87,
"CLEANLINESS": 4.93,
"LOCATION": 4.92
}
},
"is_guest_favorite": true,
"is_new": false,
"is_luxe": false,
"pets_allowed": null,
"highlights": [
{
"title": "Top 5% of homes",
"description": "This home is highly ranked based on ratings, reviews, and reliability."
},
{
"title": "In Graça near a hilltop viewpoint",
"description": "About a 5-min walk to Miradouro Nossa Senhora do Monte, with Jardim da Cerca da Graça nearby."
},
"… 3 more"
],
"amenities": [
{
"group": "Scenic views",
"title": "City skyline view",
"available": true
},
{
"group": "Scenic views",
"title": "River view",
"available": true
},
"… 40 more"
],
"house_rules": [
{
"title": "Up to 4 overnight guests",
"description": null
},
{
"title": "No pets",
"description": null
},
"… 5 more"
],
"safety_and_property": [
{
"title": "Carbon monoxide alarm installed",
"description": null
},
{
"title": "Smoke alarm installed",
"description": null
},
"… 1 more"
],
"host": {
"name": "Ernest",
"user_id": "41998277",
"profile_picture_url": "https://a0.muscache.com/im/pictures/user/User/original/bd06b168-76fc-4732-9ee7-6aa5713976c5.jpeg",
"is_superhost": true,
"is_verified": true,
"rating": 4.83,
"review_count": 5229,
"years_hosting": 11,
"about": "Hey there! I'm Ernest, originally from Lithuania, a small and chilly country, but my heart belongs to the warm, vibrant …",
"highlights": [
"Born in the 90s",
"My work: Entrepreneur"
],
"response_rate": "Response rate: 100%",
"response_time": "Responds within an hour"
},
"photos": [
{
"url": "https://a0.muscache.com/im/pictures/6903ddaf-5883-4132-93b7-652c73375676.jpg",
"caption": "Filled with natural light, highlighting its beautiful high ceilings and modern white & wood design."
},
{
"url": "https://a0.muscache.com/im/pictures/cfa2acf4-b883-45e5-989e-f45b5f23d658.jpg",
"caption": "Relax in a warm and inviting atmosphere, perfect for unwinding after a day of exploring Lisbon."
},
"… 17 more"
]
}
}Top-level fields
| Field | Type | Description |
|---|---|---|
listing | AirbnbListing | – |
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id | query | string | Airbnb listing id. Example: 29990558. |
url | query | string | A listing link, https://www.airbnb.com/rooms/<id> (any Airbnb domain). Example: https://www.airbnb.com/rooms/29990558. |
check_in | query | string | Arrival day, YYYY-MM-DD. Example: 2026-12-10. |
check_out | query | string | Departure day, YYYY-MM-DD. Example: 2026-12-10. |
adults | query | integer | null | Adults. |
Errors and retries
Every error is JSON with error.code (stable: branch on it), message, hint (what to do next), docs_url and retryable. A failed call is never charged. Retry only when retryable is true, after the Retry-After header.
try {
const data = await call<Page>('/v1/airbnb/listing', { id: '29990558' })
} catch (err) {
if (!(err instanceof ApiError)) throw err
if (err.code === 'insufficient_credits') console.error('Top up:', err.hint)
else if (err.code === 'target_not_found') console.error('Nothing there (not charged).')
else if (err.retryable) console.error('Try again after Retry-After:', err.hint)
else throw err
}| Status | Meaning |
|---|---|
200 | The listing. |
400 | Invalid input. Nothing was charged. |
401 | Missing or invalid API key. |
402 | Not enough credits, a spend cap was reached, or payment is required. |
403 | The target is private, or the account is suspended. |
404 | No public Airbnb listing with that id. |
429 | Too many requests. Wait for Retry-After seconds. |
503 | Airbnb is temporarily unavailable. Retryable; nothing was charged. |
Every error code and what to do about it.
Pricing
| Cost | |
|---|---|
| Per call | 1 credit per call |
| 1,000 calls | $1.00 on the starter pack, $0.40 at volume |
| No key (MPP or x402) | $0.01 per call |
| Failed call | Refunded, never charged |
Every response has x-credits-charged and x-credits-remaining headers. Credits never expire. Packs and calculator.
From an AI agent (MCP)
The same call is the airbnb_listing_get tool on the hosted MCP server, so Claude, Cursor or any MCP client can make it without code. Add the server once:
claude mcp add --transport http groundsocial https://api.groundsocial.dev/mcpThen ask for it in words (“One Airbnb listing: description, amenities, rules, host, photos, ratings, location”), or call the tool directly:
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "airbnb_listing_get",
"arguments": {
"id": "29990558"
}
}
}MCP setup for Claude Desktop, Cursor, VS Code and ChatGPT.
Use Airbnb listing get in a pipeline
One listing by id or link: title, summary and overview (guests, bedrooms, beds, baths), full description, location (approximate unless is_exact), overall and category ratings, Guest favorite, every amenity by group, house rules, safety notes, host (Superhost, rating, years hosting, response rate, bio) and photos with captions. check_in/check_out/adults are passed to Airbnb as the stay being viewed.
Keep going
- This call in Python, JavaScript, Go, PHP, cURL.
- Get an Airbnb listing API reference: every field and status code.
- Airbnb tutorials and all TypeScript tutorials.
- Airbnb API: every endpoint and price.
- How to search Airbnb stays with TypeScript: Search Airbnb stays by place or map box, with dates, guests and filters (18 a page).
- How to scrape availability of an Airbnb listing with TypeScript: An Airbnb listing’s availability calendar: bookable days and stay limits, up to 12 months.
- How to scrape reviews of an Airbnb listing with TypeScript: Guest reviews of an Airbnb listing, newest first or by rating (up to 50 a page).
Run it on your own data
One key for Airbnb and 76 more platforms, over REST or MCP. Free credits on signup, no card.
Airbnb is a trademark of its owner. We are not affiliated with or endorsed by it.