Resolve app names to App Store candidates
curl --request POST \
--url http://localhost:3000/api/search \
--header 'Content-Type: application/json' \
--header 'Origin: <api-key>' \
--data '
{
"name": "spotify",
"country": "us"
}
'import requests
url = "http://localhost:3000/api/search"
payload = {
"name": "spotify",
"country": "us"
}
headers = {
"Origin": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Origin: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: 'spotify', country: 'us'})
};
fetch('http://localhost:3000/api/search', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "3000",
CURLOPT_URL => "http://localhost:3000/api/search",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'spotify',
'country' => 'us'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"Origin: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "http://localhost:3000/api/search"
payload := strings.NewReader("{\n \"name\": \"spotify\",\n \"country\": \"us\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Origin", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("http://localhost:3000/api/search")
.header("Origin", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"spotify\",\n \"country\": \"us\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3000/api/search")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Origin"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"spotify\",\n \"country\": \"us\"\n}"
response = http.request(request)
puts response.read_body{
"results": [
{
"trackId": 123,
"trackName": "<string>",
"sellerName": "<string>",
"artworkUrl": "<string>",
"url": "<string>",
"bundleId": "<string>"
}
]
}Search
Resolve app names to App Store candidates
Hits Apple’s iTunes Search API and ranks the results.
POST
/
api
/
search
Resolve app names to App Store candidates
curl --request POST \
--url http://localhost:3000/api/search \
--header 'Content-Type: application/json' \
--header 'Origin: <api-key>' \
--data '
{
"name": "spotify",
"country": "us"
}
'import requests
url = "http://localhost:3000/api/search"
payload = {
"name": "spotify",
"country": "us"
}
headers = {
"Origin": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Origin: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: 'spotify', country: 'us'})
};
fetch('http://localhost:3000/api/search', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "3000",
CURLOPT_URL => "http://localhost:3000/api/search",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'spotify',
'country' => 'us'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"Origin: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "http://localhost:3000/api/search"
payload := strings.NewReader("{\n \"name\": \"spotify\",\n \"country\": \"us\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Origin", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("http://localhost:3000/api/search")
.header("Origin", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"spotify\",\n \"country\": \"us\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3000/api/search")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Origin"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"spotify\",\n \"country\": \"us\"\n}"
response = http.request(request)
puts response.read_body{
"results": [
{
"trackId": 123,
"trackName": "<string>",
"sellerName": "<string>",
"artworkUrl": "<string>",
"url": "<string>",
"bundleId": "<string>"
}
]
}Authorizations
sameOriginadminToken
Same-origin CSRF check. The Origin header must match the request host;
enforced for every mutating verb (POST, PUT, PATCH, DELETE).
Response
200 - application/json
Ranked list of matches.
Show child attributes
Show child attributes