Developers
Read-only REST at https://sunglassesguides.com/api/v1 and MCP at https://sunglassesguides.com/mcp, sharing one business layer. No sign-up for the anonymous trial (30/minute, 500/day per IP).
First result in two commands
1. Search by size (this example has real answers on the current data):
curl -sS -X POST https://sunglassesguides.com/api/v1/search -H 'Content-Type: application/json' \
-d '{"reference_text":"52-18-140","require":{"polarized":true},"limit":2}'2. Take a variant_id from result.matches (currently e.g. mauijim-668-02) and fetch it with the data_version you got:
curl -sS 'https://sunglassesguides.com/api/v1/variants/mauijim-668-02?expected_data_version=c1.o0'A no-result example that still explains itself:
curl -sS -X POST https://sunglassesguides.com/api/v1/search -H 'Content-Type: application/json' \
-d '{"reference":{"lens_width_mm":45,"bridge_width_mm":25,"temple_length_mm":120},"require":{"polarized":true}}'Which tool
| Situation | Tool / operationId | REST |
|---|---|---|
| Before relying on this service, to check whether a brand or task is in scope. | get_sunglasses_coverage | GET /api/v1/coverage |
| The user names a brand/model/code and you need the exact size and lens version. | resolve_sunglasses | POST /api/v1/resolve |
| The user has a size (e.g. 52-18-140) and wants alternatives. | find_sunglasses | POST /api/v1/search |
| The user wants to see how 2-4 specific frames differ (fit label, lens, sizes). | compare_sunglasses | POST /api/v1/compare |
| You have a variant_id and need all facts and sources. | get_sunglasses_variant | GET /api/v1/variants/{variant_id} |
| The user needs a purchase option for a specific variant. | get_sunglasses_offers | GET /api/v1/variants/{variant_id}/offers |
MCP
Endpoint https://sunglassesguides.com/mcp, Streamable HTTP, stateless, JSON responses. Protocol versions 2025-11-25, 2025-06-18, 2025-03-26, 2024-11-05. Tools return the same envelope as REST in structuredContent. Details: MCP docs, server card (experimental).
import { Client } from '@modelcontextprotocol/sdk/client/index.js';
import { StreamableHTTPClientTransport } from '@modelcontextprotocol/sdk/client/streamableHttp.js';
const client = new Client({ name: 'my-agent', version: '1.0.0' });
await client.connect(new StreamableHTTPClientTransport(new URL('https://sunglassesguides.com/mcp')));
const r = await client.callTool({ name: 'find_sunglasses', arguments: { reference_text: '52-18-140', require: { polarized: true } } });
console.log(r.structuredContent.result.status);Specifications and limits
- OpenAPI 3.0 (generated from the same schemas the server validates with)
- Envelope, status codes, pagination, data_version
- Authentication and quotas: 429 with
Retry-After; optionalAuthorization: Bearer sgk_live_... - Error codes, time fields and caching, scope and limitations
- Support status per tool: implemented, data coverage and external verification are reported separately in coverage. Action layer: not supported. A2A: not supported.