Content search
Two families of routes read the whole body of published posts: search looks for a term, a phrase or an expression with operators, and similarity takes a text of yours (or the post_id of one of your posts) and returns the published posts that look most like it, with coverage and the passages in common. They are built for anti-plagiarism tools such as Chimpee; the full flow is in the guide Anti-plagiarism with the API.
| Method and route | What it does |
|---|---|
GET /v1/search |
Searches every site the credential reaches. |
GET /v1/sites/{site}/search |
The same search, only in the site in the path. |
POST /v1/search/similar |
Similarity of a text or of a post_id. |
POST /v1/sites/{site}/search/similar |
The same, with the post_id resolved in the site in the path. |
GET /v1/content/search |
Alias of GET /v1/search, kept for early integrations. No per-site twin. |
POST /v1/content/matches |
Alias of POST /v1/search/similar. No per-site twin. |
- Base URL:
https://api.canverly.com(on staging, the API host of the .net) - Authentication:
ck_API key or a Connect Canverly token (Authorization: Bearer ...). A publicpk_key gets403. - Scope:
posts:read, the same as reading posts. There is no new scope. A grant restricted by content type gets403 POST_TYPE_RESTRICTED. - Never returned: drafts, scheduled posts, trash, pending edits and personal data (author, e-mail).
What the credential sees (the corpus)
Section titled “What the credential sees (the corpus)”The corpus is the platform, at two visibility levels:
- Sites the credential reaches (the same list as
GET /v1/sites): the item comes complete, withorigin: "own". A site key searches only its own site; a company key, the company’s active sites. - Sites of another organization: the item comes with public fields only (
origin: "network":url,title,domain,published_atand asnippetof up to 200 characters), with no post id, site id or slug, offsets or passages. This applies only to a Group-type app (and with theCONTENT_SEARCH_NETWORK_ENABLEDflag on in the installation, off by default). External partners andck_keys see only their own organization.
When the query runs over the whole platform (Group app, flag on, no sites), the API forwards it to the index as a platform-wide query identified by your organization, and every item carries same_org. That path exists only for Group apps; external partners and ck_ keys never use it.
scope picks the slice: auto (default: the whole platform when the credential and the flag allow it, otherwise the credential’s own sites), own (own sites only) or network (the whole platform). network with the flag off is 403 CONTENT_SEARCH_NETWORK_DISABLED; with a non-Group credential, 403 CONTENT_SEARCH_NETWORK_FORBIDDEN; on the per-site routes, 400 INVALID_QUERY. The sites parameter only narrows the set: it never widens the reach.
GET /v1/search
Section titled “GET /v1/search”curl -G https://api.canverly.com/v1/search \ -H "Authorization: Bearer ck_live_xxx" \ --data-urlencode 'q="carrot cake" frosting -chocolate' \ --data-urlencode "limit=20"| Parameter | Type | Rule |
|---|---|---|
q |
string | Required, 3 to 300 characters, no control characters. Accent- and case-insensitive. See the operators. |
mode |
all | phrase | any |
all (default) requires every term; phrase the exact phrase; any at least one term. |
lang |
string | Language tag, for example pt-br. |
from, to |
date | published_at window: YYYY-MM-DD or RFC 3339 (aliases published_from, published_to). A plain-day to includes the whole day; from cannot be after to. |
sites |
list | Site ids (UUID or ULID, not slug), comma-separated, up to 100. Only narrows. |
scope |
auto | own | network |
See the corpus. |
fingerprint |
true | false |
true adds the fingerprint to every item. Default false; any other value is 400. |
limit |
integer | 1 to 100, default 20. |
cursor |
string | The next_cursor of the previous page. Opaque. |
status |
published |
Only published exists; any other value is 400. |
Valid parameters that the source does not apply yet answer 501 FILTER_UNSUPPORTED; they are never silently ignored.
{ "items": [ { "origin": "own", "post_id": "019f0a1c-7d2e-7a10-9c4b-2f6a1d0e5b11", "site": { "id": "d5c8a0b3-57e0-4fdf-aa9f-05d53937735f", "slug": "example-blog", "primary_domain": "blog.example" }, "title": "Fluffy carrot cake", "url": "https://blog.example/fluffy-carrot-cake", "language": "en", "published_at": "2026-03-04T12:00:00Z", "updated_at": "2026-03-10T09:30:00Z", "indexed_at": "2026-03-10T09:31:02Z", "stale": false, "score": 7.42, "snippet": "...the carrot cake with frosting recipe takes three carrots...", "match_offsets": [[4, 14]] }, { "origin": "network", "title": "Carrot cake recipe", "url": "https://other-portal.example/carrot-cake-recipe", "domain": "other-portal.example", "published_at": "2026-02-01T08:00:00Z", "snippet": "...carrot cake with white chocolate frosting..." } ], "next_cursor": "eyJ2IjoxfQ.q3J0pZ1u8kM", "stale": false}score only compares items of the same response. match_offsets are [start, end) pairs, in characters, inside snippet (the snippet has up to 600 characters). next_cursor: null is the end. With fingerprint=true every item adds fingerprint; in a whole-platform search it also adds same_org (see Fingerprint). stale: true (on the response and on the item) means the index was down and the last good page was served, or that the item was indexed before its last update. An item from another organization never carries offsets.
Operators in q
Section titled “Operators in q”| Form | Effect |
|---|---|
"exact phrase" |
The terms together and in that order. |
term1 OR term2 |
Either one. OR uppercase only; or is a plain term. |
NOT term or -term |
Excludes posts with the term. NOT uppercase only. A query made only of negations is 400. |
prefix* |
Prefix, with a minimum of 3 letters before the *. |
AND between terms is implicit and binds tighter than OR; negation always adds as AND. Negated terms are not highlighted in the snippet. Anything that is not an operator is text: nothing becomes query syntax.
Cursor and cache
Section titled “Cursor and cache”Pagination uses an opaque cursor: pass the next_cursor back as cursor, with the same filters. The cursor is signed by the service; a tampered cursor, one from another query or one past the depth limit is 400 INVALID_QUERY (message invalid cursor). Do not build or interpret the cursor.
The response carries an ETag; send it back in If-None-Match to get a bodyless 304. Search is cached for a few seconds: X-Canverly-Cache: hit|miss|stale tells where it came from.
POST /v1/search/similar
Section titled “POST /v1/search/similar”curl https://api.canverly.com/v1/search/similar \ -H "Authorization: Bearer ck_live_xxx" \ -H "Content-Type: application/json" \ -d '{"text": "<the candidate text, 50 to 50000 characters>", "min_words": 8, "limit": 10}'| Field | Type | Rule |
|---|---|---|
text |
string | 50 to 50,000 characters, plain text, no control characters. Or post_id, never both. Above 50,000 is 413 TEXT_TOO_LARGE. |
post_id |
string | A published post of yours (UUID or ULID), instead of text. The text comes from the index; the post itself is left out of the result. Out of your reach or unpublished is 404 NOT_FOUND. A post over 50,000 characters is cut and the response carries input_truncated: true. |
site |
string | Site (id or slug) of the post_id on the route without {site}. A site key does not need it. Only valid with post_id. |
min_words |
integer | 5 to 30, default 8: the shortest run of consecutive words that counts as copying. |
limit |
integer | 1 to 50, default 10. |
sites |
list | Site ids (up to 100). Only narrows. |
scope |
auto | own | network |
As in search. |
fingerprint |
boolean | true adds the fingerprint to every item and source_fingerprint to the body. Default false; a value that is not a JSON boolean is 400. |
The body is limited to 256 KiB; an unknown field is 400. Texts longer than 20,000 characters are split into pieces, compared in sequence, and the results are merged per post. The method is deterministic (shingle_containment_v1: containment of runs of min_words normalized words).
{ "items": [ { "origin": "own", "post_id": "019f0a1c-7d2e-7a10-9c4b-2f6a1d0e5b11", "site": { "id": "d5c8a0b3-57e0-4fdf-aa9f-05d53937735f", "slug": "example-blog", "primary_domain": "blog.example" }, "title": "Fluffy carrot cake", "url": "https://blog.example/fluffy-carrot-cake", "published_at": "2026-03-04T12:00:00Z", "similarity": 0.62, "method": "shingle_containment_v1", "longest_run_words": 31, "coverage": { "input_covered": 0.62, "post_covered": 0.4 }, "passages": [ { "query_start": 120, "query_end": 410, "source_start": 80, "source_end": 370, "excerpt": "..." } ] }, { "origin": "network", "title": "Carrot cake recipe", "url": "https://other-portal.example/carrot-cake-recipe", "domain": "other-portal.example", "published_at": "2026-02-01T08:00:00Z", "snippet": "...", "similarity": 0.18, "method": "shingle_containment_v1", "longest_run_words": 11 } ], "method": "shingle_containment_v1", "truncated": false, "input_truncated": false}similarity (0 to 1) is the fraction of your text found in the post; coverage.input_covered is the same measure and coverage.post_covered is the fraction of the post covered by runs from your text. longest_run_words is the longest continuous run in common. The query_* values are positions (in characters) in your text, the source_* ones in the post, and excerpt carries up to 600 characters. An item from another organization carries only similarity, method and longest_run_words besides the public fields, with no passages or coverage. With fingerprint: true, every item adds fingerprint (even from another organization) and the body adds source_fingerprint; on the whole platform the items also add same_org. truncated: true warns that there were more candidates or passages than fit. The result never carries the full body of a post.
Fingerprint and cross-ring matching
Section titled “Fingerprint and cross-ring matching”With fingerprint=true (search) or "fingerprint": true (similarity body), every item carries a fingerprint of the post text, to find copies across rings (.net and .com) without exchanging text. Without the request, the field is not in the response.
"fingerprint": { "content_hash": "9b74c9897bac770ffc029102a200c5de3f3c0b1d5a1f0c3a7a1a6a2f5f8b1c3d", "simhash": "a3f10c5e9b27d468", "word_count": 1243}| Field | Type | Meaning |
|---|---|---|
content_hash |
string, 64 hex | SHA-256 of the normalised text (words folded for case, accents and punctuation, one space between them). Equal = same text. |
simhash |
string, 16 hex | 64-bit simhash over word trigrams. Similar texts give values a few bits apart (Hamming distance). |
word_count |
integer | Words of the normalised text. |
The fingerprint applies to every item, own or network: it does not reveal the text. In similarity, the response also carries source_fingerprint, the fingerprint of the text you sent, only when the text fits in a single piece (up to 20,000 characters); longer texts are compared in pieces and have none. With post_id, the fingerprint of the source text is not returned.
same_org (boolean) says whether the item belongs to the caller’s organization. It appears only when the query ran over the whole platform: Group app, network flag on, no sites narrowing. With a ck_ key, a partner app or a narrowed query it does not exist, and origin (own or network) is what tells items apart. same_org and origin answer different questions: origin: "own" is “my credential reaches this site”; same_org: true is “the site belongs to my organization”, which also holds for company sites the grant does not reach (those come as network, public fields only).
Limits and quota
Section titled “Limits and quota”| What | Value |
|---|---|
GET /v1/search |
600 req/min per credential, burst of 50 |
POST /v1/search/similar |
120 req/min per credential |
q |
3 to 300 characters |
text |
50 to 50,000 characters; body up to 256 KiB |
limit |
search 1 to 100; similarity 1 to 50 |
sites |
up to 100 ids |
| Posts per 20,000-character piece | the source returns up to 20; a limit above that can leave matches out and sets truncated |
Each route has its own bucket; the similarity one is independent of the search one. Every authenticated response carries RateLimit-Limit, RateLimit-Remaining and RateLimit-Reset (seconds until replenished). When exceeded, the response is 429 RATE_LIMITED with Retry-After: wait that long, do not retry at once. Quotas are tunable per installation.
Errors
Section titled “Errors”Every error is application/problem+json (RFC 9457), with type, title, status, detail and code, plus the { "error": { "code", "message" } } envelope. A 400 message names the field and the rule, and never repeats the value you sent.
| Status | Code | When |
|---|---|---|
| 400 | INVALID_QUERY |
Parameter or body outside the rules; invalid cursor (invalid cursor), pagination depth exhausted, q without searchable terms, text with fewer words than min_words, scope=network on a per-site route, fingerprint that is not true/false. |
| 401 | UNAUTHORIZED |
Missing, invalid or revoked credential. Never used for an infrastructure failure. |
| 403 | FORBIDDEN |
No posts:read, or a public pk_ key. |
| 403 | POST_TYPE_RESTRICTED |
Grant restricted by content type. |
| 403 | CONTENT_SEARCH_NETWORK_DISABLED |
scope=network with platform-wide search off in the installation. |
| 403 | CONTENT_SEARCH_NETWORK_FORBIDDEN |
scope=network with a credential that is not from a Group app. |
| 404 | NOT_FOUND |
post_id that is not a published post of yours (same answer as “does not exist”). |
| 413 | TEXT_TOO_LARGE |
text above 50,000 characters (or body above 256 KiB). |
| 429 | RATE_LIMITED |
Route quota exhausted; see Retry-After. |
| 501 | FILTER_UNSUPPORTED |
Valid filter the source does not apply yet. |
| 502 | UPSTREAM |
The index answered outside its contract. |
| 503 | DEPENDENCIA_INDISPONIVEL |
Tenancy, authoring, index or database down or slow; always with Retry-After. |
| 503 | INDEX_UNAVAILABLE |
The list of platform sites is down; with Retry-After. |
| 503 | OVERLOADED |
The instance is at its concurrency limit; retry shortly. |
A dependency being down never becomes 401 or 404: 503 means “try again”, and your credential and your resource remain valid. Retry with exponential backoff and jitter (see the guide).
Filters not supported yet
Section titled “Filters not supported yet”Until the authoring index applies them, these parameters, even when valid, answer 501 FILTER_UNSUPPORTED (the message names the filter): fields, post_type, category (alias categoria), tag, updated_from/updated_to and sort other than relevance (with order). Use from/to, lang, sites and scope, which work today.