100 free credits. No credit card required. Get a key

Target categories API

Target’s category tree, one level at a time.

GET /v1/target/categories1 credit per callRefunded on failure
import os, requests

res = requests.get(
    "https://api.groundsocial.dev/v1/target/categories",
    headers={"Authorization": f"Bearer {os.environ['GROUNDSOCIAL_API_KEY']}"},
)
res.raise_for_status()
data = res.json()
Response
200 · 1 credit
{
"category_id": "root",
"category": {
"canonical_url": "/",
"name": "target",
"category_id": "root",
"deep_link": "target://product/listing?idType=ENDECA&id=root&title=Homepage",
"visibility": [
"WEB"
]
},
"children": [
{
"canonical_url": "/c/beauty/-/N-55r1x",
"name": "Beauty",
"category_id": "55r1x",
"parent_category_id": "root",
"image_url": "https://target.scene7.com/is/image/Target/GUEST_112bc773-50c6-4f0b-8aab-cbef96e55c0a",
"deep_link": "target://product/listing?idType=ENDECA&id=55r1x&title=Beauty",
"visibility": [
"WEB",
"APP"
]
},
{
"canonical_url": "/c/gift-ideas/-/N-96d2i",
"name": "Gift Ideas",
"category_id": "96d2i",
"parent_category_id": "root",
"image_url": "https://target.scene7.com/is/image/Target/GUEST_b2e304aa-abc5-4ddf-8381-4b99cfb3eab0",
"deep_link": "target://product/listing?idType=ENDECA&id=96d2i&title=Gift+Ideas",
"visibility": [
"WEB",
"APP"
]
},
"… 4 more"
]
}

Parameters

NameTypeDescription
category_idquerystringCategory id (default root).
Response fields

200 with a TargetCategories, in the JSON Target’s own site reads.

FieldTypeDescription
category_idstring
categoryobject | null
childrenobject[]
Status codes
StatusMeaning
200The category and its children.
400Invalid input. Nothing was charged.
401Missing or invalid API key.
402Not enough credits, a spend cap was reached, or payment is required.
403The target is private, or the account is suspended.
404The item, category or place does not exist.
429Too many requests. Wait for Retry-After seconds.
503Target is temporarily unavailable. Retryable; nothing was charged.

Every error has code, message, hint and retryable. All error codes

Target is a trademark of Target Brands, Inc. We are not affiliated with or endorsed by Target.