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(WFURL: Text)
ParameterTypeDefault
WFURLText

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) -> Text
ParameterTypeDefault
URLText

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

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

filterArticles

filterArticles()

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

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(WFSearchTerm: Text, WFAttribute: Text, WFEntity: Text, WFCountry: Text, WFItemLimit: Number) -> Any
ParameterTypeDefault
WFSearchTermText
WFAttributeText
WFEntityText
WFCountryText
WFItemLimitNumber25

Shortcuts action: is.workflow.actions.searchappstore

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(WFSearchTerm: Text, WFMediaType: Text, WFAttribute: Text, WFEntity: Text, WFCountry: Text, WFItemLimit: Number) -> Any
ParameterTypeDefault
WFSearchTermText
WFMediaTypeText
WFAttributeText
WFEntityText
WFCountryText
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(WFWebPage: Text) -> Any
ParameterTypeDefault
WFWebPageText

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(WFURL: Text, WFURLComponent: Text) -> Text
ParameterTypeDefault
WFURLText
WFURLComponentText"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(WFURL: Text, WFHTTPMethod: Text, ShowHeaders: Any, WFHTTPHeaders: Dictionary, WFHTTPBodyType: Text, WFFormValues: Dictionary, WFJSONValues: Dictionary, WFRequestVariable: Any) -> Any
ParameterTypeDefault
WFURLText
WFHTTPMethodText"GET"
ShowHeadersAny
WFHTTPHeadersDictionary
WFHTTPBodyTypeText"JSON"
WFFormValuesDictionary
WFJSONValuesDictionary
WFRequestVariableAny

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(WFInput: Text) -> Text
ParameterTypeDefault
WFInputText

Shortcuts action: is.workflow.actions.getwebpagecontents

getCurrentWebPageFromSafari

Gets the web page of the frontmost Safari window.

getCurrentWebPageFromSafari() -> Any

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

getDetailsOfArticle

getDetailsOfArticle()

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

getDetailsOfSafariWebPage

getDetailsOfSafariWebPage()

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(WFInput: Text) -> Dictionary
ParameterTypeDefault
WFInputText

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

getItemsFromRssFeed

Downloads the latest items from an RSS feed.

getItemsFromRssFeed(WFRSSFeedURL: Text, WFRSSItemQuantity: Number) -> Text
ParameterTypeDefault
WFRSSFeedURLText"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(WFURLs: Text) -> Text
ParameterTypeDefault
WFURLsText

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

openUrls

Opens URLs passed into the action in Safari.

openUrls(WFInput: Text)
ParameterTypeDefault
WFInputText

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(WFXCallbackCustomCallbackEnabled: Boolean, WFXCallbackCustomSuccessKey: Text, WFXCallbackCustomCancelKey: Text, WFXCallbackCustomErrorKey: Text, WFXCallbackCustomSuccessURLEnabled: Boolean, WFXCallbackCustomSuccessURL: Text, WFXCallbackURL: Text) -> Any
ParameterTypeDefault
WFXCallbackCustomCallbackEnabledBoolean
WFXCallbackCustomSuccessKeyText"x-success"
WFXCallbackCustomCancelKeyText
WFXCallbackCustomErrorKeyText
WFXCallbackCustomSuccessURLEnabledBoolean
WFXCallbackCustomSuccessURLText"shortcuts://callback"
WFXCallbackURLText

Shortcuts action: is.workflow.actions.openxcallbackurl

runjavascriptonwebpage

Runs JavaScript on a Safari web page passed in as input

runjavascriptonwebpage(WFJavaScript: Text, WFInput: Any) -> Any
ParameterTypeDefault
WFJavaScriptText`"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);"| |WFInput|Any` | — |

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(WFSearchWebDestination: Text, WFInputText: Text)
ParameterTypeDefault
WFSearchWebDestinationText"Google"
WFInputTextText

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(WFProduct: Any)
ParameterTypeDefault
WFProductAny

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(WFEnterSafariReader: Boolean, WFURL: Text)
ParameterTypeDefault
WFEnterSafariReaderBooleanfalse
WFURLText

Shortcuts action: is.workflow.actions.showwebpage

url

Passes the specified URL to the next action.

url(WFURLActionURL: Text) -> Text
ParameterTypeDefault
WFURLActionURLText

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(WFEncodeMode: Text, WFInput: Text) -> Text
ParameterTypeDefault
WFEncodeModeText"Encode"
WFInputText

Shortcuts action: is.workflow.actions.urlencode