Amazon product dimensions and weight come back from /api/amazon-product-lookup in productInfo.details and productInfo.additionalDetails, as the page's own label and text: "Product Dimensions": "14 x 17 x 7 inches; 10.6 Pounds" for the documented PlayStation 5 lookup. There is no numeric size or weight field. Parse the text, convert the units yourself, and treat a label the page does not show as unknown, never as 0. One lookup costs 1 credit.
Key Takeaways
- Dimensions and weight are text values in productInfo.details and productInfo.additionalDetails, keyed by the label the product page shows.
- A dimensions value can carry the weight too: 14 x 17 x 7 inches; 10.6 Pounds.
- A label the page does not show has no key at all, so an unknown weight is missing, never 0.
- Labels and units follow the page: item or package values, the unit the page uses, and the marketplace's language.
- The API converts nothing and returns no fees: the conversion to cm and kg is a few lines of Python on the one lookup you already pay for.
Where are dimensions and weight in the lookup response?
In two dictionaries. details holds the rows of the page's technical details table, additionalDetails the rows of its product information list. A row can appear in both, as most do in the documented example below; some appear in one only, for example Best Sellers Rank and Customer Rating in additionalDetails. Each key is the label as the page shows it, each value the text next to it. These are a different field from the feature bullets, which the bullet points guide covers.
| Field | Source on the page | What you get |
|---|---|---|
productInfo.details | The technical details table of the page | {"Product Dimensions": "14 x 17 x 7 inches; 10.6 Pounds", ...} |
productInfo.additionalDetails | The product information list of the page | Same kind of rows, plus Best Sellers Rank, Customer Rating |
| A label the page does not show | Missing key | No Item Weight key at all, never 0 |
| Both tables empty | {} | No rows found on the page |
Size and weight rows of the documented B0CL61F39H lookup on amazon.com (trimmed)
{
"success": true,
"data": {
"productInfo": {
"asin": "B0CL61F39H",
"details": {
"Item Weight": "10.6 pounds",
"Item model number": "CFI-2015",
"Product Dimensions": "14 x 17 x 7 inches; 10.6 Pounds"
},
"additionalDetails": {
"Best Sellers Rank": "Nr. 31 in Video Games Nr. 1 in PlayStation 5 Consoles",
"Item Weight": "10.6 pounds",
"Product Dimensions": "14 x 17 x 7 inches; 10.6 Pounds"
}
}
}
}

