ASI · API DOCUMENTATION
Search API
One GET endpoint over ASI's own English-language web index. JSON responses, no API key.
BASE URLhttps://api.asi.xynatec.com
Overview
- Base URL
https://api.asi.xynatec.com- Protocol
- HTTPS,
GETonly - Format
- JSON, UTF-8
- Authentication
- None. No API key needed.
- CORS
- Not supported. Call the API from a server or agent, not from browser code on another site.
- Index
- English-language pages crawled by AsiBot.
Quick start
Search for forest carbon and print five results.
curl "https://api.asi.xynatec.com/v1/search?q=forest+carbon&limit=5"import json, urllib.parse, urllib.request
params = urllib.parse.urlencode({"q": "forest carbon", "limit": 5})
request = urllib.request.Request(
f"https://api.asi.xynatec.com/v1/search?{params}",
# Python's default User-Agent is blocked (403).
headers={"User-Agent": "my-agent/1.0"},
)
with urllib.request.urlopen(request, timeout=10) as response:
for result in json.load(response)["results"]:
print(result["title"], result["url"])// Node.js 18 or later, as an ES module
const params = new URLSearchParams({ q: "forest carbon", limit: "5" });
const response = await fetch(`https://api.asi.xynatec.com/v1/search?${params}`);
if (!response.ok) throw new Error(`ASI: ${response.status}`);
for (const result of (await response.json()).results) {
console.log(result.title, result.url);
}Search
GET/v1/search
Returns one page of results, ranked by relevance.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
q | string | empty | Search query. Trimmed; the text is cut after 512 characters, site: words are never cut. An empty query returns no results unless a site is given. |
site | string | none | Only results from this website and its subdomains: example.com also matches www.example.com, not notexample.com. A host, a host with port or a full URL. Repeat the parameter for several sites; a result from any of them counts. |
limit | integer | 10 | Results per page, 1–50. |
page | integer | 1 | Page number, 1–10. |
Out-of-range values are clamped, unreadable values fall back to the default. The API never returns 400.
Pagination
Page n starts at result (n − 1) × limit + 1. Keep limit the same while paging. There is no total count: a page with fewer than limit results is the last one.
Results from one site
Search forest carbon on example.org and its subdomains only. Without q, the same request lists the site's indexed pages, paged as usual.
curl "https://api.asi.xynatec.com/v1/search?q=forest+carbon&site=example.org"
Case, a trailing dot, default ports and paths do not matter, and internationalized domain names work: Example.ORG, https://www.example.org/news and bücher.example are all valid. Any other port restricts results to that port. A value that is not a valid host returns no results, not an error. To leave a site out instead, add -site:example.org to q (see Query syntax).
Response
200 OK with Content-Type: application/json. Illustrative example:
{
"query": "forest carbon",
"page": 1,
"results": [
{
"title": "How forests capture and store carbon",
"url": "https://example.org/forests-and-carbon",
"snippet": "Forests store carbon in trees, roots and soil.",
"source": "example.org",
"date": "2026-09-18"
}
]
}
Response object
| Field | Type | Description |
|---|---|---|
query | string | The query after trimming. A query over 512 characters is cut; its site: words then come first. |
page | integer | The page served, after clamping. |
results | array | Results on this page. Empty if nothing matches. |
Result object
| Field | Type | Description |
|---|---|---|
title | string | Page title. May be empty. |
url | string | Page address. |
snippet | string | Plain text, up to 300 characters, usually the best-matching passage. Empty if the site sets nosnippet. |
source | string | Host name, e.g. www.example.com. |
date | string or null | Publication date declared by the page, YYYY-MM-DD (UTC). null if none. Not the crawl date. |
Results never contain the full page text.
Query syntax
All terms must match. Matching is case-insensitive with English stemming over the title, description and the first 8 KB of page text. Ranking uses BM25; title matches count 3×, description matches 1.5×.
| Query | Matches pages with |
|---|---|
forest carbon | both words |
"carbon footprint" | the exact phrase |
python -snake | python, without snake |
kestrel OR falcon | either word |
title:forest | the word in the title |
forest site:example.com | forest, on example.com or its subdomains |
forest -site:example.com | forest, not on example.com or its subdomains |
Quotes, + - : ( ) [ ] { } ^ * ~ and the words AND, OR, NOT are syntax. To search free text, replace every character except letters and digits with a space. Invalid syntax is dropped, not rejected.
site: works like the site parameter and is removed from the query before searching. It must start a word outside quotes, also after ( or +; site: example.com with a space works too. -site: or NOT site: excludes a site and its subdomains. Several site: words and site parameters combine: a result from any of the sites counts. Each site: word applies to the whole query, even inside parentheses or next to OR. A value that is not a valid host matches no page: site: then returns no results, -site: excludes nothing.
Errors
API errors have a JSON body {"error": "<code>"}. Errors from the proxy in front of the API have none, so check the status code before parsing.
| Status | Error | Meaning | Retry |
|---|---|---|---|
503 | busy | 32 searches already running. | After Retry-After (1 s) |
503 | timeout | Search took longer than 5 s. | After Retry-After (1 s) |
500 | failed | Internal error. | Once |
502, 504 | – | API restarting or unreachable. | After a short wait |
403 | – | Blocked by the proxy, usually a default library User-Agent. | No. Set your own User-Agent. |
Retry with increasing delays and never in parallel: capacity is shared by all clients.
Limits
| Limit | Value |
|---|---|
| Query length | 512 characters |
| Sites per search | 10, site, site: and -site: together; further sites are ignored |
| Results per request | 50 |
| Pages per query | 10 |
| Search time | 5 seconds |
| Concurrent searches | 32, shared by all clients |
Health check
GET/health
Returns 200 with the plain-text body ok while the API is running. It does not run a search.
Support
Questions or feedback: service@xynatec.com.