{"uid":"cap_XDowWtG-PO8buYBGjis-3","slug":"grid-distance-calculator-b5e1bfc0","name":"Grid Distance Calculator","description":"Grid distance calculator: Calculate Manhattan, diagonal, and Euclidean distance on a grid.","url":"https://market.datapackvibe.com/x402/grid-distance-calculator?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"x1":{"type":"number","default":1},"x2":{"type":"number","default":8},"y1":{"type":"number","default":2},"y2":{"type":"number","default":10}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.01","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","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.01/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_kxaesvvXo1TtE_tNsQ4q0","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Calculates Manhattan, diagonal (Chebyshev), and Euclidean distances between two points on a 2D grid given their coordinates.","exampleAgentPrompt":"What are the Manhattan, diagonal, and Euclidean distances between grid point (1, 2) and grid point (8, 10)?","exampleUseCases":[{"title":"Pathfinding cost estimation in a game","prompt":"I'm building a tile-based RPG — what are all three grid distances between cell (3, 5) and cell (12, 18) so I can compare pathfinding costs?"},{"title":"Tower defense range check","prompt":"In my tower defense game, can you tell me the Manhattan, diagonal, and Euclidean distances between coordinates (0, 0) and (6, 4) to check if an enemy is in tower range?"},{"title":"Board game move validation","prompt":"On a chess-style grid, how far is the piece at position (2, 7) from position (5, 3) — give me Manhattan, diagonal, and straight-line distances."}],"resultDescription":"Returns three numeric distance values for the two input grid coordinates: Manhattan distance (sum of absolute differences of coordinates), Euclidean distance (straight-line distance), and diagonal/Chebyshev distance (max of absolute differences), useful for game logic, pathfinding, and spatial reasoning.","failureModes":["Missing required coordinates — returns error if x1, x2, y1, or y2 are absent","Non-numeric coordinate values cause validation failure","Payment not received or insufficient USDC results in 402 rejection"],"whenToPreferThis":"Choose this endpoint when you need all three common grid distance metrics (Manhattan, Euclidean, and Chebyshev/diagonal) computed in a single call, especially in game development, tile-map pathfinding, or board-game AI contexts where comparing movement costs across different movement rules is essential.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-03T00:48:08.124Z","isFirstParty":false,"canonicalSlug":"grid-distance-calculator-b5e1bfc0"}