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

Getting Started with App Search

Welcome to App Search!

You are a few short steps away from building your next great search experience.

1 - Create an Engine

An Engine is your search engine. It is an information repository that specializes in search.

It contains your document records and provides robust features and insightful analytics data.

To create an Engine, locate and click the Create an Engine button from your account home page.

Your Engine can be optimized to perform in many languages, or you can default to Universal.

Pick a language, provide a name, then click Create Engine.

Creating an Engine - Enter your new Engine's name
Creating an Engine

2 - Index Documents

You can index any JSON object, which will become a search-optimized document within your Engine.

A schema is created for you when you index your data - you do not need to specify any schema or alter your data before uploading. You can alter your schema later to set the appropriate data types.

You have two options for indexing:

1: Paste or Upload: Click into Documents, then click Index Documents.

2: Use the /documents API endpoint, an example request is below.

The API Logs submenu will provide information on the requests made against your Engine.

Example - Indexing test objects into an Engine. Note that [HOST_IDENTIFIER], [ENGINE_NAME], and the [PRIVATE_API_KEY] are available within the Credentials tab.
curl -X POST 'https://[HOST_IDENTIFIER].api.swiftype.com/api/as/v1/engines/[ENGINE_NAME]/documents' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer [PRIVATE_API_KEY]' \
-d '[
      {
        "description": "Covering most of Mount Desert Island and other coastal islands, Acadia features the tallest mountain on the Atlantic coast of the United States, granite peaks, ocean shoreline, woodlands, and lakes. There are freshwater, estuary, forest, and intertidal habitats.",
        "nps_link": "https://www.nps.gov/acad/index.htm",
        "states": [
          "Maine"
        ],
        "title": "Acadia",
        "id": "park_acadia",
        "visitors": 3303393,
        "world_heritage_site": false,
        "location": "44.35,-68.21",
        "acres": 49057.36,
        "square_km": 198.5,
        "date_established": "1919-02-26T06:00:00Z"
      },
      {
        "description": "The southernmost National Park is on three Samoan islands and protects coral reefs, rainforests, volcanic mountains, and white beaches. The area is also home to flying foxes, brown boobies, sea turtles, and 900 species of fish.",
        "nps_link": "https://www.nps.gov/npsa/index.htm",
        "states": [
          "American Samoa"
        ],
        "title": "American Samoa",
        "id": "park_american-samoa",
        "visitors": 28892,
        "world_heritage_site": false,
        "location": "-14.25,-170.68",
        "acres": 8256.67,
        "square_km": 33.4,
        "date_established": "1988-10-31T06:00:00Z"
      }
    ]'

Example - Indexing test objects into an Engine. Note that [HOST_IDENTIFIER], [ENGINE_NAME], and the [PRIVATE_API_KEY] are available within the Credentials tab.
No Java example available, showing cURL
curl -X POST 'https://[HOST_IDENTIFIER].api.swiftype.com/api/as/v1/engines/[ENGINE_NAME]/documents' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer [PRIVATE_API_KEY]' \
-d '[
      {
        "description": "Covering most of Mount Desert Island and other coastal islands, Acadia features the tallest mountain on the Atlantic coast of the United States, granite peaks, ocean shoreline, woodlands, and lakes. There are freshwater, estuary, forest, and intertidal habitats.",
        "nps_link": "https://www.nps.gov/acad/index.htm",
        "states": [
          "Maine"
        ],
        "title": "Acadia",
        "id": "park_acadia",
        "visitors": 3303393,
        "world_heritage_site": false,
        "location": "44.35,-68.21",
        "acres": 49057.36,
        "square_km": 198.5,
        "date_established": "1919-02-26T06:00:00Z"
      },
      {
        "description": "The southernmost National Park is on three Samoan islands and protects coral reefs, rainforests, volcanic mountains, and white beaches. The area is also home to flying foxes, brown boobies, sea turtles, and 900 species of fish.",
        "nps_link": "https://www.nps.gov/npsa/index.htm",
        "states": [
          "American Samoa"
        ],
        "title": "American Samoa",
        "id": "park_american-samoa",
        "visitors": 28892,
        "world_heritage_site": false,
        "location": "-14.25,-170.68",
        "acres": 8256.67,
        "square_km": 33.4,
        "date_established": "1988-10-31T06:00:00Z"
      }
    ]'