Show every size and weight label of one ASIN with curl and jq
# One lookup (1 credit): every size and weight label from both tables, as the page shows them
curl -sG "https://sellermagnet-api.com/api/amazon-product-lookup" \
-H "X-Api-Key: $SELLERMAGNET_API_KEY" \
--data-urlencode "asin=B0CL61F39H" --data-urlencode "marketplaceId=ATVPDKIKX0DER" \
| jq '.data.productInfo | (.details // {}) + (.additionalDetails // {})
| with_entries(select(.key | test("dimension|weight"; "i")))'
How do I convert Amazon dimensions to cm and kg in Python?
Look for labels that contain dimensions or weight, read three numbers and a unit from a dimensions value and one number and a unit from a weight value, and convert with fixed factors. A dedicated weight label wins over the weight at the end of a dimensions value. Item values win over package values, and the CSV says when only package values exist. The script uses get_with_retry from retry.py and new_session and ApiError from sellermagnet.py, both from the Python quickstart.
dimensions_weight.py: size and weight to cm and kg, one CSV row per ASIN
"""Read an Amazon product's dimensions and weight from the lookup response and export them in cm and kg.
One /amazon-product-lookup call per ASIN (1 credit). productInfo.details (the technical details table) and
productInfo.additionalDetails (the product information list) hold the page's own labels and text, for example
"Product Dimensions": "14 x 17 x 7 inches; 10.6 Pounds". Nothing is converted for you, and a listing that does not
show a value has no key for it, so a missing value stays empty here, never 0.
Helpers: sellermagnet.py and retry.py from the Python quickstart post.
"""
import csv
import re
import requests
from retry import get_with_retry
from sellermagnet import ApiError, new_session
MARKETPLACE = "ATVPDKIKX0DER" # amazon.com
ASINS = ["B0CL61F39H", "B0EXAMPLE1", "B0EXAMPLE2", "B0EXAMPLE3", "B0EXAMPLE4"]
OUT_FILE = "dimensions.csv"
DIMENSION_WORDS = ("dimensions",) # labels are in the marketplace language: add yours for non-English stores
WEIGHT_WORDS = ("weight",)
MAX_FAILED = 3
ASIN_RE = re.compile(r"^[A-Z0-9]{10}$")
TO_CM = {"in": 2.54, "inch": 2.54, "inches": 2.54, "cm": 1.0, "centimeters": 1.0, "centimetres": 1.0,
"mm": 0.1, "millimeters": 0.1, "millimetres": 0.1}
TO_KG = {"lb": 0.45359237, "lbs": 0.45359237, "pound": 0.45359237, "pounds": 0.45359237,
"oz": 0.028349523125, "ounce": 0.028349523125, "ounces": 0.028349523125,
"kg": 1.0, "kilogram": 1.0, "kilograms": 1.0, "g": 0.001, "gram": 0.001, "grams": 0.001}
NUM = r"(\d+(?:[.,]\d+)*)"
DIMS_RE = re.compile(rf"{NUM}\s*[xX\u00d7]\s*{NUM}\s*[xX\u00d7]\s*{NUM}\s*([a-zA-Z]+)")
WEIGHT_RE = re.compile(rf"{NUM}\s*([a-zA-Z]+)")
def number(text: str) -> float:
"""'10.6' -> 10.6, '1,2' -> 1.2 (decimal comma), '1,234' -> 1234.0 (thousands), '1.299,5' -> 1299.5.
A single comma with a leading '0' before it (e.g. '0,748') is never thousands grouping in any
convention (nobody writes '0,748' to mean 748), so that case is always read as a decimal comma;
apiblog-producer-apiblog-2026-11-19-1000 fix round 1: '0,748 Kilogramm' used to parse as 748.0 kg
instead of 0.748 kg, a silent 1000x error on a real European-locale label."""
if "," in text and "." in text: # the separator that comes last is the decimal one
dec = "," if text.rfind(",") > text.rfind(".") else "."
text = text.replace("." if dec == "," else ",", "").replace(dec, ".")
elif "," in text:
whole, _, tail = text.rpartition(",")
text = whole.replace(",", "") + ("" if len(tail) == 3 and whole != "0" else ".") + tail
return float(text)
def parse_dims(value: str):
"""'14 x 17 x 7 inches; 10.6 Pounds' -> (43.18, 35.56, 17.78) in cm, longest side first. None if unreadable."""
m = DIMS_RE.search(value)
if not m or m.group(4).lower() not in TO_CM:
return None
factor = TO_CM[m.group(4).lower()]
return tuple(sorted((round(number(g) * factor, 2) for g in m.groups()[:3]), reverse=True))
def parse_weight(value: str):
"""'10.6 pounds' -> 4.808 kg. Reads the part after ';' when a dimensions value carries the weight too."""
for part in reversed(value.split(";")):
for m in WEIGHT_RE.finditer(part):
unit = m.group(2).lower()
if unit in TO_KG:
return round(number(m.group(1)) * TO_KG[unit], 3)
return None
def measurements(product: dict) -> dict:
"""Item and package size/weight from both tables. details is read first; a label only in
additionalDetails still counts. Each value remembers the label it came from."""
found = {}
for table in ("details", "additionalDetails"):
for label, value in (product.get(table) or {}).items():
low = label.lower()
kind = "package" if "package" in low else "item"
if any(w in low for w in DIMENSION_WORDS):
dims = parse_dims(str(value))
if dims:
found.setdefault(f"{kind}_cm", (dims, label))
weight = parse_weight(str(value)) # "... inches; 10.6 Pounds" carries the weight as well
if weight is not None:
found.setdefault(f"{kind}_kg_from_dims", (weight, label))
elif any(w in low for w in WEIGHT_WORDS):
weight = parse_weight(str(value))
if weight is not None:
found.setdefault(f"{kind}_kg", (weight, label))
for kind in ("item", "package"): # a dedicated weight label wins over the dimensions suffix
if f"{kind}_kg_from_dims" in found:
found.setdefault(f"{kind}_kg", found[f"{kind}_kg_from_dims"])
del found[f"{kind}_kg_from_dims"]
return found
def clean_asins(raw: list) -> list:
"""The lookup does not validate the ASIN format: a typo is a billed call, so filter first."""
seen, out = set(), []
for value in raw:
asin = str(value).strip().upper()
if not ASIN_RE.match(asin):
print(f"skip {value!r}: not an ASIN, no call made")
elif asin not in seen:
seen.add(asin)
out.append(asin)
return out
def main():
session = new_session()
rows, failed, lookups = [], 0, 0
for asin in clean_asins(ASINS):
lookups += 1
row = {"asin": asin}
try:
product = get_with_retry(session, "amazon-product-lookup", asin=asin,
marketplaceId=MARKETPLACE)["productInfo"]
except ApiError as err:
if err.status in (401, 403) or (err.status == 400 and "marketplace" in str(err).lower()):
raise # key, credits or marketplace: every next call would fail the same way
row["note"] = f"error {err}"
failed += err.status != 404 # a 404 is an answer (no such product), not a failure to retry
except requests.RequestException as err:
row["note"] = f"no answer ({type(err).__name__}), try again later"
failed += 1
else:
found = measurements(product)
dims, label = found.get("item_cm") or found.get("package_cm") or (None, None)
kg, kg_label = found.get("item_kg") or found.get("package_kg") or (None, None)
row.update(cm=dims, kg=kg, source=" / ".join(dict.fromkeys(x for x in (label, kg_label) if x)))
if not dims and kg is None:
row["note"] = "no size or weight on the page"
elif "item_cm" not in found and "item_kg" not in found:
row["note"] = "package values only (no item values shown)"
rows.append(row)
if failed >= MAX_FAILED:
print(f"stopped after {failed} failed lookups")
break
with open(OUT_FILE, "w", newline="", encoding="utf-8") as f:
out = csv.writer(f)
out.writerow(["asin", "longest_cm", "median_cm", "shortest_cm", "weight_kg", "source_label", "note"])
for r in rows:
cm = r.get("cm") or ("", "", "")
out.writerow([r["asin"], *cm, "" if r.get("kg") is None else r["kg"], r.get("source") or "",
r.get("note", "")])
for r in rows:
size = " x ".join(f"{v:g}" for v in r["cm"]) + " cm" if r.get("cm") else "size -"
weight = f"{r['kg']:g} kg" if r.get("kg") is not None else "weight -"
print(f"{r['asin']} {size:<24} {weight:<9} {r.get('note', '')}".rstrip()) # labels: see the CSV
print(f"lookups {lookups}, credits {lookups} (+1 per billed retry), wrote {OUT_FILE}")
if __name__ == "__main__":
try:
main()
except ApiError as err: # 401/403 or a bad marketplace: nothing else would succeed either
raise SystemExit(f"stopped: {err}")
Output for five ASINs (illustrative data apart from the documented B0CL61F39H values)
B0CL61F39H 43.18 x 35.56 x 17.78 cm 4.808 kg
B0EXAMPLE1 30 x 20 x 10 cm 1.2 kg
B0EXAMPLE2 31.75 x 21.08 x 5.33 cm 0.272 kg package values only (no item values shown)
B0EXAMPLE3 size - weight - no size or weight on the page
B0EXAMPLE4 size - weight - error 404: Invalid product
lookups 5, credits 5 (+1 per billed retry), wrote dimensions.csv
dimensions.csv from the same run, sides sorted longest first
asin,longest_cm,median_cm,shortest_cm,weight_kg,source_label,note
B0CL61F39H,43.18,35.56,17.78,4.808,Product Dimensions / Item Weight,
B0EXAMPLE1,30.0,20.0,10.0,1.2,Product Dimensions / Item Weight,
B0EXAMPLE2,31.75,21.08,5.33,0.272,Package Dimensions,package values only (no item values shown)
B0EXAMPLE3,,,,,,no size or weight on the page
B0EXAMPLE4,,,,,,error 404: Invalid product
| Unit on the page | Factor | Result |
|---|---|---|
| inches, inch, in | x 2.54 | cm |
| cm, centimeters, centimetres | x 1 | cm |
| mm, millimeters, millimetres | x 0.1 | cm |
| pounds, pound, lbs, lb | x 0.45359237 | kg |
| ounces, ounce, oz | x 0.028349523125 | kg |
| kg, kilogram, kilograms | x 1 | kg |
| grams, gram, g | x 0.001 | kg |

