Hanes APIhanes.com ↗
Access Hanes.com product data via API: search by keyword, browse men's/women's/sale categories, and retrieve variant-level pricing and stock status.
What is the Hanes API?
The Hanes.com API exposes 7 endpoints covering product search, category browsing, and per-SKU detail retrieval across Hanes.com's catalog. The get_product_details endpoint returns full variant data including per-variant SKU, stock status, and pricing, while search_products accepts keyword queries with faceted filters and sort controls. Response objects include structured fields for images, priceRange, configurable options, and pagination metadata.
curl -X GET 'https://api.parse.bot/scraper/fa5b631c-119a-4433-8e9b-41e0f5d848a0/search_products?page=1&sort=relevance&query=socks&page_size=12&sort_direction=ASC' \ -H 'X-API-Key: $PARSE_API_KEY'
Typed, relational, agent-ready
A generated client with real types, enums, and the links between objects — the structure a flat JSON response can't carry. Autocompletes in your editor and reads cleanly to coding agents.
- Fully typed · autocompletes
- Objects link to objects
- Typed errors & pagination
Typed Python client. Set up the SDK in your uv project, then pull this API’s typed client:
uv add parse-sdk uv run parse init uv run parse add --marketplace hanes-com-api
uv run parse add --marketplace pulls a pinned snapshot of this canonical API — it won’t change underneath you. To customize it, subscribe and swap to your own copy.
"""
Hanes.com Product Search, Category Browsing, and Detail Lookup
"""
from parse_apis.hanes_com_api import Hanes, Sort, SortDirection, CategoryPath, ProductNotFound
hanes = Hanes()
# Search for socks sorted by price ascending, capped at 5 items
for product in hanes.products.search(query="socks", sort=Sort.PRICE, sort_direction=SortDirection.ASC, limit=5):
print(product.name, product.sku, product.price_range.minimum.final.value)
# Browse the men's category by position
men = hanes.category(CategoryPath.MEN)
for product in men.products(sort=Sort.POSITION, sort_direction=SortDirection.ASC, limit=3):
print(product.name, product.url_key, product.price_range.maximum.final.value)
# Get full product details by SKU
detail = hanes.productdetails.get(sku="PBS184")
print(detail.sku, detail.basic_details)
# Browse sale items
for item in hanes.products.list_sale(limit=3):
print(item.name, item.sku, item.price_range.minimum.final.value)
# Typed error handling for a missing product
try:
hanes.productdetails.get(sku="ZZZZZ_INVALID")
except ProductNotFound as exc:
print(f"Product not found: sku={exc.sku}")
print("exercised: products.search / category.products / productdetails.get / products.list_sale / typed error")
Full-text search over all Hanes products by keyword. Results include product name, SKU, URL, images, price range, and configurable options (color/size). Paginates via integer page counter. Facets for gender, size, and color family are returned alongside items for client-side filtering UI. Sort by relevance, price, or position.
| Param | Type | Description |
|---|---|---|
| page | integer | Page number. |
| sort | string | Sort attribute. |
| queryrequired | string | Search keyword. |
| page_size | integer | Number of items per page. |
| sort_direction | string | Sort direction. |
{
"type": "object",
"fields": {
"items": "array of product summaries with name, sku, url, images, priceRange, and options",
"facets": "array of filter facets with title, type, attribute, and buckets",
"page_size": "integer items per page",
"total_count": "integer total number of matching products",
"total_pages": "integer total number of pages",
"current_page": "integer current page number"
},
"sample": {
"data": {
"items": [
{
"sku": "PBS184",
"url": "https://www.hanes.com/hanes-unisex-plain-black-socks-pack-6-pairs-crew-socks-pbs184.html",
"name": "Hanes Unisex Plain Black Socks Pack, 6 Pairs, Crew Socks",
"images": [
{
"url": "https://cdn.hanes.com/catalog/product/H/N/HNS_PBS184_XBK_ALD1.jpg",
"label": "Y29uZmlndXJhYmxlLzI4MC80Mw==",
"roles": [
"image",
"small_image",
"thumbnail"
]
}
],
"urlKey": "hanes-unisex-plain-black-socks-pack-6-pairs-crew-socks-pbs184",
"options": [
{
"id": "color",
"title": "Color",
"values": [
{
"id": "Y29uZmlndXJhYmxlLzI4MC80Mw==",
"title": "Black",
"inStock": true
}
]
},
{
"id": "size",
"title": "Size",
"values": [
{
"id": "Y29uZmlndXJhYmxlLzU0Ny8zMjA1",
"title": "S",
"inStock": true
}
]
}
],
"priceRange": {
"maximum": {
"final": {
"amount": {
"value": 18,
"currency": "USD"
}
},
"regular": {
"amount": {
"value": 18,
"currency": "USD"
}
}
},
"minimum": {
"final": {
"amount": {
"value": 18,
"currency": "USD"
}
},
"regular": {
"amount": {
"value": 18,
"currency": "USD"
}
}
}
},
"product_id": 1250397
}
],
"facets": [
{
"type": "PINNED",
"title": "Gender",
"buckets": [
{
"id": "Men",
"count": 329,
"title": "Men",
"__typename": "ScalarBucket"
}
],
"attribute": "gender"
}
],
"page_size": 24,
"total_count": 550,
"total_pages": 23,
"current_page": 1
},
"status": "success"
}
}About the Hanes API
Product Search and Category Browsing
The search_products endpoint accepts a required query string and optional parameters for page, page_size, sort (relevance, price, position), and sort_direction (ASC or DESC). Results include an items array of product objects, a facets array for client-side filter rendering, page_info with current_page, total_pages, and page_size, and a total_count integer. The get_category_products endpoint works the same way but routes by category_path (e.g. socks/socks/crew or sale) instead of a keyword.
Focused Category Endpoints
get_men_products and get_women_products each accept an optional subcategory path — for example men/underwear or women/bras — and return the same paginated shape as the general category endpoint. get_sale_products takes only a page parameter and returns currently discounted items with the same items, facets, and page_info structure. All listing endpoints include priceRange and options fields inside each product's productView object.
Per-SKU Detail and Availability
get_product_details takes a sku string (e.g. PBS184) and returns two top-level objects: basic_details (name, description, attributes, images, options, priceRange) and availability_and_variants (overall stock_status, configurable_options such as size and color, and a variants array where each entry carries its own sku, stock_status, and pricing). get_product_availability accepts the same input and returns the same response shape, making it useful as a dedicated stock-check call without re-fetching full descriptive content.
The Hanes API is a managed, monitored endpoint for hanes.com — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when hanes.com changes and a check fails, the API is automatically queued for repair and re-verified. It is built to keep working as the site underneath it changes.
This isn't an official hanes.com API — it's an independent, maintained REST wrapper over public data. Where the source has no official API (or only a limited one), Parse gives you a stable contract over a source that never promised one, and keeps it current. Need a new endpoint or field? You can revise it yourself in plain English and the agent rebuilds it against the live site in minutes — contributing the change back to the shared API is free.
Will this API break when the source site changes?+
Is this an official API from the source site?+
Can I fix or extend this API myself if I need a new endpoint or field?+
What happens if I call an endpoint that has an issue?+
- Building a price-tracking tool that monitors priceRange changes across SKUs over time using get_product_details
- Aggregating sale inventory by paginating through get_sale_products and extracting per-variant stock_status
- Generating a size/color availability matrix for a product by parsing the variants array from get_product_availability
- Populating a product comparison page using name, attributes, images, and priceRange from get_product_details
- Indexing the full men's or women's catalog by iterating pages of get_men_products or get_women_products with subcategory paths
- Surfacing facet buckets from search_products to drive filter UI in a custom storefront or affiliate site
- Alerting users when a specific SKU moves back in stock by polling get_product_availability for stock_status changes
| Tier | Price | Credits/month | Rate limit |
|---|---|---|---|
| Free | $0/mo | 100 | 5 req/min |
| Hobby | $30/mo | 1,000 | 20 req/min |
| Developer | $100/mo | 5,000 | 100 req/min |
One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.