Example - Indexing test objects into an Engine. Note that [HOST_IDENTIFIER], [ENGINE_NAME], and the [PRIVATE_API_KEY] are available within the Credentials tab.
const SwiftypeAppSearchClient = require('swiftype-app-search-node')

const client = new SwiftypeAppSearchClient('[HOST_IDENTIFIER]', '[PRIVATE_API_KEY]') const engineName = '[ENGINE_NAME]' documents = [ { "description": "Covering most of Mount Desert Island and other coastal islands, Acadia features the tallest mountain on the Atlantic coast of the United States, granite peaks, ocean shoreline, woodlands, and lakes. There are freshwater, estuary, forest, and intertidal habitats.", "nps_link": "https://www.nps.gov/acad/index.htm", "states": [ "Maine" ], "title": "Acadia", "id": "park_acadia", "visitors": 3303393, "world_heritage_site": false, "location": "44.35,-68.21", "acres": 49057.36, "square_km": 198.5, "date_established": "1919-02-26T06:00:00Z" }, { "description": "The southernmost National Park is on three Samoan islands and protects coral reefs, rainforests, volcanic mountains, and white beaches. The area is also home to flying foxes, brown boobies, sea turtles, and 900 species of fish.", "nps_link": "https://www.nps.gov/npsa/index.htm", "states": [ "American Samoa" ], "title": "American Samoa", "id": "park_american-samoa", "visitors": 28892, "world_heritage_site": false, "location": "-14.25,-170.68", "acres": 8256.67, "square_km": 33.4, "date_established": "1988-10-31T06:00:00Z" } ]

