Advocotek API Hub
Use our news monitoring, AI, captcha and spam score services through a single REST interface.
Services
Click a service to see its actions, parameters and a sample request.
No service matches your search.
Scans press and public sources for news by tax number/ID or company name, queries tax certificates and returns the composition list. Requests are queued (create_queue) and results fetched with query_queue; haber_sorgula starts an instant single-company scan.
Authentication
username + api_key (or password). The Authorization: Bearer <api_key> header is also accepted.
Actions and parameters
POST rest.php?service=news&action=create_queue
Adds one or more query records to the queue. A queue_id is returned for each record.
| Parameter | Description | |
|---|---|---|
records | Required | JSON array; each element is a record (request_type, adv_tax_no, adv_national_id, name ...) |
newer_than_datetime | Optional | UTC date filter. If the data is newer it is returned directly, otherwise re-queued |
mode | Optional | preview: finds records answerable without scraping; correction: correction flow, no quota used |
force | Optional | 0|1; accept even when the daily quota is full (permitted customers only, billed separately) |
POST rest.php?service=news&action=query_queue
Queries queue status; when completed, returns the account and related data.
| Parameter | Description | |
|---|---|---|
queue_id | Required | Record number from the create_queue response |
POST rest.php?service=news&action=haber_sorgula
Starts an instant news scan for a single company and returns immediately. Fetch the result with query_queue (scan may take 1-2 min).
| Parameter | Description | |
|---|---|---|
adv_tax_no | Optional | Tax number (company ID) |
name | Optional | Company name if no tax number (with province/district) |
POST rest.php?service=news&action=vergilevhasi_query
Starts a tax certificate query.
| Parameter | Description | |
|---|---|---|
vergi_no | Required | Tax number or national ID |
vergi_dairesi | Optional | Tax office |
POST rest.php?service=news&action=check_quota
Returns today's (UTC) quota status for a request type.
| Parameter | Description | |
|---|---|---|
request_type | Required | Request type |
POST rest.php?service=news&action=reprocess_queue
Re-evaluates an existing record without consuming quota.
| Parameter | Description | |
|---|---|---|
queue_id | Required | Record number from the create_queue response |
POST rest.php?service=news&action=inbox
"Is there anything for me?": the server decides which records (error, completed, rule, correction) to deliver to the client.
| Parameter | Description | |
|---|---|---|
request_type | Optional | Request type |
POST rest.php?service=news&action=inbox_ack
Confirms that the records received via inbox were processed.
| Parameter | Description | |
|---|---|---|
queue_ids | Required | Record numbers to confirm |
POST rest.php?service=news&action=returnCorrections
Returns correction-flagged records in packages of 200.
Takes no parameters.
POST rest.php?service=news&action=confirmReturnCorrections
Confirms processed correction records.
| Parameter | Description | |
|---|---|---|
queue_ids | Required | Record numbers to confirm |
POST rest.php?service=news&action=konkordato_list
Returns the full composition (konkordato) list.
Takes no parameters.
POST rest.php?service=news&action=haber_account_list
Identity list of companies whose news was collected (only companies you queried, national ID masked).
Takes no parameters.
POST rest.php?service=news&action=haber_kaynak_gecersiz
"Wrong company/person match" report; invalidates a news source or a single news item.
| Parameter | Description | |
|---|---|---|
kaynak_kayit_id veya haber_id | Required | Source or news item to process |
POST rest.php?service=news&action=haber_kaynak_onay
"Correct customer" report; approves the source, re-opens it if invalidated.
| Parameter | Description | |
|---|---|---|
kaynak_kayit_id veya haber_id | Required | Source or news item to process |
Sample request
curl -X POST 'https://<API_HOST>/rest.php?service=news&action=haber_sorgula' \
-H 'Authorization: Bearer <api_key>' \
-d 'username=<username>' -d 'adv_tax_no=1234567890'Sample response
{ "queue_id": 12345, "status": "queued" }The API address and your key are provided after the agreement.
Accepts OpenAI chat/completions requests and responds in the same format; existing OpenAI clients work by just changing the address. The model runs on our servers and request/response text is not stored.
Authentication
username + api_key. The Authorization: Bearer <api_key> header is supported.
Actions and parameters
POST rest.php?service=llm&action=chat_completions
Chat completion. Response headers: X-Quota-Limit, X-Quota-Used, X-Quota-Remaining. Max 2 concurrent requests per customer.
| Parameter | Description | |
|---|---|---|
messages | Required | Array of {role: system|user|assistant, content}; max 50 items, 60000 characters total |
model | Optional | Only the local model is accepted |
max_tokens | Optional | 1-4096, default 1024 |
temperature | Optional | 0-2 |
top_p | Optional | 0-1 |
stop | Optional | string or up to 4 strings |
seed | Optional | Integer |
response_format | Optional | {"type":"text"} or {"type":"json_object"} |
thinking | Optional | true|false (default false); if true the model thinks and the response gets longer |
tools, stream, n>1 | Optional | Not supported (returns 400) |
POST rest.php?service=llm&action=check_quota
Today's (UTC) request quota: limit, used, remaining, concurrent_limit.
Takes no parameters.
POST rest.php?service=llm&action=ping
Verifies credentials and service access.
Takes no parameters.
Sample request
curl -X POST 'https://<API_HOST>/rest.php?service=llm&action=chat_completions' \
-H 'Content-Type: application/json' -H 'Authorization: Bearer <api_key>' \
-d '{"username":"<username>","messages":[{"role":"user","content":"Hello"}],"max_tokens":256}'Sample response
{ "choices": [ { "message": { "role": "assistant", "content": "..." } } ], "usage": { ... } }The API address and your key are provided after the agreement.
The captcha image is first solved by a local AI model; if the result is empty or wrong, a fallback service is used. For math captchas (11+4) both the expression and the result are returned. Images are not stored.
Authentication
api_key only (username + api_key or Bearer).
Actions and parameters
POST rest.php?service=captcha_resolution&action=solve
Solves the image. captcha_calculated is the value to type into the site's box.
| Parameter | Description | |
|---|---|---|
image | Required | Base64 image (png/jpg/gif/webp, max 1 MB; data:image prefix allowed) |
hint | Optional | math, text or auto (default) |
POST rest.php?service=captcha_resolution&action=report_failed
Report when the site rejected the solution; the same image is re-solved with the fallback service. Once per record.
| Parameter | Description | |
|---|---|---|
id | Required | id from the solve response |
image | Required | Base64 image (png/jpg/gif/webp, max 1 MB; data:image prefix allowed) |
hint | Optional | math, text or auto (default) |
POST rest.php?service=captcha_resolution&action=check_quota
Today's (UTC) request quota.
Takes no parameters.
POST rest.php?service=captcha_resolution&action=ping
Verifies credentials and service access.
Takes no parameters.
Sample request
curl -X POST 'https://<API_HOST>/rest.php?service=captcha_resolution&action=solve' \
-H 'Content-Type: application/json' -H 'Authorization: Bearer <api_key>' \
-d '{"username":"<username>","image":"<base64>","hint":"auto"}'Sample response
{ "id": "...", "captcha_resolved": "11+4", "captcha_calculated": "15", "solver": "internal" }The API address and your key are provided after the agreement.
Scores email content with SpamAssassin and returns the rule list and threshold. Optionally checks SPF, DKIM, DMARC, MX, PTR and blacklists. Message content is not stored.
Authentication
api_key only (username + api_key or Bearer).
Actions and parameters
POST rest.php?service=spam_score&action=check
Scores the message. Response: is_spam, score, required, rules, deliverability (if requested).
| Parameter | Description | |
|---|---|---|
from_addr | Required | Sender email address |
subject | Required | Subject |
body_html / body_text | Required | HTML or plain text body (1 MB total max) |
from_name, to_addr, reply_to_addr, reply_to_name | Optional | Additional header fields |
sending_host / sending_ip | Optional | Sending server; for SPF match, PTR and blacklist checks |
dkim_selector | Optional | DKIM selector name (common ones are tried if omitted) |
deliverability | Optional | If 1, SPF/DKIM/DMARC/MX checks for the sender domain are also run |
raw_message_b64 / raw_message | Optional | Full raw mail (.eml, max 2 MB); other fields are not needed if provided |
compat | Optional | If 1, legacy service.php response format |
POST rest.php?service=spam_score&action=check_quota
Today's (UTC) request quota.
Takes no parameters.
POST rest.php?service=spam_score&action=ping
Verifies credentials and service access.
Takes no parameters.
Sample request
curl -X POST 'https://<API_HOST>/rest.php?service=spam_score&action=check' \
-H 'Content-Type: application/json' -H 'Authorization: Bearer <api_key>' \
-d '{"username":"<username>","from_addr":"[email protected]","subject":"Subject","body_html":"<p>Hello</p>"}'Sample response
{ "is_spam": false, "score": 1.2, "required": 5.0, "rules": [ ... ] }The API address and your key are provided after the agreement.