What does it cost?
1 credit per lookup, whatever you read from the response. The lookup does not validate the ASIN format, so the script drops anything that is not 10 letters or digits before paying, stops at once on a 401, 403 or an unknown marketplace, and gives up after three failed lookups. For large lists, run the same function inside the worker pool from the bulk ASIN lookup guide.
| Step | Credits | Note |
|---|---|---|
One /api/amazon-product-lookup per ASIN | 1 each | Size, weight and every other field in one call |
| An ASIN that does not exist (404) | 1 | Billed; the script counts it as an answer, not a failure |
| Retry after a 502 or 503 | 1 per attempt | A 500 without Retry-After is refunded |
| Example run below (5 ASINs) | 5 | No retries |
What the dimensions data cannot tell you
- It is what the page shows. The values are the text the listing shows; the API measures nothing and returns no fees. A fee estimate needs your own rates, as in the referral fee calculator.
- Item or package. A page can show product dimensions, package dimensions, both or neither. The script prefers item values and labels a package fallback in the CSV.
- Labels follow the marketplace. Keys are in the page's language, so add your marketplace's words to
DIMENSION_WORDSandWEIGHT_WORDSbefore running it on a non-English store. - Unknown units stay empty. A value in feet or any unit outside the table is not converted; check those rows by hand instead of trusting a guess.
- Not a dimensional-weight calculation. The parsed cm and kg are the listing's own text, not a measurement. If you need the dimensional (volumetric) weight Amazon's own fulfillment pages use to compare against the actual weight, that is a separate formula you apply to these numbers yourself; this post only gets you the raw values.
Frequently Asked Questions
Does the SellerMagnet API return Amazon product dimensions?
Yes, as text. /api/amazon-product-lookup returns them in productInfo.details and productInfo.additionalDetails under the page's label, for example Product Dimensions: 14 x 17 x 7 inches; 10.6 Pounds. It costs 1 credit.
Why is there no Item Weight key for some ASINs?
The product page does not show that label. The API only returns labels with a value, so treat a missing key as unknown, not as 0.
Are the dimensions in inches or centimetres?
Whatever the page shows. The documented amazon.com example uses inches and pounds; other listings and marketplaces can use other units, so parse the unit with the number.
Can I use these values to calculate fees?
Only as your own input. The API returns no fees, and the values are the listing's text, so check them before relying on a fee calculation.
What is the difference between details and additionalDetails?
details holds the page's technical details table, additionalDetails its product information list. A row can appear in both; read both and prefer details.
Bottom line: size and weight are one lookup away, but as text under page labels. Read both tables, parse number and unit together, convert with fixed factors, prefer item over package values and leave unknown values empty. The product lookup page lists every response field, and a free account includes 150 credits.