Skip to main content
Context.dev’s Brand API turns any of the following identifiers into a full brand profile with logos, colors, slogans, description, social media handles, address, industry, and website page links:
  • Brand domain (e.g., stripe.com)
  • Company name (e.g., “Stripe Inc”)
  • A work email (e.g., [email protected])
  • A stock ticker (e.g., AAPL)
  • An ISIN (e.g., US0378331005)

Integrate Context.dev's Brand resolution endpoints

Open in Cursor

Prerequisites

  • A Context.dev API key. Sign up at context.dev/signup, copy the key from the dashboard (prefix ctxt_secret_), and export it:
  • An SDK (optional). Install for your language, or skip the install and call directly with curl:

One endpoint, six identifiers

POST /brand/retrieve is the unified lookup for domains, company names, work emails, stock tickers, card transaction descriptors, and direct URLs. Pass exactly one identifier in the body along with a type discriminator that tells the API which lookup to run.
Identifiertype valueField to send
Domainby_domaindomain
Nameby_namename (3–30 characters)
Emailby_emailemail
Tickerby_tickerticker
Card txnby_transactiontransaction_info
Direct URLby_direct_urldirect_url (http(s) URL)
The response envelope is the same for every lookup, so downstream code only branches on the input, not the output.
by_direct_url fetches brand data only from the URL you provide — no domain resolution, database lookup, or cross-source enrichment runs. See Look up by direct URL for when to use it.
ISINs still have a dedicated endpoint: GET /brand/retrieve-by-isin.

Get a brand by domain

Send POST /brand/retrieve with type: "by_domain" and a domain field. The response is a full brand profile: logos, colors, description, socials, industry, address, and links.
10 credits per successful call The connection stays open while the lookup runs, so there’s no need to poll. Repeated lookups for the same domain within maxAgeMs return the cached record.

Request Parameters

ParameterTypeDefaultDescription
typestringRequired. Lookup discriminator. Use by_domain here. See the identifier table for the full list.
domainstringRequired. Domain to retrieve brand data for (e.g. stripe.com). Provide exactly one identifier field per request.
force_languagestringForce the language of the retrieved brand data. Accepts a SupportedLanguage code.
maxSpeedbooleanfalseSkip time-consuming operations for a faster response, at the cost of less comprehensive data.
maxAgeMsinteger7776000000 (90d)Max cache age before a hard refresh. Clamped to [86400000, 31536000000] (1 day – 1 year).
timeoutMSintegerAbort the request with a 408 if it exceeds this many milliseconds. Max 300000 (5 min).

Response

FieldTypeDescription
statusstring"ok" on success, "error" on a non-2xx.
codeintegerHTTP status code, echoed in the body for convenience.
brand.domainstringThe brand’s canonical domain.
brand.titlestringCompany name.
brand.descriptionstringOne-paragraph company description.
brand.sloganstringMarketing tagline, if available.
brand.colors[]arrayBrand colors ordered by visual prominence. Each has hex and a human-readable name. Index 0 is the primary.
brand.logos[]arrayLogo variants. Each has url, mode (light, dark, has_opaque_background), type (logo or icon), colors, and resolution.{width, height, aspect_ratio}.
brand.backdrops[]arrayHero / backdrop imagery. Same color and resolution structure as logos.
brand.socials[]arraySocial profile URLs. type is one of x, facebook, instagram, linkedin, youtube, tiktok, github, and 20+ more.
brand.addressobjectHQ address: street, city, state_province, state_code, country, country_code, postal_code.
brand.stockobjectticker and exchange. null for private companies.
brand.industries.eic[]arrayEIC industry tags with industry and subindustry. For NAICS or SIC codes, call /web/naics or /web/sic.
brand.linksobjectNon-social URLs the resolver was able to discover. Common keys include blog, pricing, careers, contact, privacy, terms, login, signup. Values are null when the resolver couldn’t find a URL for that key.
brand.emailstringPublic contact email, when discoverable.
brand.phonestringPublic contact phone, when discoverable.
brand.primary_languagestringDetected language of the brand’s website (e.g. english, spanish).
brand.is_nsfwbooleanSafe-content flag.
The colors returned by this API are extracted from the brand’s logos. To get pixel-perfect colors as they appear on a website, use the Styleguide API instead.
If you need only domain, title, colors, logos, and backdrops, you can use GET /brand/retrieve-simplified.
10 credits per successful callRequest Parameters
ParameterTypeDefaultDescription
domainstringRequired. Domain to retrieve simplified brand data for.
maxAgeMsinteger7776000000Max cache age before a hard refresh. Clamped to [86400000, 31536000000].
timeoutMSintegerAbort the request with a 408 if it exceeds this many milliseconds. Max 300000.
Response

