{"uid":"cap_AKZmXRZMXGGWmABw8NG4N","slug":"tiresapi-com-a6149a3f","name":"tiresapi.com SQL Sandbox Query","description":"SQL sandbox over guarded dbo.v_* views (SELECT-only, capped 500 rows, 90s timeout). Flat $0.020 per call. There is no dbo.v_inventory_history — history rows are dbo.v_inventory_by_day or GET /api/v1/corpus/inventory/history. Use only when no curated answer/corpus tool fits the question.","url":"https://tiresapi.com/api/v1/query","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"sql":{"type":"string","maxLength":4000,"minLength":10,"description":"Single SELECT statement; must reference at least one v_* sandbox view."},"reason":{"type":"string","maxLength":1000,"minLength":10,"description":"Why you're running this query (logged for audit)."}}},"responseSchema":{"type":"json","example":{"rows":[{"tier":"Economy","brand":"ACCELERA"},{"tier":"Economy","brand":"ACHILLES"},{"tier":"Economy","brand":"ADVANCE"}],"count":3,"row_cap":500,"duration_ms":5,"executed_sql":"SELECT TOP 3 brand, tier FROM dbo.v_brand_tiers ORDER BY brand\nOPTION (MAXDOP 2, RECOMPILE)"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.02","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"settled","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.02/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_0LZ8DNqiHqgNXm74OMmi4","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.02","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Executes SELECT-only SQL queries against guarded dbo.v_* views of tire inventory and pricing data, returning up to 500 rows per call.","exampleAgentPrompt":"Can you query the tire inventory database with a custom SQL statement — something like SELECT tire_size, brand, price FROM dbo.v_inventory_by_day WHERE state = 'TX' AND tire_size = '225/65R17' ORDER BY price ASC — and return the top 50 cheapest options?","exampleUseCases":null,"resultDescription":"A result set of up to 500 rows from the queried dbo.v_* view(s), returned as structured data matching the columns selected. Execution is capped at 90 seconds. Empty result sets are auto-credited.","failureModes":["Query references a non-existent view (e.g. dbo.v_inventory_history) — returns error; use dbo.v_inventory_by_day instead","Query exceeds 500-row cap — results are truncated","Query exceeds 90-second timeout — returns timeout error","Non-SELECT statement attempted — blocked by sandbox guardrails","Invalid SQL syntax — returns parse error","Payment failure — call not executed"],"whenToPreferThis":"Use this endpoint when no curated answer or corpus tool covers the specific question — i.e. when you need a custom SQL query with complex filters, joins across views, or aggregations not supported by the specialized endpoints. Prefer the curated endpoints (cheapest listing, stores near ZIP, inventory snapshot) for standard lookups since they are cheaper ($0.001 vs $0.020) and faster. Use this as the flexible fallback for ad-hoc or exploratory analysis.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T12:37:03.435Z","isFirstParty":false}