client.indexDocuments(engineName, documents) .then((indexDocumentResults) => { // handle index document results }) .catch((error) => { // handle error })

Example - Indexing test objects into an Engine. Note that [HOST_IDENTIFIER], [ENGINE_NAME], and the [PRIVATE_API_KEY] are available within the Credentials tab.
require 'swiftype-app-search'

client = SwiftypeAppSearch::Client.new(:host_identifier => '[HOST_IDENTIFIER]', :api_key => '[PRIVATE_API_KEY]) engine_name = '[ENGINE_NAME]' documents = [ { "description": "Covering most of Mount Desert Island and other coastal islands, Acadia features the tallest mountain on the Atlantic coast of the United States, granite peaks, ocean shoreline, woodlands, and lakes. There are freshwater, estuary, forest, and intertidal habitats.", "nps_link": "https://www.nps.gov/acad/index.htm", "states": [ "Maine" ], "title": "Acadia", "id": "park_acadia", "visitors": 3303393, "world_heritage_site": false, "location": "44.35,-68.21", "acres": 49057.36, "square_km": 198.5, "date_established": "1919-02-26T06:00:00Z" }, { "description": "The southernmost National Park is on three Samoan islands and protects coral reefs, rainforests, volcanic mountains, and white beaches. The area is also home to flying foxes, brown boobies, sea turtles, and 900 species of fish.", "nps_link": "https://www.nps.gov/npsa/index.htm", "states": [ "American Samoa" ], "title": "American Samoa", "id": "park_american-samoa", "visitors": 28892, "world_heritage_site": false, "location": "-14.25,-170.68", "acres": 8256.67, "square_km": 33.4, "date_established": "1988-10-31T06:00:00Z" } ]

begin index_document_results = client.index_documents(engine_name, documents) # handle index document results rescue SwiftypeAppSearch::ClientException => e # handle error end

Example - Indexing test objects into an Engine. Note that [HOST_IDENTIFIER], [ENGINE_NAME], and the [PRIVATE_API_KEY] are available within the Credentials tab.
from swiftype_app_search import Client
from swiftype_app_search.exceptions import SwiftypeAppSearchError

client = Client('[HOST_IDENTIFIER]', '[PRIVATE_API_KEY]') engine_name = '[ENGINE_NAME] documents = [ { "description": "Covering most of Mount Desert Island and other coastal islands, Acadia features the tallest mountain on the Atlantic coast of the United States, granite peaks, ocean shoreline, woodlands, and lakes. There are freshwater, estuary, forest, and intertidal habitats.", "nps_link": "https://www.nps.gov/acad/index.htm", "states": [ "Maine" ], "title": "Acadia", "id": "park_acadia", "visitors": 3303393, "world_heritage_site": false, "location": "44.35,-68.21", "acres": 49057.36, "square_km": 198.5, "date_established": "1919-02-26T06:00:00Z" }, { "description": "The southernmost National Park is on three Samoan islands and protects coral reefs, rainforests, volcanic mountains, and white beaches. The area is also home to flying foxes, brown boobies, sea turtles, and 900 species of fish.", "nps_link": "https://www.nps.gov/npsa/index.htm", "states": [ "American Samoa" ], "title": "American Samoa", "id": "park_american-samoa", "visitors": 28892, "world_heritage_site": false, "location": "-14.25,-170.68", "acres": 8256.67, "square_km": 33.4, "date_established": "1988-10-31T06:00:00Z" } ]

try: index_document_results = client.index_documents(engine_name, documents) except SwiftypeAppSearchError: # handle exception pass

Example - Indexing test objects into an Engine. Note that [HOST_IDENTIFIER], [ENGINE_NAME], and the [PRIVATE_API_KEY] are available within the Credentials tab.
No Javascript example available, showing cURL
curl -X POST 'https://[HOST_IDENTIFIER].api.swiftype.com/api/as/v1/engines/[ENGINE_NAME]/documents' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer [PRIVATE_API_KEY]' \
-d '[
      {
        "description": "Covering most of Mount Desert Island and other coastal islands, Acadia features the tallest mountain on the Atlantic coast of the United States, granite peaks, ocean shoreline, woodlands, and lakes. There are freshwater, estuary, forest, and intertidal habitats.",
        "nps_link": "https://www.nps.gov/acad/index.htm",
        "states": [
          "Maine"
        ],
        "title": "Acadia",
        "id": "park_acadia",
        "visitors": 3303393,
        "world_heritage_site": false,
        "location": "44.35,-68.21",
        "acres": 49057.36,
        "square_km": 198.5,
        "date_established": "1919-02-26T06:00:00Z"
      },
      {
        "description": "The southernmost National Park is on three Samoan islands and protects coral reefs, rainforests, volcanic mountains, and white beaches. The area is also home to flying foxes, brown boobies, sea turtles, and 900 species of fish.",
        "nps_link": "https://www.nps.gov/npsa/index.htm",
        "states": [
          "American Samoa"
        ],
        "title": "American Samoa",
        "id": "park_american-samoa",
        "visitors": 28892,
        "world_heritage_site": false,
        "location": "-14.25,-170.68",
        "acres": 8256.67,
        "square_km": 33.4,
        "date_established": "1988-10-31T06:00:00Z"
      }
    ]'

3 - Search

Now that you have documents within your Engine, you are ready to search!

You can use the Reference UI to test your data against a slick and open source search experience built atop React. Or, you might use the Query Tester (pictured below). If you want to start exploring the various, powerful features within the search API, read the search guide or click right into the search API Reference.

Testing a query - Enter any term that matches one or more documents
Query Tester

Learn App Search

We covered the most important aspects of interacting with an App Search Engine. Now it is time to dive deep into key concepts. Consider learning about Authentication, then spend some time with the the API Overview, or discover how to wield query-time Relevance Tuning.

Enjoy!


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