Look up by company name

Send POST /brand/retrieve with type: "by_name" and a name (3–30 characters). Pass country_gl to bias the match toward a specific country when the name is ambiguous across markets.
10 credits per successful call Name must be 3–30 characters. Pass country_gl as a lowercase ISO 3166-1 alpha-2 code to narrow the match when the name could resolve to multiple brands across markets.

Request Parameters

ParameterTypeDefaultDescription
typestringRequired. Lookup discriminator. Use by_name here.
namestring (3–30 chars)Required. Company name (e.g. Apple Inc, Microsoft Corporation).
country_glstring (ISO 3166-1 alpha-2, lowercase)Two-letter country code to bias the match toward (e.g. us, gb, de).
maxSpeedbooleanfalseSkip time-consuming operations for a faster, less complete response.
force_languagestringForce the language of the retrieved brand data.
maxAgeMsinteger7776000000Max cache age before a hard refresh.
timeoutMSintegerAbort with a 408 if the request exceeds this many milliseconds. Max 300000.

Response

Returns the same envelope as POST /brand/retrieve; see the response field table above.

Look up by work email

Send POST /brand/retrieve with type: "by_email" and an email field. The API extracts the domain, rejects personal-email providers (gmail, outlook, proton, etc.), then runs the same resolver as a domain lookup.
10 credits per successful call Personal-email addresses on common consumer providers (*@gmail.com, *@outlook.com, *@proton.me, and others) return a 422 with error_code: "FREE_EMAIL_DETECTED", which is useful for onboarding flows that should only enrich on a work email.

Request Parameters

ParameterTypeDefaultDescription
typestringRequired. Lookup discriminator. Use by_email here.
emailstringRequired. Email address (e.g. [email protected]).
maxSpeedbooleanfalseSkip time-consuming operations for a faster, less complete response.
force_languagestringForce the language of the retrieved brand data.
maxAgeMsinteger7776000000Max cache age before a hard refresh.
timeoutMSintegerAbort with a 408 if the request exceeds this many milliseconds. Max 300000.

Response

Returns the same envelope as POST /brand/retrieve; see the response field table above.

Look up by stock ticker

Send POST /brand/retrieve with type: "by_ticker" and a ticker field. The response populates the stock object with ticker and exchange.
10 credits per successful call Pass ticker_exchange to constrain the lookup to a specific exchange (NASDAQ, NYSE, LON, XETR, TYO, and 60+ others) when the bare symbol is ambiguous.

Request Parameters

ParameterTypeDefaultDescription
typestringRequired. Lookup discriminator. Use by_ticker here.
tickerstringRequired. Stock ticker symbol (e.g. AAPL, MSFT).
ticker_exchangestring (enum)Exchange code to disambiguate (NASDAQ, NYSE, LON, XETR, TYO, and 60+ others).
maxSpeedbooleanfalseSkip time-consuming operations for a faster, less complete response.
force_languagestringForce the language of the retrieved brand data.
maxAgeMsinteger7776000000Max cache age before a hard refresh.
timeoutMSintegerAbort with a 408 if the request exceeds this many milliseconds. Max 300000.

Response

Returns the same envelope as POST /brand/retrieve; see the response field table above. The stock object is populated for ticker lookups.

Look up by direct URL

Send POST /brand/retrieve with type: "by_direct_url" and a full http(s) direct_url. The API fetches brand fields (title, description, logos, socials, contact info, links) only from that URL — no domain resolution, database lookup, or cross-source enrichment runs. Use this when you want to point the API at a specific page — a subpath, a preview environment, a landing page, or a domain the API doesn’t yet have in its database — and get whatever that page exposes. Results are limited to what the single page contains, so expect fewer fields than a by_domain lookup.
10 credits per successful call
by_direct_url rejects maxSpeed, force_language, and maxAgeMs — the single-page scrape flow would ignore them. Only timeoutMS is accepted alongside direct_url.

Request Parameters

