# zxol/airbnbapi architecture

> Architecture diagram of the GitHub repository zxol/airbnbapi, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-21). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/zxol/airbnbapi
- Repository: https://github.com/zxol/airbnbapi

## Overview

airbnbapijs is an unofficial Node.js wrapper around Airbnb’s private mobile API. A caller invokes promise-based methods on the exported API client; the client makes HTTP requests to Airbnb and returns parsed JSON results. Its documented domains include authorization, user profiles, listing search and details, calendar reads and updates, threads, reservations, and posting actions. The sampled implementation shows one composed listing helper and shared configuration and logging. Posting and some other capability internals are not fully sampled, so those branches are represented at the documented subsystem level.

Main entry points: [`src/main.js`](https://github.com/zxol/airbnbapi/blob/master/src/main.js) (API methods), [`src/metapoints.js`](https://github.com/zxol/airbnbapi/blob/master/src/metapoints.js) (Full listing helper), [`src/log.js`](https://github.com/zxol/airbnbapi/blob/master/src/log.js) (Logging), [`src/config.js`](https://github.com/zxol/airbnbapi/blob/master/src/config.js) (API configuration)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["API client"]
  node_api["API methods<br/>[main.js]"]
  node_listing_helper["Full listing helper<br/>[metapoints.js]"]
end

subgraph group_domain["Airbnb capabilities"]
  node_auth["Authorization<br/>[main.js]"]
  node_users["User profiles<br/>[main.js]"]
  node_listings["Listings<br/>[main.js]"]
  node_calendars["Calendars<br/>[main.js]"]
  node_threads["Threads<br/>[main.js]"]
  node_reservations["Reservations<br/>[main.js]"]
  node_posting["Posting actions<br/>[main.js]"]
end

subgraph group_support["Shared runtime"]
  node_request["HTTP request client"]
  node_config["API configuration<br/>[config.js]"]
  node_logging["Logging<br/>[log.js]"]
end

node_caller(("Library caller"))
node_airbnb{{"Airbnb API"}}

node_caller -->|"calls"| node_api
node_api -->|"provides"| node_auth
node_api -->|"provides"| node_users
node_api -->|"provides"| node_listings
node_api -->|"provides"| node_calendars
node_api -->|"provides"| node_threads
node_api -->|"provides"| node_reservations
node_api -->|"provides"| node_posting
node_auth -->|"sends requests"| node_request
node_users -->|"sends requests"| node_request
node_listings -->|"sends requests"| node_request
node_calendars -->|"sends requests"| node_request
node_threads -->|"sends requests"| node_request
node_reservations -->|"sends requests"| node_request
node_posting -->|"sends requests"| node_request
node_request -->|"calls API"| node_airbnb
node_api -->|"imports"| node_config
node_api -->|"logs errors"| node_logging
node_api -->|"mixes in"| node_listing_helper
node_listing_helper -->|"fetches listings"| node_listings
node_listing_helper -->|"logs errors"| node_logging
node_caller -->|"calls"| node_listing_helper

click node_api "https://github.com/zxol/airbnbapi/blob/master/src/main.js"
click node_auth "https://github.com/zxol/airbnbapi/blob/master/src/main.js"
click node_users "https://github.com/zxol/airbnbapi/blob/master/src/main.js"
click node_listings "https://github.com/zxol/airbnbapi/blob/master/src/main.js"
click node_calendars "https://github.com/zxol/airbnbapi/blob/master/src/main.js"
click node_threads "https://github.com/zxol/airbnbapi/blob/master/src/main.js"
click node_reservations "https://github.com/zxol/airbnbapi/blob/master/src/main.js"
click node_posting "https://github.com/zxol/airbnbapi/blob/master/src/main.js"
click node_listing_helper "https://github.com/zxol/airbnbapi/blob/master/src/metapoints.js"
click node_config "https://github.com/zxol/airbnbapi/blob/master/src/config.js"
click node_logging "https://github.com/zxol/airbnbapi/blob/master/src/log.js"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_api,node_listing_helper toneBlue
class node_auth,node_users,node_listings,node_calendars,node_threads,node_reservations,node_posting toneAmber
class node_request,node_config,node_logging,node_airbnb toneMint
class node_caller toneIndigo
```

## Components

### API client

- [API methods](https://github.com/zxol/airbnbapi/blob/master/src/main.js): `src/main.js`
- [Full listing helper](https://github.com/zxol/airbnbapi/blob/master/src/metapoints.js): `src/metapoints.js`

### Airbnb capabilities

- [Authorization](https://github.com/zxol/airbnbapi/blob/master/src/main.js): `src/main.js`
- [User profiles](https://github.com/zxol/airbnbapi/blob/master/src/main.js): `src/main.js`
- [Listings](https://github.com/zxol/airbnbapi/blob/master/src/main.js): `src/main.js`
- [Calendars](https://github.com/zxol/airbnbapi/blob/master/src/main.js): `src/main.js`
- [Threads](https://github.com/zxol/airbnbapi/blob/master/src/main.js): `src/main.js`
- [Reservations](https://github.com/zxol/airbnbapi/blob/master/src/main.js): `src/main.js`
- [Posting actions](https://github.com/zxol/airbnbapi/blob/master/src/main.js): `src/main.js`

### Shared runtime

- **HTTP request client**
- [API configuration](https://github.com/zxol/airbnbapi/blob/master/src/config.js): `src/config.js`
- [Logging](https://github.com/zxol/airbnbapi/blob/master/src/log.js): `src/log.js`

### Other components

- **Library caller**
- **Airbnb API**

## Connections

- Library caller → API methods: calls (evidence: `README.md`)
- API methods → Authorization: provides (evidence: `README.md`)
- API methods → User profiles: provides (evidence: `README.md`)
- API methods → Listings: provides (evidence: `README.md`)
- API methods → Calendars: provides (evidence: `README.md`)
- API methods → Threads: provides (evidence: `README.md`)
- API methods → Reservations: provides (evidence: `README.md`)
- API methods → Posting actions: provides (evidence: `README.md`)
- Authorization → HTTP request client: sends requests (evidence: `src/main.js`)
- User profiles → HTTP request client: sends requests (evidence: `src/main.js`)
- Listings → HTTP request client: sends requests (evidence: `src/main.js`)
- Calendars → HTTP request client: sends requests (evidence: `src/main.js`)
- Threads → HTTP request client: sends requests (evidence: `src/main.js`)
- Reservations → HTTP request client: sends requests (evidence: `src/main.js`)
- Posting actions → HTTP request client: sends requests (evidence: `src/main.js`)
- HTTP request client → Airbnb API: calls API
- API methods → API configuration: imports (evidence: `src/main.js`)
- API methods → Logging: logs errors (evidence: `src/main.js`)
- API methods → Full listing helper: mixes in (evidence: `src/main.js`)
- Full listing helper → Listings: fetches listings (evidence: `src/metapoints.js`)
- Full listing helper → Logging: logs errors (evidence: `src/metapoints.js`)
- Library caller → Full listing helper: calls (evidence: `README.md`)
