Add server-side filters to airbnb_search#32
Open
FabioFleitas wants to merge 2 commits into
Open
Conversation
Wire up the search filters Airbnb's UI exposes but the tool didn't: - amenities: typed enum array (wifi, air_conditioning, washer, kitchen, free_parking, pool, hot_tub, king_bed, self_checkin) → mapped to Airbnb's internal numeric IDs via a constants map - instantBook, guestFavorite booleans - minBedrooms, minBeds, minBathrooms numbers - ne_lat / ne_lng / sw_lat / sw_lng for manual bounding-box override, which suppresses Photon/Nominatim geocoding when all four are supplied The existing 'pets' parameter already filters for pet-friendly listings when set to >= 1; documented in the amenities description rather than adding a duplicate boolean. Superhost is no longer present in Airbnb's filter modal, so not exposed. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Adds Features bullets and parameter documentation for the amenity filters, Guest Favorite, Instant Book, min bedroom/bed/bathroom counts, and manual bbox override introduced in the previous commit. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds server-side filter parameters to
airbnb_searchfor the filters Airbnb's UI exposes but the tool didn't pass through. Lets agents narrow searches by amenities, quality flags, and minimum room counts before the response is returned, which matters on popular destinations where the unfiltered set is hundreds of listings.What changed
New
airbnb_searchparameters:amenities— typed enum array. Supported values:wifi,air_conditioning,washer,kitchen,free_parking,pool,hot_tub,king_bed,self_checkin. Mapped internally to Airbnb's numeric IDs (e.g.amenities[]=4).instantBook— boolean →ib=trueguestFavorite— boolean →guest_favorite=trueminBedrooms,minBeds,minBathrooms— numbers →min_*ne_lat,ne_lng,sw_lat,sw_lng— numbers. Manual bounding-box override; suppresses the Photon/Nominatim geocoder for that request when all four are supplied (useful when the agent already has map coordinates).README:
Implementation notes
AMENITY_IDS), discovered by toggling each filter in Airbnb's "All filters" modal and reading the URL. New amenities can be added with one line — same recon technique as future-proofing.amenities: ["king_bed"]rather than a separate bed-type filter. Documented in the parameter description.pets >= 1parameter already filters for pet-friendly listings (Airbnb encodes both aspets=N).Testing
End-to-end via the MCP stdio protocol against
Lisbon, Portugal:amenities: ["king_bed"]→ 0/5 overlap (completely different inventory)minBedrooms: 4→ 0/5 overlap (small-bedroom places filtered out)guestFavorite: true→ 4/5 overlap (clean subset of baseline, as expected for a curated bucket)instantBook: true→ 1/5 overlap (partial subset)