Skip to content

--exclude-fields advertises photos/reviews, but those fields are never returned #77

Closed

Description

@willwhite

Summary

--exclude-fields documents photos and reviews as omittable metadata fields (per --schema), but neither field ever appears in search responses — even with nothing excluded. Excluding them is therefore a no-op. This affects both search forward and search category.

Environment

  • mapbox CLI v0.3.0
  • macOS (darwin 25.6.0)
  • Auth: mapbox auth login (no MAPBOX_ACCESS_TOKEN in env)

What the CLI documents

$ mapbox search forward --schema
...
--exclude-fields: "A comma-separated list of metadata fields to omit from the
response, to reduce payload size. Accepts `photos`, `reviews`."

Steps to reproduce

# Default response — nothing excluded — for POIs that should have photos/reviews
mapbox search forward --q "Blue Bottle Coffee Ferry Building" --limit 1 --output json \
  | jq '.features[0].properties.metadata'

Expected

Either the default response includes photos / reviews metadata (so excluding them is meaningful), or the flag shouldn't advertise fields that are never present.

Actual

metadata only ever contains open_hours, phone, website. No photos, reviews, or rating keys appear — across multiple well-known POIs:

Query photo/review/rating keys in response
Blue Bottle Coffee, Ferry Building (SF) none
The French Laundry, Yountville none
Katz's Delicatessen, NYC none

Excluding them changes nothing — identical output with and without the flag:

mapbox search forward --q "Blue Bottle Coffee Ferry Building" --limit 1 --output json \
  | jq -S '.features[0].properties' > a.json
mapbox search forward --q "Blue Bottle Coffee Ferry Building" --limit 1 \
  --exclude-fields photos,reviews --output json \
  | jq -S '.features[0].properties' > b.json
diff a.json b.json   # -> no differences

Scope

Reproduces on both search forward and search category.

Activity

  1. zmofei commented on Oct 5, 2026

    @zmofei
    Member

    Thanks for the detailed report. The --exclude-fields description comes straight from the Search Box API docs (https://docs.mapbox.com/api/search/search-box/), which list photos and reviews as accepted values for both /forward and /category. We are confirming with the Search team when these fields are actually returned, and will update the CLI description based on their answer.

  2. zmofei commented on Oct 5, 2026

    @zmofei
    Member

    @willwhite Thanks again. The Search team confirmed that photos and reviews are only returned for accounts with a specific data provider arrangement, so for most users --exclude-fields has no effect. We'll remove the flag from search forward and search category in #79.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions