search mobile facets autocomplete spellcheck crawler rankings weights synonyms analytics engage api customize documentation install setup technology content domains user history info home business cart chart contact email activate analyticsalt analytics autocomplete cart contact content crawling custom documentation domains email engage faceted history info install mobile person querybuilder search setup spellcheck synonyms weights engage_search_term engage_related_content engage_next_results engage_personalized_results engage_recent_results success add arrow-down arrow-left arrow-right arrow-up caret-down caret-left caret-right caret-up check close content conversions-small conversions details edit grid help small-info error live magento minus move photo pin plus preview refresh search settings small-home stat subtract text trash unpin wordpress x alert case_deflection advanced-permissions keyword-detection predictive-ai sso

Fetch Fields

Specify which document fields to return.

engine_key
required
The Engine Key associated with your Engine. Found within your dashboard.
q
required
The query used within your search.
fetch_fields
optional
Requests with fetch_fields will only return the specified fields. Expects a DocumenType and an array of field names. Field names must coincide with those in your documents.
Example - Return documents from the books DocumenType that match the query "brothers", but only the author and price fields.
curl -XGET 'https://search-api.swiftype.com/api/v1/public/engines/search.json' \
  -H 'Content-Type: application/json' \
  -d '{
        "engine_key": "YOUR_ENGINE_KEY",
        "q": "brothers",
        "fetch_fields":{
          "books":["author","price"]
        }
      }'

Stuck? Looking for help? Contact support or check out the Site Search community forum!