Stress‑tested AliExpress API for AI agents: 200 requests, 28 upstream errors, 0 client failures

Stress‑tested AliExpress API for AI agents: 200 requests, 28 upstream errors, 0 client failures

posted 1 min read

We recently built an official AliExpress affiliate integration for AgentShare — a price API designed for AI agents, not humans.

Most "shopping APIs" just scrape HTML. That’s fragile. Agents need reliability, not workarounds.

What we built:

  • OAuth 2.0 with auto‑refresh (no manual token renewal)
  • HMAC‑SHA256 request signing (passed 97 AliExpress test cases)
  • Automatic retry logic with exponential backoff
  • Fallback crawler when the official API is down

What we tested:

  • 200 consecutive calls to /affiliate/product-detail
  • 5‑second delay (respect IOP rate limits)
  • Real AliExpress product IDs

The numbers:

  • Upstream returned 28 intermittent 502 / timeout errors
  • Every retry succeeded (2‑8s backoff)
  • Client‑observed success rate: 100%
  • p95 latency: 985 ms
  • max latency: 1989 ms (due to retry)

Why it matters for AI agents:

  • freshness_status and data_age_seconds → agent decides “this price is too old, don’t bid”
  • Structured JSON, no banners or affiliate noise
  • MCP server available – plug directly into Claude Desktop / Cursor
    {
      "mcpServers": {
        "agentshare": {
          "command": "npx",
          "args": ["-y", "mcp-remote", "https://agentshare.dev/mcp", "--header", "X-API-Key: YOUR_KEY"]
        }
      }
    }
    

Repository (public, AI‑ready):
https://github.com/anhmtk/agentshare-mcp
→ Contains AGENTS.md, openapi.json, mcp-config.json, and the stdio MCP server.

Free tier: 100 requests/month, no credit card.
API docs & key: https://agentshare.dev

*This post originally appeared on dev.to / GitHub. Shared here because CoderLegion readers care about the actual engineering behind “100% success rate”. Happy to answer any technical questions in the comments.

More Posts

I Wrote a Script to Fix Audible's Unreadable PDF Filenames

snapsynapseverified - Apr 20

Merancang Backend Bisnis ISP: API Pelanggan, Paket Internet, Invoice, dan Tiket Support

Masbadar - Mar 13

AI Agents Don't Have Identities. That's Everyone's Problem.

Tom Smithverified - Mar 13

Dashboard Operasional Armada Rental Mobil dengan Python + FastAPI

Masbadar - Mar 12

Agent Action Guard

praneeth - Mar 31
chevron_left

Related Jobs

View all jobs →

Commenters (This Week)

2 comments
1 comment
1 comment

Contribute meaningful comments to climb the leaderboard and earn badges!