Trawl

Shops quick start

Trawl for Shops checks the products of your catalog that carry a crossed-out price against the brand's own site: a crossed-out price above the brand's price, and a brand page that tells the buyer more than yours. This guide gets you from nothing to your first answers: the summary, the matches of a sale, and the fixes. Then read Read your data each day and keep the Shops reference at hand.

Every Shops route is a read: nothing here changes your data. There is nothing to set up on your side: Trawl reads your catalog each morning, and your data is waiting when you call.

1. Make a read key

In the web app, open Developers → API Keys and click Create:

  • Name: anything that tells you where the key lives (shops-sync).
  • Expiry: required, at most 2 years ahead. Pick the shortest that fits; when it expires, make a new key and revoke the old one.
  • Access: Shops data, read only. It is preselected in a Shops organization. It gives the scope trawl:shops:read and nothing else: the key can read Shops and cannot run or change anything.

Copy the key: it starts with trawl_ and is shown once.

  • Full access works too, with no scraps picked.
  • Read only does not: it has no Shops scope, and gets 403.
  • A key restricted to some scraps gets 403: Shops data is not a scrap.

The key's owner must be a member of your organization. See API keys for the rest.

Your team. Each person signs up on trawl.me, then tells us the email they used: we add them to your organization, and they accept from the invitation mail. Each one then makes their own key. The limit of 120 requests a minute counts per key owner: all the keys one person makes share it, so each person who calls the API makes their own key.

2. Send it as a header

Every call carries the key in the Authorization header: Authorization: Bearer <YOUR_API_KEY>. In the calls below, replace <YOUR_API_KEY> with your key. Each call is shown in curl, JavaScript and Python.

Every JSON answer has the shape { "type": "success", "message": "…", "data": … }. Dates are UTC (ISO 8601). The hours in these guides are Paris time.

3. Your first answer: the summary

GET /api/shops/summary gives the counts of the latest check: how many of your variants were compared with their brand, and how many are priced too high. It takes no parameter.

The answer: Example values; the fields are the API's.

  • checkedAt: when the latest check started writing.
  • byStatus: your variants by price verdict (too_high, ok, and the ones with no verdict).
  • notCovered: the brands on sale that Trawl does not read yet, { vendor, variants } per brand.
  • kpi: the same counts as the dashboard of the web app (see Summary counts).
curl "https://api.trawl.me/api/shops/summary" \
  -H "Authorization: Bearer <YOUR_API_KEY>"
Response
{
  "type": "success",
  "message": "shop summary",
  "data": {
    "variants": 3,
    "products": 2,
    "byStatus": { "not_found": 1, "ok": 1, "too_high": 1 },
    "matched": 2,
    "tooHighGap": 30,
    "notCovered": [],
    "byVendor": [
      { "vendor": "Northfold", "too_high": 1, "ok": 1, "not_found": 1, "name_only": 0, "not_comparable": 0 }
    ],
    "checkedAt": "2026-11-21T05:42:00.000Z",
    "kpi": { "brands": { "…": "…" }, "products": { "…": "…" }, "price": { "…": "…" }, "listing": { "…": "…" } }
  }
}

4. The matches of a sale

GET /api/shops/matches gives one row per variant of yours: your price, the brand's price, the price verdict and how sure the match is. Every filter is optional; sale= keeps one sale. The sale handle is the handle of a sale in GET /api/shops/sales (Sales).

The answer: Trimmed.

Each row is one of your variants: brand.price and brand.full are the brand's prices, status the price verdict, confidence how sure the match is. productId is your product's id, and id the match's. total is how many rows the filter holds: read page=0, page=1… and stop when (page + 1) * perPage >= total (Paging). For a spreadsheet, the same call with format=csv (one row per variant) gives the whole sale at once. Field by field, see the Shops reference.

curl "https://api.trawl.me/api/shops/matches?sale=northfold-winter&perPage=200" \
  -H "Authorization: Bearer <YOUR_API_KEY>"
Response
{
  "type": "success",
  "message": "shop match list",
  "data": [
    {
      "id": "6b016da5d4c1b956208bcc84", "productId": "8841203", "vendor": "Northfold", "status": "too_high", "confidence": "high",
      "catalog": { "title": "Merino crew sweater", "variantTitle": "M", "price": 69, "crossed": 150, "…": "…" },
      "brand": { "name": "Northfold", "price": 120, "full": 120, "url": "https://northfold.example/crew", "…": "…" },
      "gap": 30, "…": "…"
    }
  ],
  "total": 48
}

5. The fixes

GET /api/shops/fixes gives the text to add to your own product page, copied from the brand's page: one entry per product page of yours, with the lines to add, the most important first. Every filter is optional; with none, you get every entry (Fixes).

The answer: Trimmed.

line is the text to paste on your page, source the brand's own words. To read everything each day, see Read your data each day.

