# GOAT Products API

Full GOAT product detail — every size, its asking price and availability — one row per product, from a search, a brand page or a product URL.

**Pricing:** $1 / 1k products

**Endpoint:** `POST /v1/data/goat/products/run`

**Auth:** `Authorization: Bearer mk_live_...`

## Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `listing_url` | string | No | A GOAT listing page URL — a brand page (https://www.goat.com/brand/salomon) or a search results page (https://www.goat.com/search?query=nike). Brand pages return the full catalog; searches are relevance-ranked. Any GOAT filter in the URL is honoured. |
| `query` | string | No | A keyword to search GOAT for, e.g. 'jordan 1 chicago'. We build the search URL for you — no need to paste one. Relevance-ranked, so it drops roughly 30-40% of a brand; use a brand page as the Listing URL for a full catalog. |
| `urls` | array | No | One or more GOAT product URLs, e.g. https://www.goat.com/sneakers/air-jordan-1-high-1985-4280. One per line. |
| `maxResults` | integer | No | Number of products to return from a search or brand page. Use 0 for all. Ignored when you pass product URLs. |
| `country_code` | string | No | Shopping region. Shapes which sellers and sizes are offered and their asking prices. Regions without their own market get GOAT's global pricing (the same listings as the default). Prices are quoted in USD regardless. |

## Example

```bash
curl -X POST https://api.mindcase.co/v1/data/goat/products/run \
  -H "Authorization: Bearer mk_live_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"params":{}}'
```

```python
import requests

resp = requests.post(
    "https://api.mindcase.co/v1/data/goat/products/run",
    headers={"Authorization": "Bearer mk_live_YOUR_API_KEY"},
    json={"params": {}},
)
data = resp.json()
```

## Get the results

`run` is async and returns a `job_id`. Poll until `status` is `completed`, then read the rows:

```bash
# 1) check status
curl https://api.mindcase.co/v1/jobs/JOB_ID \
  -H "Authorization: Bearer mk_live_YOUR_API_KEY"

# 2) when status == completed, fetch the rows
curl https://api.mindcase.co/v1/jobs/JOB_ID/results \
  -H "Authorization: Bearer mk_live_YOUR_API_KEY"
```

Full API reference (auth, jobs, balance, endpoints): https://mindcase.co/skills.md

## Response columns

| Field | Display name | Type |
|-------|--------------|------|
| `productId` | Product ID | number |
| `productName` | Product Name | text |
| `sku` | SKU | text |
| `productUrl` | Product URL | url |
| `brand` | Brand | text |
| `colorway` | Colorway | text |
| `color` | Color | text |
| `category` | Category | text |
| `subcategory` | Subcategory | text |
| `categoryLevel3` | Category Level 3 | text |
| `categoryLevel4` | Category Level 4 | text |
| `activities` | Activities | array |
| `gender` | Gender | text |
| `releaseDate` | Release Date | date |
| `season` | Season | text |
| `story` | Story | text |
| `styleTags` | Style Tags | array |
| `detailTags` | Detail Tags | array |
| `merchandisingTags` | Merchandising Tags | array |
| `specialType` | Special Type | text |
| `isResellable` | Is Resellable | boolean |
| `directShipping` | Direct Shipping | boolean |
| `maxOffer` | Max Offer | currency |
| `sizeType` | Size Type | text |
| `sizeUnit` | Size Unit | text |
| `retailPrice` | Retail Price | currency |
| `images` | Images | array |
| `attributes` | Attributes | object_array |
| `listings` | Listings | object_array |