ParameterTypeDefaultDescription
typestringRequired. Lookup discriminator. Use by_direct_url here.
direct_urlstringRequired. Full http(s) URL to fetch (e.g. https://stripe.com/enterprise).
timeoutMSintegerAbort with a 408 if the request exceeds this many milliseconds. Max 300000.

Response

Returns the same envelope as POST /brand/retrieve, but the brand object only contains fields that could be extracted from the provided URL: domain, title, description, logos, socials, email, phone, and links. Fields backed by database enrichment — colors, backdrops, industries, stock, address — are not returned. If the URL can’t be fetched, the API responds with 400 and error_code: "WEBSITE_ACCESS_ERROR".

Look up by ISIN

GET /brand/retrieve-by-isin resolves an International Securities Identification Number (ISIN), the 12-character identifier used in financial data feeds, to a brand and populates the stock object.
10 credits per successful call Use this when you’re working with financial data feeds keyed by ISIN. Malformed ISINs return a 400.

Request Parameters

ParameterTypeDefaultDescription
isinstringRequired. 12-character ISIN (e.g. US0378331005 for Apple Inc.).
maxSpeedbooleanfalseSkip time-consuming operations for a faster, less complete response.
force_languagestringForce the language of the retrieved brand data.
maxAgeMsinteger7776000000Max cache age before a hard refresh.
timeoutMSintegerAbort with a 408 if the request exceeds this many milliseconds. Max 300000.

Response

Returns the same envelope as POST /brand/retrieve; see the response field table above. The stock object is populated with the resolved ticker.

Identify a card transaction

Send POST /brand/retrieve with type: "by_transaction" and a raw descriptor in transaction_info. Pass mcc, city, country_gl, or phone hints when you have them to improve accuracy on ambiguous descriptors.
10 credits per successful call Descriptors the API can’t match with confidence return a 400 with error_code: "NOT_FOUND". Setting high_confidence_only: true makes the API return that 400 instead of a low-confidence match.

Request Parameters

ParameterTypeDefaultDescription
typestringRequired. Lookup discriminator. Use by_transaction here.
transaction_infostringRequired. Raw transaction descriptor (e.g. STARBUCKS STORE 12345).
country_glstring (lowercase ISO 3166-1 alpha-2)Country hint (e.g. us, gb).
citystringCity hint (e.g. San Francisco).
mccstringMerchant Category Code (e.g. 5814).
phonenumberMerchant phone hint, when present on the descriptor.
high_confidence_onlybooleanfalseReturn a 400 with error_code: "NOT_FOUND" instead of a low-confidence match.
maxSpeedbooleanfalseSkip time-consuming operations for a faster, less complete response.
force_languagestringForce the language of the retrieved brand data.
timeoutMSintegerAbort with a 408 if the request exceeds this many milliseconds. Max 300000.

Response

Returns the same envelope as the rest of POST /brand/retrieve; see the response field table above.

Handle errors

Not every input resolves. The API returns a non-2xx response with a message, status: "error", and an error_code:
Common cases:
Statuserror_codeWhen
400WEBSITE_ACCESS_ERRORDomain can’t be resolved or fetched (DNS failure, hostile WAF).
400INPUT_VALIDATION_ERRORRequired parameter missing or malformed.
400NOT_FOUNDLookup ran but no brand was matched.
408REQUEST_TIMEOUTRequest exceeded timeoutMS or the platform max.
422FREE_EMAIL_DETECTEDPersonal-email provider on a by_email lookup.
429RATE_LIMITEDRate limit hit.
Treat NOT_FOUND responses as a normal outcome, not an error. For high-volume pipelines, cache misses for at least 24 hours so you don’t re-resolve the same dead identifier on every retry. Rate limits surface as HTTP 429. Back off exponentially:
For the full catalog of error codes, see Troubleshooting.

Use cases

  • Pre-fill onboarding forms with logo, name, and colors when a user signs up with a work email.
  • Enrich CRM leads with industry, socials, address, and logos for outbound playbooks.
  • Resolve card transaction descriptors to canonical merchant brands for spend analytics.
  • Power “trusted by” logo strips and customer-wall sections with live brand data.
  • Pull public-company profiles from a ticker or ISIN for investor-facing dashboards.

Next steps

Prefetch for Faster Response

Hide cold-hit latency from your users.

Handle Rate Limits

Backoff strategies, client cache, and prefetch fallbacks.

Best Practices

Caching, error handling, and key hygiene.

Troubleshooting

Status codes, retry patterns, and common errors.