curl "https://api.trawl.me/api/shops/fixes" \
  -H "Authorization: Bearer <YOUR_API_KEY>"
Response
{
  "type": "success",
  "message": "shop fixes",
  "data": [
    {
      "productId": "8841203", "url": "https://your-shop.example/products/merino-crew-sweater", "brandUrl": "https://northfold.example/crew", "confidence": "medium",
      "changes": [
        { "kind": "missing_info", "section": "Care", "line": "Hand wash cold, dry flat.", "source": "Hand wash cold. Dry flat.", "current": null, "why": "Care is only on the brand page", "priority": "high" },
        { "kind": "missing_photo", "url": "https://northfold.example/crew-back.jpg", "priority": "low" }
      ],
      "…": "…"
    }
  ],
  "total": 1
}

6. One row, before a sale

GET /api/shops/lookup says which brand product one of your rows is, even a row not in your catalog yet. vendor is required, with sku, barcode or title; variant is optional.

The answer: Trimmed.

The answer gives the brand product, matchedBy and confidence, and no price verdict (see Look up one row). For a whole sale, POST the rows in one call, up to 500 rows of 20 brands (see Look up many rows). Lookups have their own limit: 3 a minute per key owner, GET and POST together.

curl "https://api.trawl.me/api/shops/lookup?vendor=Northfold&sku=NF-CREW-M&title=Crew%20Sweater&variant=M" \
  -H "Authorization: Bearer <YOUR_API_KEY>"
Response
{
  "type": "success",
  "message": "shops lookup",
  "data": {
    "vendor": "Northfold", "brand": { "name": "Northfold", "read": true, "reason": null },
    "matchedBy": "sku", "confidence": "high", "reason": null, "doubts": [],
    "product": { "title": "Crew Sweater", "variantTitle": "M", "sku": "NF-CREW-M", "price": 120, "url": "https://northfold.example/products/crew-sweater", "…": "…" }
  }
}

When it goes wrong

An error answer has the shape { "type": "error", "message": "…", "code": 403, "description": "…" }. description says what is wrong.

Code Means What to do
401 No key, or a key that is wrong, expired or revoked Check the header. Make a new key if this one expired
403 The key has no trawl:shops:read scope, or is restricted to some scraps Make a key with the access Shops data, read only
404 Your organization has no Shops Write to us: Shops is set up per organization
422 A query value outside the list (perPage above 200, a status or confidence not in the list, a since that is not a date, a lookup with no vendor or with a parameter it does not take, more than 500 rows or 20 brands in one lookup) Fix the value: description names the allowed ones
413 A lookup body over 400 kB Send fewer rows a call
429 More than 120 requests a minute, more than 5 CSV exports a minute, or more than 3 lookups a minute, for the key's owner Wait for the RateLimit-Reset header (seconds), then go on

The answers, as the API sends them:

You can make 120 requests a minute per key owner, and the owner's session in the web app shares them. Answers show this limit in RateLimit-Limit (120), RateLimit-Remaining and RateLimit-Reset. A CSV export also has its own limit, 5 a minute, and its answers show that one (RateLimit-Limit: 5); so does a lookup, 3 a minute (RateLimit-Limit: 3). A 401 carries no rate headers: the key is refused first. A full read of a large catalog meets the limit: pace your calls, or wait and go on.

Next step → Read your data each day

Response
No header
401 {"type":"error","message":"Unauthorized","code":401,"status":401,"errorCode":"SERVER_ERROR","description":"Missing or invalid Authorization header"}

An expired or revoked key
401 {"type":"error","message":"Unauthorized","code":401,"status":401,"errorCode":"SERVER_ERROR","description":"Invalid or expired API key"}

A "Read only" key
403 {"type":"error","message":"Forbidden","code":403,"status":403,"errorCode":"SERVER_ERROR","description":"API key missing required scope(s): trawl:shops:read"}
WWW-Authenticate: Bearer error="insufficient_scope", scope="trawl:shops:read"

An organization without Shops
404 {"type":"error","message":"Not Found","code":404,"status":404,"errorCode":"SERVER_ERROR","description":"Shops is not enabled for this organization"}

GET /api/shops/matches?perPage=500
422 {"type":"error","message":"Unprocessable Entity","code":422,"status":422,"errorCode":"SERVER_ERROR","description":"perPage must be between 1 and 200"}

More than 120 requests in a minute
429 {"message":"Too many requests, please try again later."}
RateLimit-Limit: 120  RateLimit-Remaining: 0  RateLimit-Reset: 30

More than 5 CSV exports in a minute
429 {"message":"Too many exports, please try again in a minute."}
RateLimit-Limit: 5  RateLimit-Remaining: 0  RateLimit-Reset: 30

More than 3 lookups in a minute
429 {"message":"Too many lookups, please try again in a minute."}
RateLimit-Limit: 3  RateLimit-Remaining: 0  RateLimit-Reset: 30