API: checking…

API Documentation

This documents the real API that powers this website (FastAPI backend). The same endpoints are used by the tool pages.

Status: the API exists and works when the backend is running. Public API access with keys is not yet available — there is no signup, no API key issuance and no billing yet. The reference below is published for transparency and for developers running their own copy of the backend. Base URL when self-hosted: http://localhost:8000 (production base URL: https://tools.sehazinfo.shop).

General rules

GET /api/health

Check the service is up.

GET /api/health
Response 200:
{"ok": true}

GET /api/platforms

Capability matrix: which platforms are fully supported, partially supported, or unsupported and why.

GET /api/platforms
Response 200:
{"platforms": [{"platform": "shopify", "support": "full",
  "product": true, "collection": true, "store": true,
  "images": true, "variants": true,
  "note": "Public products.json / products/{handle}.js endpoints."},
 {"platform": "amazon", "support": "unsupported-auth-required",
  "product": false, "collection": false, "store": false,
  "images": false, "variants": false,
  "reason": "Amazon requires the Product Advertising API ..."}]}

GET /api/tools

The 20 Phase-1 tools.

GET /api/tools
Response 200:
{"tools": [{"slug": "shopify-product-exporter",
  "title": "Shopify Product Exporter",
  "url": "/shopify-product-exporter",
  "category": "Product Exporters"}]}

POST /api/extract

Extract products or images from a URL. mode must be single, collection, store or images. limit defaults to 50, maximum 500.

POST /api/extract
{"url": "https://allbirds.com", "mode": "store", "limit": 2}

Response 200:
{"job_id": "7f3bf889e79241d4", "platform": "shopify", "mode": "store",
 "total": 2, "products": [...], "images": [...],
 "warnings": [], "partial": false}

Each product has id, handle, title, description, html_description, vendor/brand, type, category, tags, collections, url, currency, price, compare_at_price, variants, images, seo_title, seo_description, source_platform, source_store, extracted_at. Fields that are not publicly available are omitted, never invented. partial: true means only part of the request could be fulfilled — read warnings.

POST /api/export

Turn extracted products into a downloadable file. format must be shopify_csv, woocommerce_csv, universal_csv, xlsx or json.

POST /api/export
{"products": [...], "format": "shopify_csv"}

Response 200:
{"file_id": "a1b2c3d4e5f6a7b8", "filename": "products-shopify_csv.csv",
 "download_url": "/api/files/a1b2c3d4e5f6a7b8", "rows": 12}

GET /api/files/{file_id}

Download a generated file. Returns 404 if the file has expired (files expire after 1 hour).

GET /api/files/a1b2c3d4e5f6a7b8
Response 200: the file, as a download

POST /api/images

Extract images, plus logo, favicon and banner candidates, from a page.

POST /api/images
{"url": "https://example.com", "min_width": 200, "min_height": 200, "format": "png"}

Response 200:
{"images": [{"url": "...", "alt": "...", "width": 800, "height": 600,
  "format": "png", "category": "product"}], "total": 14,
 "logos": [...], "favicons": [...], "banners": [...]}

POST /api/images/zip

Download up to 200 images as one ZIP file.

POST /api/images/zip
{"images": [{"url": "https://example.com/a.jpg"}, {"url": "https://example.com/b.jpg"}]}

Response 200:
{"file_id": "...", "filename": "images.zip",
 "download_url": "/api/files/..."}

POST /api/csv/validate, /repair, /merge, /split

Multipart file uploads (max 10 MB per file; 20 MB combined for merge). /split takes a form field max_rows (default 1000).

POST /api/csv/validate        (form field: file)
Response 200: {"valid": true, "rows": 1, "errors": []}

POST /api/csv/repair          (form field: file)
Response 200: {"file_id": "...", "filename": "repaired.csv",
  "download_url": "/api/files/..."}

POST /api/csv/merge           (form fields: files — at least 2)
Response 200: {"file_id": "...", "filename": "merged.csv",
  "download_url": "/api/files/..."}

POST /api/csv/split           (form fields: file, max_rows)
Response 200: {"parts": [{"file_id": "...", "filename": "split-part-1.csv",
  "download_url": "/api/files/...", "part": 1}], "total_parts": 2}

Errors

Full interactive docs are served by the backend itself at /docs when it is running.