Image search
import requests
url = "https://api.parallel.ai/v1/images/search"
payload = { "search_queries": ["<string>"] }
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({search_queries: ['<string>']})
};
fetch('https://api.parallel.ai/v1/images/search', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://api.parallel.ai/v1/images/search \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"search_queries": [
"<string>"
]
}
'{
"search_id": "search_fcb2b4f3c75e418687bccaa1a8381331",
"session_id": "session_fcb2b4f3c75e418687bccaa1a8381331",
"results": [
{
"title": "Golden Gate Bridge at sunset",
"image_url": "https://www.example.com/images/golden-gate.jpg",
"source_page_url": "https://www.example.com/golden-gate-bridge",
"width": 1920,
"height": 1080
}
]
}{
"type": "error",
"error": {
"ref_id": "search_fcb2b4f3c75e418687bccaa1a8381331",
"message": "Request validation error"
}
}Specialized Search
Image search
Searches the web for images.
POST
/
v1
/
images
/
search
Image search
import requests
url = "https://api.parallel.ai/v1/images/search"
payload = { "search_queries": ["<string>"] }
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({search_queries: ['<string>']})
};
fetch('https://api.parallel.ai/v1/images/search', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://api.parallel.ai/v1/images/search \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"search_queries": [
"<string>"
]
}
'{
"search_id": "search_fcb2b4f3c75e418687bccaa1a8381331",
"session_id": "session_fcb2b4f3c75e418687bccaa1a8381331",
"results": [
{
"title": "Golden Gate Bridge at sunset",
"image_url": "https://www.example.com/images/golden-gate.jpg",
"source_page_url": "https://www.example.com/golden-gate-bridge",
"width": 1920,
"height": 1080
}
]
}{
"type": "error",
"error": {
"ref_id": "search_fcb2b4f3c75e418687bccaa1a8381331",
"message": "Request validation error"
}
}Body
application/json
Image search request.
Response
Successful Response
Image search response.