100 free credits. No credit card required. Get a key

How to get an Airbnb listing with JavaScript

One Airbnb listing: description, amenities, rules, host, photos, ratings, location.

The examples use the fetch built into Node.js 18+ (and every browser and edge runtime), with AbortSignal.timeout and top-level await, and no dependencies.

GET /v1/airbnb/listing1 credit per callRefunded on failureBeta

Before you start

  1. Get an API keySign up for 100 free credits, no card. Keys start with gs_live_.
  2. Put it in the environmentEvery example reads it from GROUNDSOCIAL_API_KEY: export GROUNDSOCIAL_API_KEY=gs_live_…
  3. Set up JavaScriptnode --version # 18 or newer: fetch is built in, nothing to install

Call Get an Airbnb listing API from JavaScript

GET /v1/airbnb/listing. Save this as main.mjs and run node main.mjs. It prints listing.title and listing.host.rating.

main.mjs
// main.mjs: Node.js 18+, no dependencies
const url = new URL('https://api.groundsocial.dev/v1/airbnb/listing')
url.searchParams.set('id', '29990558')

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()
  throw new Error(`${error.code}: ${error.hint ?? error.message}`)
}
const data = await res.json()

console.log(data.listing?.title, data.listing?.host?.rating)

console.log('credits charged:', res.headers.get('x-credits-charged'))

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.

200 OK
{
  "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

FieldTypeDescription
listingAirbnbListing–

Parameters

NameInTypeDescription
idquerystringAirbnb listing id. Example: 29990558.
urlquerystringA listing link, https://www.airbnb.com/rooms/<id> (any Airbnb domain). Example: https://www.airbnb.com/rooms/29990558.
check_inquerystringArrival day, YYYY-MM-DD. Example: 2026-12-10.
check_outquerystringDeparture day, YYYY-MM-DD. Example: 2026-12-10.
adultsqueryinteger | nullAdults.

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.

Errors
async function call(url, init = {}, attempt = 0) {
  const res = await fetch(url, {
    ...init,
    headers: { Authorization: `Bearer ${process.env.GROUNDSOCIAL_API_KEY}`, ...init.headers },
    signal: AbortSignal.timeout(60_000),
  })
  if (res.ok) return res.json()
  const { error } = await res.json()
  // Branch on error.code (stable); error.hint says what to do next.
  if (error.retryable && attempt < 2) {
    const wait = Number(res.headers.get('retry-after') ?? 2)
    await new Promise((r) => setTimeout(r, wait * 1000))
    return call(url, init, attempt + 1)
  }
  throw Object.assign(new Error(error.hint ?? error.message), { code: error.code })
}
StatusMeaning
200The listing.
400Invalid input. Nothing was charged.
401Missing or invalid API key.
402Not enough credits, a spend cap was reached, or payment is required.
403The target is private, or the account is suspended.
404No public Airbnb listing with that id.
429Too many requests. Wait for Retry-After seconds.
503Airbnb is temporarily unavailable. Retryable; nothing was charged.

Every error code and what to do about it.

Pricing

Cost
Per call1 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 callRefunded, 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:

bash
claude mcp add --transport http groundsocial https://api.groundsocial.dev/mcp

Then ask for it in words (“One Airbnb listing: description, amenities, rules, host, photos, ratings, location”), or call the tool directly:

json
{
  "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

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.