curl --request POST \
--url https://api.brandfetch.io/v2/brands/transaction \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"transactionLabel": "STARBUCKS 1523 OMAHA NE",
"countryCode": "US"
}
'import requests
url = "https://api.brandfetch.io/v2/brands/transaction"
payload = {
"transactionLabel": "STARBUCKS 1523 OMAHA NE",
"countryCode": "US"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({transactionLabel: 'STARBUCKS 1523 OMAHA NE', countryCode: 'US'})
};
fetch('https://api.brandfetch.io/v2/brands/transaction', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.brandfetch.io/v2/brands/transaction",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'transactionLabel' => 'STARBUCKS 1523 OMAHA NE',
'countryCode' => 'US'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.brandfetch.io/v2/brands/transaction"
payload := strings.NewReader("{\n \"transactionLabel\": \"STARBUCKS 1523 OMAHA NE\",\n \"countryCode\": \"US\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.brandfetch.io/v2/brands/transaction")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"transactionLabel\": \"STARBUCKS 1523 OMAHA NE\",\n \"countryCode\": \"US\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.brandfetch.io/v2/brands/transaction")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"transactionLabel\": \"STARBUCKS 1523 OMAHA NE\",\n \"countryCode\": \"US\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"domain": "<string>",
"claimed": true,
"description": "<string>",
"longDescription": "<string>",
"links": [
{
"name": "twitter",
"url": "<string>"
}
],
"logos": [
{
"theme": "dark",
"formats": [
{
"src": "<string>",
"format": "svg",
"height": 123,
"width": 123,
"size": 123,
"background": "transparent"
}
],
"tags": [
{}
],
"type": "icon"
}
],
"colors": [
{
"hex": "<string>",
"type": "accent",
"brightness": 123
}
],
"fonts": [
{
"name": "<string>",
"type": "title",
"origin": "google",
"originId": "<string>",
"weights": [
{}
]
}
],
"images": [
{
"formats": [
{
"src": "<string>",
"format": "svg",
"height": 123,
"width": 123,
"size": 123,
"background": "transparent"
}
],
"tags": [
{}
],
"type": "banner",
"pictureMetadata": {
"score": 123,
"rank": 123,
"naturalWidth": 123,
"naturalHeight": 123,
"alt": "<string>",
"sourceUrl": "<string>",
"imageCategory": "<string>",
"categoryConfidence": 123
}
}
],
"qualityScore": 123,
"company": {
"employees": 1,
"financialIdentifiers": {
"isin": [
"<string>"
],
"ticker": [
"<string>"
]
},
"foundedYear": 123,
"industries": [
{
"id": "<string>",
"score": 123,
"slug": "<string>",
"name": "<string>",
"emoji": "<string>",
"parent": [
{
"id": "<string>",
"slug": "<string>",
"name": "<string>",
"emoji": "<string>"
}
]
}
],
"kind": "EDUCATIONAL",
"location": {
"city": "<string>",
"country": "<string>",
"countryCode": "<string>",
"region": "<string>",
"state": "<string>",
"subregion": "<string>"
}
},
"isNsfw": true,
"urn": "<string>"
}{
"message": "Failed to enrich transaction"
}{
"message": "Unauthorized"
}{
"message": "Payment required. Either authenticate with a Brandfetch API key (Authorization: Bearer <key>) or pay for this request with x402: sign the payment described in the PAYMENT-REQUIRED header and retry with a PAYMENT-SIGNATURE header.",
"documentation": "https://docs.brandfetch.com/agents/pay-per-request",
"pricing": {
"route": "GET /v2/brands/*",
"price": "$0.10"
},
"resource": "https://api.brandfetch.io/v2/brands/nike.com",
"standingAccess": "For many requests, POST /v2/agents/access (paid the same way) provisions an API key preloaded with prepaid credits."
}{
"message": "Not Found",
"payment": {
"charged": false,
"documentation": "<string>",
"message": "<string>"
}
}{
"message": "API key quota exceeded"
}{
"message": "Transaction enrichment is temporarily unavailable. Please retry."
}Transaction API
Turn payment transactions into merchant data. Authenticate with an API key sent as Authorization: Bearer <key>, or pay for the single request with x402 or MPP: https://docs.brandfetch.com/agents/pay-per-request.
curl --request POST \
--url https://api.brandfetch.io/v2/brands/transaction \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"transactionLabel": "STARBUCKS 1523 OMAHA NE",
"countryCode": "US"
}
'import requests
url = "https://api.brandfetch.io/v2/brands/transaction"
payload = {
"transactionLabel": "STARBUCKS 1523 OMAHA NE",
"countryCode": "US"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({transactionLabel: 'STARBUCKS 1523 OMAHA NE', countryCode: 'US'})
};
fetch('https://api.brandfetch.io/v2/brands/transaction', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.brandfetch.io/v2/brands/transaction",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'transactionLabel' => 'STARBUCKS 1523 OMAHA NE',
'countryCode' => 'US'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.brandfetch.io/v2/brands/transaction"
payload := strings.NewReader("{\n \"transactionLabel\": \"STARBUCKS 1523 OMAHA NE\",\n \"countryCode\": \"US\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.brandfetch.io/v2/brands/transaction")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"transactionLabel\": \"STARBUCKS 1523 OMAHA NE\",\n \"countryCode\": \"US\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.brandfetch.io/v2/brands/transaction")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"transactionLabel\": \"STARBUCKS 1523 OMAHA NE\",\n \"countryCode\": \"US\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"domain": "<string>",
"claimed": true,
"description": "<string>",
"longDescription": "<string>",
"links": [
{
"name": "twitter",
"url": "<string>"
}
],
"logos": [
{
"theme": "dark",
"formats": [
{
"src": "<string>",
"format": "svg",
"height": 123,
"width": 123,
"size": 123,
"background": "transparent"
}
],
"tags": [
{}
],
"type": "icon"
}
],
"colors": [
{
"hex": "<string>",
"type": "accent",
"brightness": 123
}
],
"fonts": [
{
"name": "<string>",
"type": "title",
"origin": "google",
"originId": "<string>",
"weights": [
{}
]
}
],
"images": [
{
"formats": [
{
"src": "<string>",
"format": "svg",
"height": 123,
"width": 123,
"size": 123,
"background": "transparent"
}
],
"tags": [
{}
],
"type": "banner",
"pictureMetadata": {
"score": 123,
"rank": 123,
"naturalWidth": 123,
"naturalHeight": 123,
"alt": "<string>",
"sourceUrl": "<string>",
"imageCategory": "<string>",
"categoryConfidence": 123
}
}
],
"qualityScore": 123,
"company": {
"employees": 1,
"financialIdentifiers": {
"isin": [
"<string>"
],
"ticker": [
"<string>"
]
},
"foundedYear": 123,
"industries": [
{
"id": "<string>",
"score": 123,
"slug": "<string>",
"name": "<string>",
"emoji": "<string>",
"parent": [
{
"id": "<string>",
"slug": "<string>",
"name": "<string>",
"emoji": "<string>"
}
]
}
],
"kind": "EDUCATIONAL",
"location": {
"city": "<string>",
"country": "<string>",
"countryCode": "<string>",
"region": "<string>",
"state": "<string>",
"subregion": "<string>"
}
},
"isNsfw": true,
"urn": "<string>"
}{
"message": "Failed to enrich transaction"
}{
"message": "Unauthorized"
}{
"message": "Payment required. Either authenticate with a Brandfetch API key (Authorization: Bearer <key>) or pay for this request with x402: sign the payment described in the PAYMENT-REQUIRED header and retry with a PAYMENT-SIGNATURE header.",
"documentation": "https://docs.brandfetch.com/agents/pay-per-request",
"pricing": {
"route": "GET /v2/brands/*",
"price": "$0.10"
},
"resource": "https://api.brandfetch.io/v2/brands/nike.com",
"standingAccess": "For many requests, POST /v2/agents/access (paid the same way) provisions an API key preloaded with prepaid credits."
}{
"message": "Not Found",
"payment": {
"charged": false,
"documentation": "<string>",
"message": "<string>"
}
}{
"message": "API key quota exceeded"
}{
"message": "Transaction enrichment is temporarily unavailable. Please retry."
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
Response
Successful request. A request paid with MPP whose response was lost can be retried with the same credential and the same body for two minutes: it is served from the payment already taken and not charged again. The credential pays for that transaction only: presented with another transactionLabel or countryCode, it is refused with a 402 whose reason is credential_spent.
Unique identifier for the brand
Brand name
Brand website URL
Set to true if the owner of the brand claimed its brand profile on Brandfetch
Brand description
Brand long description
Social media links of the brand
Show child attributes
Show child attributes
Logos, symbols & icons of the brand
Show child attributes
Show child attributes
Accent, dark, light & palette colors of the brand
Show child attributes
Show child attributes
Title & body fonts of the brand
Show child attributes
Show child attributes
Banner, picture & other images of the brand
Show child attributes
Show child attributes
Score between 0-1 which indicates the quality of the data for the given brand. Useful when you don't want to show lower quality brands to your users.
Lower 3rd is poor quality, middle 3rd is OK quality, upper 3rd is high quality. Lower scores indicate that a brand is less likely to be "real". For example, where google.com will score high, my-random-blog.com will score between 0.3-0.4. The score factors in things like data-recency, whether the brand has been claimed, if it has been manually verified by our team, the brand's domain ranking on the web, as well as other factors.
Don't rely on a fixed score for any given brand. The way we calculate this score may change over time as we add new factors, or tweak the weights of existing ones such that a score for a given brand may change. However, they will remain aligned such that scores divide quality into thirds: low, medium, high.
The company object returns firmographic data related to the brand
Show child attributes
Show child attributes
true when the brand is for adult content, e.g. is not safe for work
Uniform Resource Name for the brand
Was this page helpful?