curl --request POST \
--url https://api.nephia.cc/v1/keywords/{id}/estimate \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"name": "<string>",
"refreshIntervalSeconds": 123,
"webhookUrl": "",
"aiEnabled": true,
"aiPrompt": "<string>",
"aiStep": {
"instruction": "<string>",
"schema": {}
},
"sentimentEnabled": true,
"coBrandsEnabled": true,
"muteRules": [
"<string>"
],
"vipAuthors": [
"<string>"
],
"rules": [
{
"name": "<string>",
"when": {
"kind": "item",
"all": [
{
"field": "<string>",
"value": "<string>"
}
]
},
"then": [
{
"channelIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}
],
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"enabled": true
}
],
"webhookEvents": [],
"channels": [
{
"channelId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"sources": [
{
"enabled": true,
"searches": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"label": "<string>",
"overridesEnabled": true,
"overrides": {
"market": "<string>",
"query": "<string>",
"priceMin": 123,
"priceMax": 123,
"sort": "<string>",
"page": 123,
"perPage": 123,
"filters": {},
"terms": [
"<string>"
],
"repliesTo": "<string>"
}
}
],
"refreshIntervalSeconds": 123
}
],
"schedule": {
"startsAt": "2023-11-07T05:31:56Z",
"endsAt": "2023-11-07T05:31:56Z",
"timezone": "<string>"
}
}
'import requests
url = "https://api.nephia.cc/v1/keywords/{id}/estimate"
payload = {
"name": "<string>",
"refreshIntervalSeconds": 123,
"webhookUrl": "",
"aiEnabled": True,
"aiPrompt": "<string>",
"aiStep": {
"instruction": "<string>",
"schema": {}
},
"sentimentEnabled": True,
"coBrandsEnabled": True,
"muteRules": ["<string>"],
"vipAuthors": ["<string>"],
"rules": [
{
"name": "<string>",
"when": {
"kind": "item",
"all": [
{
"field": "<string>",
"value": "<string>"
}
]
},
"then": [{ "channelIds": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"] }],
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"enabled": True
}
],
"webhookEvents": [],
"channels": [{ "channelId": "3c90c3cc-0d44-4b50-8888-8dd25736052a" }],
"sources": [
{
"enabled": True,
"searches": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"label": "<string>",
"overridesEnabled": True,
"overrides": {
"market": "<string>",
"query": "<string>",
"priceMin": 123,
"priceMax": 123,
"sort": "<string>",
"page": 123,
"perPage": 123,
"filters": {},
"terms": ["<string>"],
"repliesTo": "<string>"
}
}
],
"refreshIntervalSeconds": 123
}
],
"schedule": {
"startsAt": "2023-11-07T05:31:56Z",
"endsAt": "2023-11-07T05:31:56Z",
"timezone": "<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({
name: '<string>',
refreshIntervalSeconds: 123,
webhookUrl: '',
aiEnabled: true,
aiPrompt: '<string>',
aiStep: {instruction: '<string>', schema: {}},
sentimentEnabled: true,
coBrandsEnabled: true,
muteRules: ['<string>'],
vipAuthors: ['<string>'],
rules: [
{
name: '<string>',
when: {kind: 'item', all: [{field: '<string>', value: '<string>'}]},
then: [{channelIds: ['3c90c3cc-0d44-4b50-8888-8dd25736052a']}],
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
enabled: true
}
],
webhookEvents: [],
channels: [{channelId: '3c90c3cc-0d44-4b50-8888-8dd25736052a'}],
sources: [
{
enabled: true,
searches: [
{
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
label: '<string>',
overridesEnabled: true,
overrides: {
market: '<string>',
query: '<string>',
priceMin: 123,
priceMax: 123,
sort: '<string>',
page: 123,
perPage: 123,
filters: {},
terms: ['<string>'],
repliesTo: '<string>'
}
}
],
refreshIntervalSeconds: 123
}
],
schedule: {
startsAt: '2023-11-07T05:31:56Z',
endsAt: '2023-11-07T05:31:56Z',
timezone: '<string>'
}
})
};
fetch('https://api.nephia.cc/v1/keywords/{id}/estimate', 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.nephia.cc/v1/keywords/{id}/estimate",
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' => '<string>',
'refreshIntervalSeconds' => 123,
'webhookUrl' => '',
'aiEnabled' => true,
'aiPrompt' => '<string>',
'aiStep' => [
'instruction' => '<string>',
'schema' => [
]
],
'sentimentEnabled' => true,
'coBrandsEnabled' => true,
'muteRules' => [
'<string>'
],
'vipAuthors' => [
'<string>'
],
'rules' => [
[
'name' => '<string>',
'when' => [
'kind' => 'item',
'all' => [
[
'field' => '<string>',
'value' => '<string>'
]
]
],
'then' => [
[
'channelIds' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
]
],
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'enabled' => true
]
],
'webhookEvents' => [
],
'channels' => [
[
'channelId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
],
'sources' => [
[
'enabled' => true,
'searches' => [
[
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'label' => '<string>',
'overridesEnabled' => true,
'overrides' => [
'market' => '<string>',
'query' => '<string>',
'priceMin' => 123,
'priceMax' => 123,
'sort' => '<string>',
'page' => 123,
'perPage' => 123,
'filters' => [
],
'terms' => [
'<string>'
],
'repliesTo' => '<string>'
]
]
],
'refreshIntervalSeconds' => 123
]
],
'schedule' => [
'startsAt' => '2023-11-07T05:31:56Z',
'endsAt' => '2023-11-07T05:31:56Z',
'timezone' => '<string>'
]
]),
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.nephia.cc/v1/keywords/{id}/estimate"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"refreshIntervalSeconds\": 123,\n \"webhookUrl\": \"\",\n \"aiEnabled\": true,\n \"aiPrompt\": \"<string>\",\n \"aiStep\": {\n \"instruction\": \"<string>\",\n \"schema\": {}\n },\n \"sentimentEnabled\": true,\n \"coBrandsEnabled\": true,\n \"muteRules\": [\n \"<string>\"\n ],\n \"vipAuthors\": [\n \"<string>\"\n ],\n \"rules\": [\n {\n \"name\": \"<string>\",\n \"when\": {\n \"kind\": \"item\",\n \"all\": [\n {\n \"field\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n },\n \"then\": [\n {\n \"channelIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n }\n ],\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"enabled\": true\n }\n ],\n \"webhookEvents\": [],\n \"channels\": [\n {\n \"channelId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ],\n \"sources\": [\n {\n \"enabled\": true,\n \"searches\": [\n {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"label\": \"<string>\",\n \"overridesEnabled\": true,\n \"overrides\": {\n \"market\": \"<string>\",\n \"query\": \"<string>\",\n \"priceMin\": 123,\n \"priceMax\": 123,\n \"sort\": \"<string>\",\n \"page\": 123,\n \"perPage\": 123,\n \"filters\": {},\n \"terms\": [\n \"<string>\"\n ],\n \"repliesTo\": \"<string>\"\n }\n }\n ],\n \"refreshIntervalSeconds\": 123\n }\n ],\n \"schedule\": {\n \"startsAt\": \"2023-11-07T05:31:56Z\",\n \"endsAt\": \"2023-11-07T05:31:56Z\",\n \"timezone\": \"<string>\"\n }\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.nephia.cc/v1/keywords/{id}/estimate")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"refreshIntervalSeconds\": 123,\n \"webhookUrl\": \"\",\n \"aiEnabled\": true,\n \"aiPrompt\": \"<string>\",\n \"aiStep\": {\n \"instruction\": \"<string>\",\n \"schema\": {}\n },\n \"sentimentEnabled\": true,\n \"coBrandsEnabled\": true,\n \"muteRules\": [\n \"<string>\"\n ],\n \"vipAuthors\": [\n \"<string>\"\n ],\n \"rules\": [\n {\n \"name\": \"<string>\",\n \"when\": {\n \"kind\": \"item\",\n \"all\": [\n {\n \"field\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n },\n \"then\": [\n {\n \"channelIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n }\n ],\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"enabled\": true\n }\n ],\n \"webhookEvents\": [],\n \"channels\": [\n {\n \"channelId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ],\n \"sources\": [\n {\n \"enabled\": true,\n \"searches\": [\n {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"label\": \"<string>\",\n \"overridesEnabled\": true,\n \"overrides\": {\n \"market\": \"<string>\",\n \"query\": \"<string>\",\n \"priceMin\": 123,\n \"priceMax\": 123,\n \"sort\": \"<string>\",\n \"page\": 123,\n \"perPage\": 123,\n \"filters\": {},\n \"terms\": [\n \"<string>\"\n ],\n \"repliesTo\": \"<string>\"\n }\n }\n ],\n \"refreshIntervalSeconds\": 123\n }\n ],\n \"schedule\": {\n \"startsAt\": \"2023-11-07T05:31:56Z\",\n \"endsAt\": \"2023-11-07T05:31:56Z\",\n \"timezone\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.nephia.cc/v1/keywords/{id}/estimate")
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 \"name\": \"<string>\",\n \"refreshIntervalSeconds\": 123,\n \"webhookUrl\": \"\",\n \"aiEnabled\": true,\n \"aiPrompt\": \"<string>\",\n \"aiStep\": {\n \"instruction\": \"<string>\",\n \"schema\": {}\n },\n \"sentimentEnabled\": true,\n \"coBrandsEnabled\": true,\n \"muteRules\": [\n \"<string>\"\n ],\n \"vipAuthors\": [\n \"<string>\"\n ],\n \"rules\": [\n {\n \"name\": \"<string>\",\n \"when\": {\n \"kind\": \"item\",\n \"all\": [\n {\n \"field\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n },\n \"then\": [\n {\n \"channelIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n }\n ],\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"enabled\": true\n }\n ],\n \"webhookEvents\": [],\n \"channels\": [\n {\n \"channelId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ],\n \"sources\": [\n {\n \"enabled\": true,\n \"searches\": [\n {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"label\": \"<string>\",\n \"overridesEnabled\": true,\n \"overrides\": {\n \"market\": \"<string>\",\n \"query\": \"<string>\",\n \"priceMin\": 123,\n \"priceMax\": 123,\n \"sort\": \"<string>\",\n \"page\": 123,\n \"perPage\": 123,\n \"filters\": {},\n \"terms\": [\n \"<string>\"\n ],\n \"repliesTo\": \"<string>\"\n }\n }\n ],\n \"refreshIntervalSeconds\": 123\n }\n ],\n \"schedule\": {\n \"startsAt\": \"2023-11-07T05:31:56Z\",\n \"endsAt\": \"2023-11-07T05:31:56Z\",\n \"timezone\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"valid": true,
"refusal": {
"status": 123,
"code": "<string>",
"message": "<string>"
},
"estimate": {
"monthlyCredits": 123,
"checksPerMonth": 123,
"bySource": [
{
"source": "x",
"intervalSeconds": 123,
"searches": 123,
"checksPerMonth": 123,
"monthlyCredits": 123
}
],
"bySearch": [
{
"source": "x",
"searchId": "<string>",
"label": "<string>",
"creditsPerCheck": 123,
"checksPerMonth": 123,
"monthlyCredits": 123
}
],
"firstScanCredits": 123,
"normalized": {
"refreshIntervalSeconds": 123,
"sentimentEnabled": true,
"coBrandsEnabled": true,
"sources": [
{
"source": "x",
"intervalSeconds": 123,
"searches": [
{
"id": "<string>",
"label": "<string>",
"resolvedCriteria": {}
}
]
}
]
},
"planAllowance": 123,
"creditsRemaining": 123,
"searchSlots": {
"inUse": 123,
"requested": 123,
"limit": 123
},
"previousMonthlyCredits": 123,
"monthlyCreditsDelta": 123,
"resetSearches": [
{
"source": "x",
"searchId": "<string>",
"label": "<string>"
}
]
},
"estimateToken": "<string>",
"estimateTokenExpiresAt": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "Rate limit exceeded",
"code": "TOO_MANY_REQUESTS"
}Estimate a keyword update
What PATCH /v1/keywords/{id} would do with this body, without changing anything or charging anything. Same validation as the patch, so valid: false carries the refusal it would answer. A valid body comes back with the keyword’s monthly credits after the patch, before it (previousMonthlyCredits) and the difference, and with resetSearches: the searches the patch would start over, computed by the same code the patch runs. An unknown or foreign id is still a 404. Free: does not charge credits. Price it first with the matching estimate operation, which runs the same validation and writes nothing. Send its estimateToken back in the Nephia-Estimate-Token header with the same body: the write then refuses a body that is not the one priced. The header is optional for an API key and required from the MCP server.
curl --request POST \
--url https://api.nephia.cc/v1/keywords/{id}/estimate \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"name": "<string>",
"refreshIntervalSeconds": 123,
"webhookUrl": "",
"aiEnabled": true,
"aiPrompt": "<string>",
"aiStep": {
"instruction": "<string>",
"schema": {}
},
"sentimentEnabled": true,
"coBrandsEnabled": true,
"muteRules": [
"<string>"
],
"vipAuthors": [
"<string>"
],
"rules": [
{
"name": "<string>",
"when": {
"kind": "item",
"all": [
{
"field": "<string>",
"value": "<string>"
}
]
},
"then": [
{
"channelIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}
],
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"enabled": true
}
],
"webhookEvents": [],
"channels": [
{
"channelId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"sources": [
{
"enabled": true,
"searches": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"label": "<string>",
"overridesEnabled": true,
"overrides": {
"market": "<string>",
"query": "<string>",
"priceMin": 123,
"priceMax": 123,
"sort": "<string>",
"page": 123,
"perPage": 123,
"filters": {},
"terms": [
"<string>"
],
"repliesTo": "<string>"
}
}
],
"refreshIntervalSeconds": 123
}
],
"schedule": {
"startsAt": "2023-11-07T05:31:56Z",
"endsAt": "2023-11-07T05:31:56Z",
"timezone": "<string>"
}
}
'import requests
url = "https://api.nephia.cc/v1/keywords/{id}/estimate"
payload = {
"name": "<string>",
"refreshIntervalSeconds": 123,
"webhookUrl": "",
"aiEnabled": True,
"aiPrompt": "<string>",
"aiStep": {
"instruction": "<string>",
"schema": {}
},
"sentimentEnabled": True,
"coBrandsEnabled": True,
"muteRules": ["<string>"],
"vipAuthors": ["<string>"],
"rules": [
{
"name": "<string>",
"when": {
"kind": "item",
"all": [
{
"field": "<string>",
"value": "<string>"
}
]
},
"then": [{ "channelIds": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"] }],
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"enabled": True
}
],
"webhookEvents": [],
"channels": [{ "channelId": "3c90c3cc-0d44-4b50-8888-8dd25736052a" }],
"sources": [
{
"enabled": True,
"searches": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"label": "<string>",
"overridesEnabled": True,
"overrides": {
"market": "<string>",
"query": "<string>",
"priceMin": 123,
"priceMax": 123,
"sort": "<string>",
"page": 123,
"perPage": 123,
"filters": {},
"terms": ["<string>"],
"repliesTo": "<string>"
}
}
],
"refreshIntervalSeconds": 123
}
],
"schedule": {
"startsAt": "2023-11-07T05:31:56Z",
"endsAt": "2023-11-07T05:31:56Z",
"timezone": "<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({
name: '<string>',
refreshIntervalSeconds: 123,
webhookUrl: '',
aiEnabled: true,
aiPrompt: '<string>',
aiStep: {instruction: '<string>', schema: {}},
sentimentEnabled: true,
coBrandsEnabled: true,
muteRules: ['<string>'],
vipAuthors: ['<string>'],
rules: [
{
name: '<string>',
when: {kind: 'item', all: [{field: '<string>', value: '<string>'}]},
then: [{channelIds: ['3c90c3cc-0d44-4b50-8888-8dd25736052a']}],
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
enabled: true
}
],
webhookEvents: [],
channels: [{channelId: '3c90c3cc-0d44-4b50-8888-8dd25736052a'}],
sources: [
{
enabled: true,
searches: [
{
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
label: '<string>',
overridesEnabled: true,
overrides: {
market: '<string>',
query: '<string>',
priceMin: 123,
priceMax: 123,
sort: '<string>',
page: 123,
perPage: 123,
filters: {},
terms: ['<string>'],
repliesTo: '<string>'
}
}
],
refreshIntervalSeconds: 123
}
],
schedule: {
startsAt: '2023-11-07T05:31:56Z',
endsAt: '2023-11-07T05:31:56Z',
timezone: '<string>'
}
})
};
fetch('https://api.nephia.cc/v1/keywords/{id}/estimate', 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.nephia.cc/v1/keywords/{id}/estimate",
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' => '<string>',
'refreshIntervalSeconds' => 123,
'webhookUrl' => '',
'aiEnabled' => true,
'aiPrompt' => '<string>',
'aiStep' => [
'instruction' => '<string>',
'schema' => [
]
],
'sentimentEnabled' => true,
'coBrandsEnabled' => true,
'muteRules' => [
'<string>'
],
'vipAuthors' => [
'<string>'
],
'rules' => [
[
'name' => '<string>',
'when' => [
'kind' => 'item',
'all' => [
[
'field' => '<string>',
'value' => '<string>'
]
]
],
'then' => [
[
'channelIds' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
]
],
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'enabled' => true
]
],
'webhookEvents' => [
],
'channels' => [
[
'channelId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
],
'sources' => [
[
'enabled' => true,
'searches' => [
[
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'label' => '<string>',
'overridesEnabled' => true,
'overrides' => [
'market' => '<string>',
'query' => '<string>',
'priceMin' => 123,
'priceMax' => 123,
'sort' => '<string>',
'page' => 123,
'perPage' => 123,
'filters' => [
],
'terms' => [
'<string>'
],
'repliesTo' => '<string>'
]
]
],
'refreshIntervalSeconds' => 123
]
],
'schedule' => [
'startsAt' => '2023-11-07T05:31:56Z',
'endsAt' => '2023-11-07T05:31:56Z',
'timezone' => '<string>'
]
]),
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.nephia.cc/v1/keywords/{id}/estimate"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"refreshIntervalSeconds\": 123,\n \"webhookUrl\": \"\",\n \"aiEnabled\": true,\n \"aiPrompt\": \"<string>\",\n \"aiStep\": {\n \"instruction\": \"<string>\",\n \"schema\": {}\n },\n \"sentimentEnabled\": true,\n \"coBrandsEnabled\": true,\n \"muteRules\": [\n \"<string>\"\n ],\n \"vipAuthors\": [\n \"<string>\"\n ],\n \"rules\": [\n {\n \"name\": \"<string>\",\n \"when\": {\n \"kind\": \"item\",\n \"all\": [\n {\n \"field\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n },\n \"then\": [\n {\n \"channelIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n }\n ],\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"enabled\": true\n }\n ],\n \"webhookEvents\": [],\n \"channels\": [\n {\n \"channelId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ],\n \"sources\": [\n {\n \"enabled\": true,\n \"searches\": [\n {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"label\": \"<string>\",\n \"overridesEnabled\": true,\n \"overrides\": {\n \"market\": \"<string>\",\n \"query\": \"<string>\",\n \"priceMin\": 123,\n \"priceMax\": 123,\n \"sort\": \"<string>\",\n \"page\": 123,\n \"perPage\": 123,\n \"filters\": {},\n \"terms\": [\n \"<string>\"\n ],\n \"repliesTo\": \"<string>\"\n }\n }\n ],\n \"refreshIntervalSeconds\": 123\n }\n ],\n \"schedule\": {\n \"startsAt\": \"2023-11-07T05:31:56Z\",\n \"endsAt\": \"2023-11-07T05:31:56Z\",\n \"timezone\": \"<string>\"\n }\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.nephia.cc/v1/keywords/{id}/estimate")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"refreshIntervalSeconds\": 123,\n \"webhookUrl\": \"\",\n \"aiEnabled\": true,\n \"aiPrompt\": \"<string>\",\n \"aiStep\": {\n \"instruction\": \"<string>\",\n \"schema\": {}\n },\n \"sentimentEnabled\": true,\n \"coBrandsEnabled\": true,\n \"muteRules\": [\n \"<string>\"\n ],\n \"vipAuthors\": [\n \"<string>\"\n ],\n \"rules\": [\n {\n \"name\": \"<string>\",\n \"when\": {\n \"kind\": \"item\",\n \"all\": [\n {\n \"field\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n },\n \"then\": [\n {\n \"channelIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n }\n ],\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"enabled\": true\n }\n ],\n \"webhookEvents\": [],\n \"channels\": [\n {\n \"channelId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ],\n \"sources\": [\n {\n \"enabled\": true,\n \"searches\": [\n {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"label\": \"<string>\",\n \"overridesEnabled\": true,\n \"overrides\": {\n \"market\": \"<string>\",\n \"query\": \"<string>\",\n \"priceMin\": 123,\n \"priceMax\": 123,\n \"sort\": \"<string>\",\n \"page\": 123,\n \"perPage\": 123,\n \"filters\": {},\n \"terms\": [\n \"<string>\"\n ],\n \"repliesTo\": \"<string>\"\n }\n }\n ],\n \"refreshIntervalSeconds\": 123\n }\n ],\n \"schedule\": {\n \"startsAt\": \"2023-11-07T05:31:56Z\",\n \"endsAt\": \"2023-11-07T05:31:56Z\",\n \"timezone\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.nephia.cc/v1/keywords/{id}/estimate")
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 \"name\": \"<string>\",\n \"refreshIntervalSeconds\": 123,\n \"webhookUrl\": \"\",\n \"aiEnabled\": true,\n \"aiPrompt\": \"<string>\",\n \"aiStep\": {\n \"instruction\": \"<string>\",\n \"schema\": {}\n },\n \"sentimentEnabled\": true,\n \"coBrandsEnabled\": true,\n \"muteRules\": [\n \"<string>\"\n ],\n \"vipAuthors\": [\n \"<string>\"\n ],\n \"rules\": [\n {\n \"name\": \"<string>\",\n \"when\": {\n \"kind\": \"item\",\n \"all\": [\n {\n \"field\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n },\n \"then\": [\n {\n \"channelIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n }\n ],\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"enabled\": true\n }\n ],\n \"webhookEvents\": [],\n \"channels\": [\n {\n \"channelId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ],\n \"sources\": [\n {\n \"enabled\": true,\n \"searches\": [\n {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"label\": \"<string>\",\n \"overridesEnabled\": true,\n \"overrides\": {\n \"market\": \"<string>\",\n \"query\": \"<string>\",\n \"priceMin\": 123,\n \"priceMax\": 123,\n \"sort\": \"<string>\",\n \"page\": 123,\n \"perPage\": 123,\n \"filters\": {},\n \"terms\": [\n \"<string>\"\n ],\n \"repliesTo\": \"<string>\"\n }\n }\n ],\n \"refreshIntervalSeconds\": 123\n }\n ],\n \"schedule\": {\n \"startsAt\": \"2023-11-07T05:31:56Z\",\n \"endsAt\": \"2023-11-07T05:31:56Z\",\n \"timezone\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"valid": true,
"refusal": {
"status": 123,
"code": "<string>",
"message": "<string>"
},
"estimate": {
"monthlyCredits": 123,
"checksPerMonth": 123,
"bySource": [
{
"source": "x",
"intervalSeconds": 123,
"searches": 123,
"checksPerMonth": 123,
"monthlyCredits": 123
}
],
"bySearch": [
{
"source": "x",
"searchId": "<string>",
"label": "<string>",
"creditsPerCheck": 123,
"checksPerMonth": 123,
"monthlyCredits": 123
}
],
"firstScanCredits": 123,
"normalized": {
"refreshIntervalSeconds": 123,
"sentimentEnabled": true,
"coBrandsEnabled": true,
"sources": [
{
"source": "x",
"intervalSeconds": 123,
"searches": [
{
"id": "<string>",
"label": "<string>",
"resolvedCriteria": {}
}
]
}
]
},
"planAllowance": 123,
"creditsRemaining": 123,
"searchSlots": {
"inUse": 123,
"requested": 123,
"limit": 123
},
"previousMonthlyCredits": 123,
"monthlyCreditsDelta": 123,
"resetSearches": [
{
"source": "x",
"searchId": "<string>",
"label": "<string>"
}
]
},
"estimateToken": "<string>",
"estimateTokenExpiresAt": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "Rate limit exceeded",
"code": "TOO_MANY_REQUESTS"
}Authorizations
API key created from the Nephia dashboard for your Account.
Headers
Unique key (e.g. UUID) making this POST safe to retry for 24 hours. Replays return the original response with an Idempotency-Replayed: true header; reusing a key with a different body returns 422.
255Path Parameters
Body
1 - 80Seconds between checks. Each Source accepts its own range, published as x-source-intervals at the root of this document. Your plan may raise the floor further; the refusal names the effective one.
""product-model, theme-sentiment, seller, duplicates, custom, null 400Show child attributes
Show child attributes
own, competitor, topic 501 - 601001 - 6020Show child attributes
Show child attributes
all, rules 5keyword.alert_fired, keyword.report_ready, keyword.paused, keyword.resumed, channel.disabled 5Show child attributes
Show child attributes
Show child attributes
Show child attributes
1Show child attributes
Show child attributes
Show child attributes
Show child attributes
Was this page helpful?