Send POST request with “Get contents of URL?”

How would I put the following JSON request body into the “Get Contents of URL” action with POST in Shortcuts?

  method: 'POST',
  url: '',
  data: 'uri=',
  headers: {'Content-Type': 'multipart/form-data'},
  onload: function(r) {
    //parse r.responseText

I don’t think your provided URL is correct, and note that it would be useful to have access to the API documentation to check details.

I think the API call has to be HTTPS, not HTTP as it gives a 307 (temporary redirect). If you follow it through, it takes you to an HTTPS page on the domain’s website. Using HTTPS, there is a 302 (temporary move), but it then goes to the same reverse image search page you would get from loading via the web site; maybe the URL is just forwarding on? That’s where the documentation would be useful.

Here’s a shortcut with a basic call.

However, looking at the results, the resulting web page returned contains lazy loading of images and relative images. Maybe if you need to extract some of the images or something you could try this enhanced version of the shortcut.

If you instead wanted to go to the search page on the web site, take a look at the image ID that makes up the filename of the first image in the HTML (376c3c86f01eaf29d7e4ee1ec3cb4b36). You can pull that out of the HTML returned from the API, and use it in a URL to open the page.

The base URL is, so you just append the image ID, and open the resulting URL.

There is actually a bit of a shortcut we can take in doing that and implicitly get the URLs from the results and match for /search/color/ at the start of the URL. Something like this:

Hope that helps.


Thank you! This is exactly what I was looking for.