Query vector store
curl --request POST \
--url https://api.askmy.biz/query \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"job_id": "vI2wMzZwuf2l1hkYYO_Fb",
"namespace": "avamo_fr",
"query": "<string>",
"schema": {
"type": "object",
"properties": {
"product_categories": {
"type": "array",
"items": {
"type": "object",
"properties": {
"product_type": {
"type": "string"
},
"reasoning": {
"type": "string"
},
"source_urls": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
}
}
},
"prompt": "<string>",
"k": 5
}
'import requests
url = "https://api.askmy.biz/query"
payload = {
"job_id": "vI2wMzZwuf2l1hkYYO_Fb",
"namespace": "avamo_fr",
"query": "<string>",
"schema": {
"type": "object",
"properties": { "product_categories": {
"type": "array",
"items": {
"type": "object",
"properties": {
"product_type": { "type": "string" },
"reasoning": { "type": "string" },
"source_urls": {
"type": "array",
"items": { "type": "string" }
}
}
}
} }
},
"prompt": "<string>",
"k": 5
}
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({
job_id: 'vI2wMzZwuf2l1hkYYO_Fb',
namespace: 'avamo_fr',
query: '<string>',
schema: {
type: 'object',
properties: {
product_categories: {
type: 'array',
items: {
type: 'object',
properties: {
product_type: {type: 'string'},
reasoning: {type: 'string'},
source_urls: {type: 'array', items: {type: 'string'}}
}
}
}
}
},
prompt: '<string>',
k: 5
})
};
fetch('https://api.askmy.biz/query', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.askmy.biz/query",
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([
'job_id' => 'vI2wMzZwuf2l1hkYYO_Fb',
'namespace' => 'avamo_fr',
'query' => '<string>',
'schema' => [
'type' => 'object',
'properties' => [
'product_categories' => [
'type' => 'array',
'items' => [
'type' => 'object',
'properties' => [
'product_type' => [
'type' => 'string'
],
'reasoning' => [
'type' => 'string'
],
'source_urls' => [
'type' => 'array',
'items' => [
'type' => 'string'
]
]
]
]
]
]
],
'prompt' => '<string>',
'k' => 5
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <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 := "https://api.askmy.biz/query"
payload := strings.NewReader("{\n \"job_id\": \"vI2wMzZwuf2l1hkYYO_Fb\",\n \"namespace\": \"avamo_fr\",\n \"query\": \"<string>\",\n \"schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"product_categories\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\",\n \"properties\": {\n \"product_type\": {\n \"type\": \"string\"\n },\n \"reasoning\": {\n \"type\": \"string\"\n },\n \"source_urls\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n }\n }\n }\n }\n }\n }\n },\n \"prompt\": \"<string>\",\n \"k\": 5\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<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("https://api.askmy.biz/query")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"job_id\": \"vI2wMzZwuf2l1hkYYO_Fb\",\n \"namespace\": \"avamo_fr\",\n \"query\": \"<string>\",\n \"schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"product_categories\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\",\n \"properties\": {\n \"product_type\": {\n \"type\": \"string\"\n },\n \"reasoning\": {\n \"type\": \"string\"\n },\n \"source_urls\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n }\n }\n }\n }\n }\n }\n },\n \"prompt\": \"<string>\",\n \"k\": 5\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.askmy.biz/query")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"job_id\": \"vI2wMzZwuf2l1hkYYO_Fb\",\n \"namespace\": \"avamo_fr\",\n \"query\": \"<string>\",\n \"schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"product_categories\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\",\n \"properties\": {\n \"product_type\": {\n \"type\": \"string\"\n },\n \"reasoning\": {\n \"type\": \"string\"\n },\n \"source_urls\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n }\n }\n }\n }\n }\n }\n },\n \"prompt\": \"<string>\",\n \"k\": 5\n}"
response = http.request(request)
puts response.read_body{
"job_id": "<string>",
"namespace": "<string>",
"query": "<string>",
"answer": {},
"metadata": {
"processing_time_ms": 123
}
}{
"error": "<string>"
}API Reference
Query vector store
Interrogate the vector store for information related to a given job_id or namespace. The job must be completed before querying can be performed.
POST
/
query
Query vector store
curl --request POST \
--url https://api.askmy.biz/query \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"job_id": "vI2wMzZwuf2l1hkYYO_Fb",
"namespace": "avamo_fr",
"query": "<string>",
"schema": {
"type": "object",
"properties": {
"product_categories": {
"type": "array",
"items": {
"type": "object",
"properties": {
"product_type": {
"type": "string"
},
"reasoning": {
"type": "string"
},
"source_urls": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
}
}
},
"prompt": "<string>",
"k": 5
}
'import requests
url = "https://api.askmy.biz/query"
payload = {
"job_id": "vI2wMzZwuf2l1hkYYO_Fb",
"namespace": "avamo_fr",
"query": "<string>",
"schema": {
"type": "object",
"properties": { "product_categories": {
"type": "array",
"items": {
"type": "object",
"properties": {
"product_type": { "type": "string" },
"reasoning": { "type": "string" },
"source_urls": {
"type": "array",
"items": { "type": "string" }
}
}
}
} }
},
"prompt": "<string>",
"k": 5
}
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({
job_id: 'vI2wMzZwuf2l1hkYYO_Fb',
namespace: 'avamo_fr',
query: '<string>',
schema: {
type: 'object',
properties: {
product_categories: {
type: 'array',
items: {
type: 'object',
properties: {
product_type: {type: 'string'},
reasoning: {type: 'string'},
source_urls: {type: 'array', items: {type: 'string'}}
}
}
}
}
},
prompt: '<string>',
k: 5
})
};
fetch('https://api.askmy.biz/query', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.askmy.biz/query",
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([
'job_id' => 'vI2wMzZwuf2l1hkYYO_Fb',
'namespace' => 'avamo_fr',
'query' => '<string>',
'schema' => [
'type' => 'object',
'properties' => [
'product_categories' => [
'type' => 'array',
'items' => [
'type' => 'object',
'properties' => [
'product_type' => [
'type' => 'string'
],
'reasoning' => [
'type' => 'string'
],
'source_urls' => [
'type' => 'array',
'items' => [
'type' => 'string'
]
]
]
]
]
]
],
'prompt' => '<string>',
'k' => 5
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <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 := "https://api.askmy.biz/query"
payload := strings.NewReader("{\n \"job_id\": \"vI2wMzZwuf2l1hkYYO_Fb\",\n \"namespace\": \"avamo_fr\",\n \"query\": \"<string>\",\n \"schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"product_categories\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\",\n \"properties\": {\n \"product_type\": {\n \"type\": \"string\"\n },\n \"reasoning\": {\n \"type\": \"string\"\n },\n \"source_urls\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n }\n }\n }\n }\n }\n }\n },\n \"prompt\": \"<string>\",\n \"k\": 5\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<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("https://api.askmy.biz/query")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"job_id\": \"vI2wMzZwuf2l1hkYYO_Fb\",\n \"namespace\": \"avamo_fr\",\n \"query\": \"<string>\",\n \"schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"product_categories\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\",\n \"properties\": {\n \"product_type\": {\n \"type\": \"string\"\n },\n \"reasoning\": {\n \"type\": \"string\"\n },\n \"source_urls\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n }\n }\n }\n }\n }\n }\n },\n \"prompt\": \"<string>\",\n \"k\": 5\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.askmy.biz/query")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"job_id\": \"vI2wMzZwuf2l1hkYYO_Fb\",\n \"namespace\": \"avamo_fr\",\n \"query\": \"<string>\",\n \"schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"product_categories\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\",\n \"properties\": {\n \"product_type\": {\n \"type\": \"string\"\n },\n \"reasoning\": {\n \"type\": \"string\"\n },\n \"source_urls\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n }\n }\n }\n }\n }\n }\n },\n \"prompt\": \"<string>\",\n \"k\": 5\n}"
response = http.request(request)
puts response.read_body{
"job_id": "<string>",
"namespace": "<string>",
"query": "<string>",
"answer": {},
"metadata": {
"processing_time_ms": 123
}
}{
"error": "<string>"
}Authorizations
API key for authentication
Body
application/json
Unique identifier for the crawl job. At least one of job_id or namespace must be provided.
Example:
"vI2wMzZwuf2l1hkYYO_Fb"
Namespace identifier, useful to reference a specific crawl using your internal identifier. At least one of job_id or namespace must be provided.
Example:
"avamo_fr"
The query to execute against the vector store
A JSON schema defining the structure of extracted data. Read more about it on OpenAI's Structured Outputs documentation
Example:
{
"type": "object",
"properties": {
"product_categories": {
"type": "array",
"items": {
"type": "object",
"properties": {
"product_type": { "type": "string" },
"reasoning": { "type": "string" },
"source_urls": {
"type": "array",
"items": { "type": "string" }
}
}
}
}
}
}
Custom prompt to guide the query processing
Number of similar vectors to retrieve
⌘I