Skip to content

Web ​

URLs, HTTP requests, web pages, and RSS.

import Web;

addToReadingList ​

Adds URLs passed into the action to your reading list.

addToReadingList(url: Text)
ParameterTypeDefault
urlText—

Shortcuts action: is.workflow.actions.readinglist

expandUrl ​

This action expands and cleans up URLs which have been shortened using a URL shortening service like TinyURL or Bit.ly.

expandUrl(url: Text) -> URL
ParameterTypeDefault
urlText—

The expanded URL is cleaned, removing unnecessary parameters such as "utm_source".

Shortcuts action: is.workflow.actions.url.expand

findAppStoreApps ​

Searches the App Store, returning the apps that match the specified search terms. You can get more details about the results using the Get Details of App Store App action.

findAppStoreApps(search: Text, searchBy: Text, results: Text, region: Text, WFItemLimit: Number) -> App
ParameterTypeDefault
searchText—
searchByText—
resultsText—
regionText—
WFItemLimitNumber25

Shortcuts action: is.workflow.actions.searchappstore

findArticles ​

findArticles(sortBy: Enum, order: Enum, WFContentItemLimit: Boolean, WFContentItemLimitNumber: Number) -> Article
ParameterTypeDefault
sortByTitle | Author | Published Date | URL | Number of Words | Main Image URL | Excerpt | Body—
orderLatest First | Oldest First—
WFContentItemLimitBooleanfalse
WFContentItemLimitNumberNumber5

Shortcuts action: is.workflow.actions.filter.articles

findItunesStoreItems ​

Searches the iTunes Store, returning the items that match the specified search terms. You can get more details about the results using the Get Details of iTunes Product action.

findItunesStoreItems(search: Text, category: Text, searchBy: Text, results: Text, region: Text, WFItemLimit: Number) -> iTunesProduct
ParameterTypeDefault
searchText—
categoryText—
searchByText—
resultsText—
regionText—
WFItemLimitNumber25

Shortcuts action: is.workflow.actions.searchitunes

getArticleUsingSafariReader ​

Gets article details, including body text, author, publish date, and more, from every URL passed into the action.

getArticleUsingSafariReader(url: Text) -> Article
ParameterTypeDefault
urlText—

Use a Get Details of Article action immediately after this action to get specific details about the article. This action only supports getting one article from each URL.

Shortcuts action: is.workflow.actions.getarticle

getComponentOfUrl ​

Gets the specified part of the URL passed into the action.

getComponentOfUrl(url: Text, component: Enum) -> Text
ParameterTypeDefault
urlText—
componentScheme | User | Password | Host | Port | Path | Query | Fragment"Scheme"

URLs are structured as follows: scheme://user:password@host:port/path?query#fragment

Shortcuts action: is.workflow.actions.geturlcomponent

getContentsOfUrl ​

Gets the contents of URLs passed into the action. Useful for downloading files and web content, or for making API requests.

getContentsOfUrl(url: Text, method: Enum, ShowHeaders: Any, WFHTTPHeaders: Dictionary, requestBody: Enum, formValues: Dictionary, jsonValues: Dictionary, file: Any) -> File
ParameterTypeDefault
urlText—
methodGET | POST | PUT | PATCH | DELETE"GET"
ShowHeadersAny—
WFHTTPHeadersDictionary—
requestBodyJSON | Form | File"JSON"
formValuesDictionary—
jsonValuesDictionary—
fileAny—

To make a multipart HTTP request, choose "Form" as the request body type and add files as field values.

Shortcuts action: is.workflow.actions.downloadurl

getContentsOfWebPage ​

Extracts the contents of the web pages passed into the action.

getContentsOfWebPage(url: Text) -> Text
ParameterTypeDefault
urlText—

Shortcuts action: is.workflow.actions.getwebpagecontents

getCurrentWebPageFromSafari ​

Gets the web page of the frontmost Safari window.

getCurrentWebPageFromSafari() -> WebPage

Shortcuts action: is.workflow.actions.safari.geturl

getDetailsOfArticle ​

getDetailsOfArticle(get: Enum) -> Any
ParameterTypeDefault
getTitle | Author | Published Date | URL | Number of Words | Main Image URL | Excerpt | Body—

