What is SearchAction structured data, and how do you use it?
guide // , 4 min read, by Darthwares
SearchAction structured data is a Schema.org vocabulary type that defines how search capabilities are exposed to software. It allows website owners to link a WebSite entity to an actionable target endpoint for performing internal searches. By using potentialAction properties, machines can read instructions to construct valid search query URLs for a specific domain.
On this page // 5 sections
The short version
- SearchAction describes a potential action that allows systems to execute search queries on a site.
- It connects to a WebSite entity through the potentialAction property.
- Target search URLs use IETF RFC 6570 URI templates for variable expansion.
- EntryPoint properties define the HTTP method, request encodings, and response content types.
What is SearchAction structured data?
Schema.org defines a WebSite as a collection of related web pages and items served from a single web domain accessible through URLs. To describe capabilities that can be executed on a site, Schema.org provides the potentialAction property. This property describes the prototype of an action that can be taken on an entity, placing the site in an object role for an idealized action.
Schema.org introduced the potentialAction framework to differentiate actions that might happen in the future from actions that have already occurred or are currently taking place. This mechanism allows developers to describe an action capability and specify how that capability can be exercised by external software.
Within this framework, a SearchAction represents an action type that generally leads to a FindAction, though it does not strictly have to. It indicates a target EntryPoint or URL for the action, or points to a page or CreativeWork where the search action is the main entity described.
How do target entry points and URI templates work?
In Schema.org structured data, potential actions materialize when executed against a target EntryPoint. An EntryPoint defines the target URL or platform where the action takes place. It can specify technical properties such as the supported HTTP method, the encoding types accepted for requests, and the content types returned in responses.
The target property inside an EntryPoint uses a URI template string to indicate how execution URLs are constructed. According to IETF RFC 6570 specifications, a URI Template is a compact sequence of characters describing a range of URIs through variable expansion. This standard abstracts a space of resource identifiers so variable components are easy to identify and parse.
URI templates provide both a structural description of a resource space and machine-readable instructions for building a final URI. Under RFC 6570, transformation into a full URI reference occurs by replacing delimited expression placeholders with specific variable values. Schema.org relies on this RFC 6570 variable expansion to inline input property values directly into action target URLs.
What properties belong to WebSite and SearchAction entities?
A WebSite entity represents a set of related web pages hosted under a single web domain. Schema.org defines several optional metadata properties for WebSite entities, including an abstract, which offers a short summary of a creative work, and an International Standard Serial Number, or ISSN, to identify serial publications.
For search actions, the primary focus is linking the WebSite to a SearchAction through the potentialAction property. The SearchAction then specifies an EntryPoint target URL, which defines the exact platform where the search query executes.
The EntryPoint entity can further define execution requirements for web clients. These properties include the HTTP method required for the request, supported request encoding types, and supported response content types to ensure proper server interaction.
How do you test and troubleshoot SearchAction markup?
Troubleshooting structured data implementation requires systematic checks of the entity hierarchy and template definitions. Ensuring that search actions materialize correctly requires validating both the Schema.org model and the underlying RFC 6570 URI template parameters.
- 01Verify that the top-level WebSite entity contains a potentialAction property populated with a valid SearchAction type.
- 02Inspect the target property of the EntryPoint to confirm the URL template uses valid RFC 6570 syntax for variable replacement.
- 03Check that the EntryPoint explicitly declares the required HTTP method and supported encoding or content types if non-standard defaults are used.
| Symptom | Verification check | Resolution |
|---|---|---|
| URL variable fails to resolve | Check template syntax against RFC 6570 rules | Ensure variable expressions use standard delimited syntax for expansion. |
| Action endpoint rejects request | Verify declared HTTP method on EntryPoint | Match the EntryPoint HTTP method property with destination server requirements. |
| Target URL cannot be materialized | Inspect potentialAction mapping to target EntryPoint | Ensure the potentialAction points directly to a valid target EntryPoint. |
Common questions
What is the main purpose of the potentialAction property?
Schema.org introduced potentialAction to describe the prototype of an action that can be performed in the future, distinguishing potential actions from completed or ongoing ones.
What is a URI Template in SearchAction markup?
A URI Template is defined by RFC 6570 as a compact character sequence that describes a range of URIs through variable expansion, providing instructions to build machine-readable URLs.
Does a SearchAction always lead to a FindAction?
Schema.org notes that a SearchAction generally leads to a FindAction, but it does not strictly have to in every implementation.
What technical details can an EntryPoint specify?
An EntryPoint can define the target URL template, high-level platforms, supported request encoding types, supported response content types, and the required HTTP method.
Primary sources and further reading
This article was researched and written by an AI model and published automatically. It was written from sentences that were checked to appear on the pages below, but a person has not reviewed the text. If something is wrong, tell us at chibivikramathithan@darthwares.com and we will correct it.