Skip to main content
This page shows two tasks in Flutter (Dart), Swift, Kotlin, Java, PHP, Apex (Salesforce), and Vue:
  • Show a logo. The Logo.dev CDN is a URL. Your app loads https://img.logo.dev/{domain} with a publishable key, and no server is involved.
  • Call the API. Brand returns a company’s name, logo, colors, and more as JSON from GET /v2/brands. Call it from your server with a secret key.
For other languages, use the same URL and the same request.

Keys

Get your API keys

Your dashboard has a publishable key for the Logo.dev CDN and a secret key for the Logo.dev API. Every plan includes both.
The samples use the placeholders LOGO_DEV_PUBLISHABLE_KEY and LOGO_DEV_SECRET_KEY. Replace LOGO_DEV_PUBLISHABLE_KEY with your publishable key. The server samples read LOGO_DEV_SECRET_KEY from an environment variable, so set it to your secret key. To stop other websites from using your publishable key, add domain restrictions. Restrictions check the Referer header that a web browser sends. Native Flutter, Swift, and Kotlin apps send no Referer, so with restrictions on, their logo requests return 401. Do not turn on restrictions for a key that a native app uses. Each sample loads the logo for a domain at 64 pixels, with retina=true for dense screens. format=png keeps the background transparent. For the other parameters, see the CDN overview.
company_logo.dart
If Logo.dev has no logo for a domain, the CDN returns a generated monogram, so the image never breaks. See fallback images.

Call the API

Each sample sends GET https://api.logo.dev/v2/brands?domain=... with the secret key, waits up to 20 seconds, and reads the brand from data. Run it on your server. Never ship the secret key in a mobile app or a web page.
This sample is Dart for a server, such as a Shelf app. Add the http package.
brand.dart

Handle each status

Only a 200 carries a brand. The samples return no brand for 202 and 404 (Java throws), and throw for any other status. data.logo.url is a signed download URL that stops working after about 24 hours. Download the file if you need to keep it. See images. For the full response, see Brand.

Next steps

CDN parameters

Size, format, theme, and lookups by name, ticker, or ISIN.

Brand

Every identifier, field, and status the API returns.

Keys and restrictions

Create keys and limit a publishable key to your domains.

Rate limits

Check the limits before you ship.