Shortcuts action: is.workflow.actions.properties.articles

getDetailsOfSafariWebPage ​

getDetailsOfSafariWebPage(get: Enum) -> Any
ParameterTypeDefault
getPage Contents | Page Selection | Page URL | Name—

Safari Web Page items are only available when running your shortcut as an Action Extension in Safari.

Shortcuts action: is.workflow.actions.properties.safariwebpage

getHeadersOfUrl ​

Retrieves the HTTP headers of the URL passed as input using a HEAD request.

getHeadersOfUrl(url: Text) -> Dictionary
ParameterTypeDefault
urlText—

Shortcuts action: is.workflow.actions.url.getheaders

getItemsFromRssFeed ​

Downloads the latest items from an RSS feed.

getItemsFromRssFeed(url: Text, WFRSSItemQuantity: Number) -> Article
ParameterTypeDefault
urlText"https://www.apple.com/newsroom/rss-feed.rss"
WFRSSItemQuantityNumber10

Shortcuts action: is.workflow.actions.rss

getRssFeedsFromPage ​

Extracts any RSS feed URLs from the given web URLs or web page.

getRssFeedsFromPage(page: Text) -> URL
ParameterTypeDefault
pageText—

Shortcuts action: is.workflow.actions.rss.extract

openUrls ​

Opens URLs passed into the action in Safari.

openUrls(url: Text)
ParameterTypeDefault
urlText—

Shortcuts action: is.workflow.actions.openurl

openXCallbackUrl ​

Performs the specified x-callback-url action. The x-success, x-cancel, and x-error parameters will be added automatically.

openXCallbackUrl(customCallback: Boolean, successKey: Text, cancelKey: Text, errorKey: Text, customXSuccessUrl: Boolean, xSuccessUrl: Text, xCallbackUrl: Text) -> Any
ParameterTypeDefault
customCallbackBoolean—
successKeyText"x-success"
cancelKeyText—
errorKeyText—
customXSuccessUrlBoolean—
xSuccessUrlText"shortcuts://callback"
xCallbackUrlText—

Shortcuts action: is.workflow.actions.openxcallbackurl

runjavascriptonwebpage ​

Runs JavaScript on a Safari web page passed in as input

runjavascriptonwebpage(javascript: Text, webPage: WebPage) -> Any
ParameterTypeDefault
javascriptText`"var result = [];
// Get all links from the page
var elements = document.querySelectorAll("a");
for (let element of elements) {
result.push({
    "url": element.href,
    "text": element.innerText
});

}

// Call completion to finish completion(result);"| |webPage` | WebPage | — |

Safari Web Page items are only available when running your shortcut as an Action Extension in Safari.

Shortcuts action: is.workflow.actions.runjavascriptonwebpage

searchWeb ​

Searches the web for the text provided as input.

searchWeb(service: Enum, text: Text)
ParameterTypeDefault
serviceAmazon | Bing | DuckDuckGo | eBay | Google | Reddit | Twitter | Yahoo! | YouTube"Google"
textText—

Shortcuts action: is.workflow.actions.searchweb

showInItunesStore ​

Shows the iTunes products or App Store apps passed as input in a store sheet. This is useful with the Find iTunes Store Items and Find App Store Apps actions.

showInItunesStore(product: App)
ParameterTypeDefault
productApp—

Shortcuts action: is.workflow.actions.showinstore

showWebView ​

Shows the web URL passed into the action in a Safari View Controller, allowing you to view the web page without switching apps.

showWebView(enterSafariReader: Boolean, url: Text)
ParameterTypeDefault
enterSafariReaderBooleanfalse
urlText—

Shortcuts action: is.workflow.actions.showwebpage

url ​

Passes the specified URL to the next action.

url(url: Text) -> URL
ParameterTypeDefault
urlText—

Shortcuts action: is.workflow.actions.url

urlEncode ​

Encodes or decodes text passed into the action to be suitable for inclusion in a URL by adding or removing percent escapes when appropriate.

urlEncode(mode: Enum, text: Text) -> Text
ParameterTypeDefault
modeEncode | Decode"Encode"
textText—

Shortcuts action: is.workflow.actions.urlencode