Shruwd Entities API
The brand itself and its competitors, with the exact aliases that count as a mention.
The brand itself and its competitors, with the exact aliases that count as a mention.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/shruwd-io:shruwd-io-entities-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Shruwd Entities API
version: '1'
summary: Measure how a brand appears in AI answers, diagnose why, and prove movement.
description: 'Shruwd tracks how a brand and its competitors show up in AI-generated answers
(Google AI Overviews, Google AI Mode, ChatGPT, Gemini and Perplexity), sets that beside first-party AI-crawler
logs, diagnoses **why** the brand is or is not cited, and re-checks
whether a fix moved anything.
**Authentication.** `Authorization: Bearer sh_live_…`. Keys are minted in the
dashboard and carry scopes: `read` (every GET), `write` (everything else), or
`default` (both). A dashboard session works too.
**Tenant.** A key works on the one workspace it was minted for. A dashboard
session works on the workspace named by the `X-Shruwd-Workspace` header, else
the caller''s own; a key ignores the header. Within it, the caller reaches the
brands they have access to: every brand for the workspace''s owner, a
member''s own brands otherwise. A brand, prompt, entity, suggestion or finding
that belongs to another workspace, or to a brand the caller cannot reach, is a
`404`, indistinguishable from one that does not exist.
**Roles.** Access is per brand. The workspace''s owner has every brand, and
alone creates and archives brands and handles billing. Everyone else is a
member of specific brands with a role on each: `viewer`, `editor` or
`admin`. A request is judged on the caller''s role on the brand it acts on:
reads need `viewer`, writes `editor`, minting an ingest token `admin`. A key
reaches its holder''s brands, as they change, and never exceeds their role on
any of them. Refusals are `403 not_a_member` and `403 insufficient_role`.
**Errors.** The body is always `{ code, message, retryable, details? }` with the
HTTP status. `retryable: true` (429, 5xx) may be retried with backoff;
`Retry-After` is set on 429.
**Rate limits.** Per key, per minute: 120 GET, 30 for everything else.
**Metrics.** Every metric is a `DisplayableMetric`: a point estimate with its
95% interval and `n`, or `insufficient_data` when fewer than ten responses
exist, or `undefined` when the denominator is zero. `insufficient_data` is
**not** zero. Do not report it as a number.
**Measurement is asynchronous.** Creating a brand or a cycle schedules work;
results arrive over the following hours and are read from `visibility`,
`crawlers` and `findings`.'
contact:
name: Shruwd
url: https://shruwd.io
x-logo:
url: https://shruwd.io/android-chrome-192x192.png
servers:
- url: https://shruwd.io/api/v1
security:
- apiKey: []
tags:
- name: Entities
description: The brand itself and its competitors, with the exact aliases that count as a mention.
paths:
/brands/{brandId}/entities:
parameters:
- $ref: '#/components/parameters/brandId'
get:
operationId: listEntities
tags:
- Entities
summary: List entities
description: The self entity first, then every competitor, each with its current aliases, domains, exclusions and context terms.
responses:
'200':
description: Entities.
content:
application/json:
schema:
type: object
required:
- entities
properties:
entities:
type: array
items:
$ref: '#/components/schemas/Entity'
'404':
$ref: '#/components/responses/NotFound'
default:
$ref: '#/components/responses/Error'
post:
operationId: addEntity
tags:
- Entities
summary: Add a competitor
description: 'Competitors only; the self entity comes with the brand.
Aliases are exact strings matched on token boundaries — no patterns, no
fuzzy matching. The name is always one of them; `aliases` adds other
spellings ("Beta List" for BetaList). A given alias equal to the name in
any case stands for it, so a case-sensitive acronym stays case-sensitive.
**Short or common-word names need context terms.** A name or alias of
six characters or fewer, or an ordinary English word ("Arc", "Linear",
"Notion"), matches sentences that are not about the company. Such an
entity is refused with `422 context_terms_required` until
`contextTerms` is given, and `details.spelling` names the spelling; a
mention then counts only when one of the terms appears nearby.'
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/CreateEntityRequest'
responses:
'201':
description: Created.
content:
application/json:
schema:
$ref: '#/components/schemas/Entity'
'404':
$ref: '#/components/responses/NotFound'
'409':
description: '`domain_taken`: another entity of this brand owns the domain. `channel_taken`: another owns the YouTube channel.'
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'422':
description: '`context_terms_required`, `invalid_alias`, `invalid_domain`, `invalid_channel`, `invalid_name`.'
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
default:
$ref: '#/components/responses/Error'
/entities/{entityId}:
parameters:
- $ref: '#/components/parameters/entityId'
put:
operationId: setEntity
tags:
- Entities
summary: Set an entity's aliases, domains, exclusions and context terms
description: 'The **desired** state. The server diffs against the current rows: what
is gone is closed as of now, what is new is added, what is unchanged is
untouched. A run executed yesterday still resolves against yesterday''s
aliases. Works for the self entity too. A generic name cannot have its
context terms removed, and a generic alias is refused without them.
`channels` is the one exception to "desired": omitted, the entity''s
YouTube channels are left as they are; `[]` removes them.'
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/EntityConfig'
responses:
'200':
description: The entity as it now is.
content:
application/json:
schema:
$ref: '#/components/schemas/Entity'
'404':
$ref: '#/components/responses/NotFound'
'409':
description: '`domain_taken`, `channel_taken`.'
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'422':
description: '`context_terms_required`, `invalid_alias`, `invalid_domain`, `invalid_channel`.'
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
default:
$ref: '#/components/responses/Error'
delete:
operationId: removeEntity
tags:
- Entities
summary: Remove a competitor
description: Closes the entity and its rows as of now. The self entity cannot be removed (`409 self_entity`); archive the brand instead.
responses:
'200':
description: Removed.
content:
application/json:
schema:
type: object
required:
- entityId
- removed
properties:
entityId:
type: string
removed:
type: boolean
const: true
'404':
$ref: '#/components/responses/NotFound'
'409':
description: '`self_entity`.'
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
default:
$ref: '#/components/responses/Error'
/brands/{brandId}/suggestions:
parameters:
- $ref: '#/components/parameters/brandId'
get:
operationId: listSuggestions
tags:
- Entities
summary: Names the answers use that you do not track
description: 'The discovery pass: capitalised names found in the AI answers that match
none of the brand''s aliases, surfaced when they appear in at least 20% of
a prompt cluster''s responses. Each carries that share so the reason it is
here is visible. Accept one to make it a competitor (it then counts in
share of voice); dismiss one to quiet it for ninety days.'
parameters:
- name: state
in: query
schema:
type: string
enum:
- open
- accepted
- dismissed
- all
default: open
responses:
'200':
description: Suggestions, strongest first.
content:
application/json:
schema:
type: object
required:
- suggestions
properties:
suggestions:
type: array
items:
$ref: '#/components/schemas/Suggestion'
'404':
$ref: '#/components/responses/NotFound'
default:
$ref: '#/components/responses/Error'
/suggestions/{suggestionId}/accept:
parameters:
- $ref: '#/components/parameters/suggestionId'
post:
operationId: acceptSuggestion
tags:
- Entities
summary: Accept a suggestion as a competitor
description: 'Creates the competitor entity exactly as `POST /brands/{brandId}/entities`
would — the same exact-alias rule, the same `context_terms_required`
refusal for short or common-word names — and marks the suggestion
accepted. The name defaults to the suggested name; the domain defaults to
the one the answers linked, when they did.'
requestBody:
required: false
content:
application/json:
schema:
$ref: '#/components/schemas/AcceptSuggestionRequest'
responses:
'201':
description: Accepted; the competitor exists.
content:
application/json:
schema:
type: object
required:
- suggestion
- entity
properties:
suggestion:
$ref: '#/components/schemas/Suggestion'
entity:
$ref: '#/components/schemas/Entity'
'404':
$ref: '#/components/responses/NotFound'
'409':
description: '`suggestion_decided` (already accepted or dismissed), `domain_taken` or `channel_taken`.'
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'422':
description: '`context_terms_required`, `invalid_alias`, `invalid_domain`, `invalid_channel`.'
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
default:
$ref: '#/components/responses/Error'
/suggestions/{suggestionId}/dismiss:
parameters:
- $ref: '#/components/parameters/suggestionId'
post:
operationId: dismissSuggestion
tags:
- Entities
summary: Dismiss a suggestion
description: Not a competitor. Quiet for ninety days, after which it may be suggested again if the answers still name it.
responses:
'200':
description: Dismissed.
content:
application/json:
schema:
$ref: '#/components/schemas/Suggestion'
'404':
$ref: '#/components/responses/NotFound'
'409':
description: '`suggestion_decided`.'
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
default:
$ref: '#/components/responses/Error'
components:
parameters:
brandId:
name: brandId
in: path
required: true
schema:
type: string
description: The brand's id, or its `slug` — both name the same brand. Responses carry the id as `brandId`.
entityId:
name: entityId
in: path
required: true
schema:
type: string
suggestionId:
name: suggestionId
in: path
required: true
schema:
type: string
responses:
NotFound:
description: '`not_found`: no such resource in this workspace.'
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
Error:
description: Every failure has this body.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
schemas:
Error:
type: object
required:
- code
- message
- retryable
properties:
code:
type: string
description: Stable, machine-readable. E.g. `not_found`, `plan_limit`, `rate_limited`, `context_terms_required`.
message:
type: string
description: For a person. May change between releases.
retryable:
type: boolean
description: True when the same request may succeed later (429, 5xx).
details:
type: object
additionalProperties: true
Suggestion:
type: object
description: A name the answers use that the brand does not track, with the evidence for suggesting it.
required:
- suggestionId
- brandId
- name
- domainHint
- state
- share
- responses
- clusterResponses
- cluster
- samplePromptGroupId
- firstSeenAt
- lastSeenAt
- decidedAt
- entityId
properties:
suggestionId:
type: string
brandId:
type: string
name:
type: string
description: The most frequent surface form in the answers.
domainHint:
type:
- string
- 'null'
description: The registrable domain of the name's own site, when the answers linked the name to it. A link to someone else's page is a citation, not the name's site, and gives no hint. Used as the entity's domain on acceptance unless overridden.
state:
type: string
enum:
- open
- accepted
- dismissed
share:
type: number
description: Distinct responses in the cluster that named it, divided by the cluster's responses. In [0, 1].
responses:
type: integer
clusterResponses:
type: integer
cluster:
type: string
description: '`*` for the whole prompt set, otherwise a prompt tag.'
samplePromptGroupId:
type:
- string
- 'null'
description: One prompt whose answers named it.
firstSeenAt:
type: string
format: date-time
lastSeenAt:
type: string
format: date-time
decidedAt:
type:
- string
- 'null'
format: date-time
entityId:
type:
- string
- 'null'
description: The competitor it became, once accepted.
AcceptSuggestionRequest:
allOf:
- type: object
properties:
name:
type: string
minLength: 1
maxLength: 120
description: Defaults to the suggested name.
- $ref: '#/components/schemas/EntityConfig'
EntityConfig:
type: object
properties:
aliases:
type: array
maxItems: 50
items:
$ref: '#/components/schemas/AliasInput'
description: Defaults to the entity's name.
domains:
type: array
maxItems: 20
items:
type: string
description: Hosts or URLs; reduced to registrable domains. A citation of one of them counts for this entity.
channels:
type: array
maxItems: 5
items:
type: string
maxLength: 300
description: 'YouTube channels the company publishes on: the channel''s URL as YouTube shows it (https://www.youtube.com/@name) or its @handle; a /channel/UC… URL works too, and matches only videos whose channel YouTube reports in that form. A cited video on one of them counts for this entity. Optional: omitted on PUT, the entity''s channels are left as they are.'
exclusions:
type: array
maxItems: 50
items:
type: string
maxLength: 80
description: Literal phrases that contain an alias but are not the entity ("arc welding" for "Arc").
contextTerms:
type: array
maxItems: 50
items:
type: string
maxLength: 80
description: When non-empty, a mention counts only if one of these appears nearby. Required for short or common-word names. The entity's domains are added to them.
CreateEntityRequest:
allOf:
- type: object
required:
- name
properties:
name:
type: string
minLength: 1
maxLength: 120
examples:
- Planwell
- $ref: '#/components/schemas/EntityConfig'
Alias:
type: object
required:
- aliasId
- alias
- kind
- caseSensitive
properties:
aliasId:
type: string
alias:
type: string
kind:
type: string
enum:
- name
- product
- abbreviation
- misspelling
caseSensitive:
type: boolean
description: 'True for acronyms: `SAP`, not `sap`.'
AliasInput:
type: object
required:
- alias
properties:
alias:
type: string
minLength: 1
maxLength: 80
description: An exact string, matched on token boundaries. Not a pattern.
kind:
type: string
enum:
- name
- product
- abbreviation
- misspelling
default: name
caseSensitive:
type: boolean
default: false
Entity:
type: object
required:
- entityId
- name
- isSelf
- requiresContext
- needsContextTerms
- genericSpelling
- contextTerms
- aliases
- domains
- channels
- exclusions
- createdAt
properties:
entityId:
type: string
name:
type: string
isSelf:
type: boolean
description: True for the brand itself.
requiresContext:
type: boolean
description: Mentions count only near one of `contextTerms`.
needsContextTerms:
type: boolean
description: The name or an alias is six characters or fewer or an ordinary English word, so the entity needs context terms to count only real mentions. True with `requiresContext` false means the entity is matching without them; set some with PUT /entities/{entityId}, or remove the alias.
genericSpelling:
type:
- string
- 'null'
description: The spelling, name or alias, that makes `needsContextTerms` true; null when none does.
contextTerms:
type: array
items:
type: string
aliases:
type: array
items:
$ref: '#/components/schemas/Alias'
domains:
type: array
items:
type: string
channels:
type: array
items:
type: string
description: YouTube channel pages, e.g. https://www.youtube.com/@waitlister. A cited video on one of them counts for this entity.
exclusions:
type: array
items:
type: string
createdAt:
type: string
format: date-time
securitySchemes:
apiKey:
type: http
scheme: bearer
bearerFormat: sh_live_…
description: An API key minted in the dashboard, or a dashboard session.