{"openapi":"3.1.0","info":{"title":"PedidosYa Latin America Restaurants and Menus (x402 & MCP)","version":"0.1.0","description":"PedidosYa restaurant listings, ratings, delivery fees, categories and menu prices across 15 Latin American markets, one row per entity.","x-guidance":"Structured real-time web intelligence APIs paid per delivered row in USDC via x402 on Base. All endpoints are synchronous at POST /s/<site>/v1/<endpoint> and also exposed over stateless MCP at POST /mcp. Supports x402 v2 'upto' (Permit2, charged strictly for delivered rows) and 'exact' (EIP-3009). Empty/0-row (404), invalid input (422), timeout (504), and upstream failures (502) are never charged.","contact":{"email":"ops@opendata.best"}},"servers":[{"url":"https://ai.opendata.best"}],"paths":{"/s/pedidosya-com/v1/search":{"post":{"operationId":"pedidosya_com_search","summary":"PedidosYa Latin America Restaurants and Menus: Restaurants by LATAM market, city, category or chain","description":"Restaurant listings and discovery directories across 15 Latin American countries. Unit price: $0.003000/row USDC (default quote 10 rows, max 20 rows). Unsettled / 0-row / error responses are never charged.","tags":["pedidosya-com","Food"],"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"dynamic","currency":"USD","amount":"0.030000"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"mode":{"type":"string","description":"Leave on Auto: the mode follows the field you fill (start URLs > restaurant URL / partner id / vendor slug > chain name > category slug > city slug). Pick a Discover mode to list cities, countries, categories or sitemap entries without any target.","default":"auto","enum":["auto","city","category","chain","discoverCities","discoverCountries","discoverCategories","discoverSitemap"]},"market":{"type":"string","description":"Country site to collect from. Choose the country matching your city or restaurant address. PedidosYa has 15 active Latin American markets; Colombia (co) and Mexico (mx) are retired on PedidosYa and are not offered.","default":"pe","enum":["ar","bo","cl","cr","do","ec","sv","gt","hn","ni","pa","py","pe","uy","ve"]},"citySlug":{"type":"string","description":"City as it appears in PedidosYa URLs, e.g. lima, santiago, buenos-aires, montevideo. Filled alone, the run lists that city's restaurants.","pattern":"^[A-Za-z0-9-]*$"},"categorySlug":{"type":"string","description":"Food category, e.g. pizza, sushi, hamburguesas. Lists restaurants of that category in the city above (or the market's main city)."},"chainName":{"type":"string","description":"Chain name, e.g. mcdonalds. Lists that chain's restaurants in the city above (or the market's main city)."},"includeMenuItems":{"type":"boolean","description":"Include menu products as separate menuItem rows. Off by default; each added row is billed and shares maxResults with its restaurant target.","default":false},"enrichMenus":{"type":"boolean","description":"Fetch menu rows after a city, category or chain listing for up to maxEnrich restaurants. Also enable includeMenuItems; added rows are billed and count toward the same maxResults limit.","default":false},"maxEnrich":{"type":"integer","description":"Maximum restaurants whose menus are fetched when enrichMenus and includeMenuItems are enabled. Use 0 to skip this extra collection.","default":5,"minimum":0,"maximum":50},"maxMenuItemsPerRestaurant":{"type":"integer","description":"Per-parent cap for menuItem rows. The current input target's maxResults budget still applies.","default":20,"minimum":0,"maximum":200},"maxPages":{"type":"integer","description":"Maximum listing pages to consider, starting at page. Allowed 1–50, default 1. Each page holds about 20 restaurants, so 1–50 pages cover up to about 1,000 listing rows; maxResults still caps the rows delivered.","default":1,"minimum":1,"maximum":50},"page":{"type":"integer","description":"First listing page to collect. Page numbering starts at 1.","default":1,"minimum":1,"maximum":200},"maxResults":{"type":"integer","description":"Maximum rows for each startUrls URL; other modes have one target. Default 70, with larger requests collected in parts of at most 70 rows. Restaurant and menu rows share this limit. Maximum cost per run also applies; Free-plan users are limited to 200 rows per run and 10 runs.","default":10,"minimum":1,"maximum":20}},"additionalProperties":false},"example":{"market":"pe","citySlug":"lima","maxResults":10}}}},"responses":{"200":{"description":"Synchronous data rows with x402 PAYMENT-RESPONSE receipt header.","headers":{"PAYMENT-RESPONSE":{"description":"Base64-encoded x402 v2 SettleResponse receipt.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Response_pedidosya_com"},"example":{"jobId":"job_pedidosy_example","status":"succeeded","done":true,"rowCount":1,"rowsBilled":1,"rowsDelivered":1,"rows":[{"rowType":"example_rowType","id":"example_001","itemType":"example_itemType","title":"example_title","market":"example_market","citySlug":"example_citySlug"}],"meta":{"site":"pedidosya-com","endpoint":"search","maxResults":10,"payment":{"scheme":"upto","network":"eip155:8453","quotedMicrousd":30000,"settledMicrousd":3000,"transaction":"0x0000000000000000000000000000000000000000000000000000000000000000"}}}}}},"402":{"description":"Payment required or invalid/declined payment authorization (never charged).","headers":{"PAYMENT-REQUIRED":{"description":"Base64-encoded x402 v2 PaymentRequired quote.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object"}}}},"404":{"description":"no_results: 0 rows matched the query; aborted before settlement (charged=false).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"payment_id_conflict: payment-identifier reused with different parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Invalid or missing request parameters (validated before /verify; charged=false).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit or payer cooldown exceeded (charged=false).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"502":{"description":"Upstream source failed or blocked (charged=false).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"settlement_pending or facilitator_unavailable; retry same payment to reconcile.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"504":{"description":"upstream_timeout: synchronous deadline reached and task cancelled (charged=false).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/s/pedidosya-com/v1/restaurants":{"post":{"operationId":"pedidosya_com_restaurants","summary":"PedidosYa Latin America Restaurants and Menus: One restaurant's profile and menu items","description":"Restaurant details and optional menu rows for a PedidosYa restaurant URL, partner ID or startUrls. Unit price: $0.003000/row USDC (default quote 10 rows, max 20 rows). Unsettled / 0-row / error responses are never charged.","tags":["pedidosya-com","Food"],"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"dynamic","currency":"USD","amount":"0.030000"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"mode":{"type":"string","description":"Leave on Auto: the mode follows the field you fill (start URLs > restaurant URL / partner id / vendor slug > chain name > category slug > city slug). Pick a Discover mode to list cities, countries, categories or sitemap entries without any target.","default":"restaurant","enum":["restaurant","startUrls"]},"market":{"type":"string","description":"Country site to collect from. Choose the country matching your city or restaurant address. PedidosYa has 15 active Latin American markets; Colombia (co) and Mexico (mx) are retired on PedidosYa and are not offered.","default":"pe","enum":["ar","bo","cl","cr","do","ec","sv","gt","hn","ni","pa","py","pe","uy","ve"]},"restaurantUrl":{"type":"string","description":"Full restaurant address, e.g. https://www.pedidosya.cl/restaurantes/santiago/subway-51946-menu","pattern":"^$|^https?://([A-Za-z0-9-]+\\.)*pedidosya(?:sv|ni)?\\.[A-Za-z.]+/.*"},"partnerId":{"type":"string","description":"Restaurant ID, such as 51946. Set the matching market; vendorCode is also accepted as an alias."},"vendorSlug":{"type":"string","description":"Restaurant address segment, e.g. subway-51946-menu; use together with City slug."},"citySlug":{"type":"string","description":"City as it appears in PedidosYa URLs, e.g. lima, santiago, buenos-aires, montevideo. Filled alone, the run lists that city's restaurants.","pattern":"^[A-Za-z0-9-]*$"},"startUrls":{"type":"array","items":{"type":"string"},"description":"PedidosYa city-list or restaurant addresses from a country site (pedidosya.com.ar, pedidosya.cl, ...). Each address is one target with its own maxResults."},"includeMenuItems":{"type":"boolean","description":"Include menu products as separate menuItem rows. Off by default; each added row is billed and shares maxResults with its restaurant target.","default":false},"maxMenuItemsPerRestaurant":{"type":"integer","description":"Per-parent cap for menuItem rows. The current input target's maxResults budget still applies.","default":20,"minimum":0,"maximum":200},"maxResults":{"type":"integer","description":"Maximum rows for each startUrls URL; other modes have one target. Default 70, with larger requests collected in parts of at most 70 rows. Restaurant and menu rows share this limit. Maximum cost per run also applies; Free-plan users are limited to 200 rows per run and 10 runs.","default":10,"minimum":1,"maximum":20}},"additionalProperties":false},"example":{"market":"cl","restaurantUrl":"https://www.pedidosya.cl/restaurantes/santiago/subway-51946-menu","includeMenuItems":true,"maxResults":10}}}},"responses":{"200":{"description":"Synchronous data rows with x402 PAYMENT-RESPONSE receipt header.","headers":{"PAYMENT-RESPONSE":{"description":"Base64-encoded x402 v2 SettleResponse receipt.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Response_pedidosya_com"},"example":{"jobId":"job_pedidosy_example","status":"succeeded","done":true,"rowCount":1,"rowsBilled":1,"rowsDelivered":1,"rows":[{"rowType":"example_rowType","id":"example_001","itemType":"example_itemType","title":"example_title","market":"example_market","citySlug":"example_citySlug"}],"meta":{"site":"pedidosya-com","endpoint":"restaurants","maxResults":10,"payment":{"scheme":"upto","network":"eip155:8453","quotedMicrousd":30000,"settledMicrousd":3000,"transaction":"0x0000000000000000000000000000000000000000000000000000000000000000"}}}}}},"402":{"description":"Payment required or invalid/declined payment authorization (never charged).","headers":{"PAYMENT-REQUIRED":{"description":"Base64-encoded x402 v2 PaymentRequired quote.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object"}}}},"404":{"description":"no_results: 0 rows matched the query; aborted before settlement (charged=false).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"payment_id_conflict: payment-identifier reused with different parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Invalid or missing request parameters (validated before /verify; charged=false).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit or payer cooldown exceeded (charged=false).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"502":{"description":"Upstream source failed or blocked (charged=false).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"settlement_pending or facilitator_unavailable; retry same payment to reconcile.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"504":{"description":"upstream_timeout: synchronous deadline reached and task cancelled (charged=false).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/s/pedidosya-com/v1/health":{"get":{"operationId":"pedidosya_com_health","summary":"PedidosYa Latin America Restaurants and Menus: health check","description":"Free readiness check (never returns 402 and never starts a collection).","tags":["pedidosya-com","health"],"responses":{"200":{"description":"Operational","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthStatus"}}}},"503":{"description":"Unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthStatus"}}}}}}}},"components":{"schemas":{"ErrorDetail":{"type":"object","required":["code","message","retryable"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"charged":{"type":"boolean"}}},"ErrorResponse":{"type":"object","required":["error"],"properties":{"error":{"$ref":"#/components/schemas/ErrorDetail"}}},"HealthStatus":{"type":"object","required":["ok","site","status","endpoints","rowsBilled"],"properties":{"ok":{"type":"boolean"},"site":{"type":"string"},"status":{"type":"string","enum":["operational","unavailable"]},"endpoints":{"type":"array","items":{"type":"string"}},"rowsBilled":{"type":"integer"}}},"Row_pedidosya_com":{"type":"object","properties":{"rowType":{"type":["string","null"],"title":"Row type"},"id":{"type":["string","null"],"title":"ID"},"itemType":{"type":["string","null"],"title":"Type"},"title":{"type":["string","null"],"title":"Title"},"market":{"type":["string","null"],"title":"Market"},"citySlug":{"type":["string","null"],"title":"City"},"categorySlug":{"type":["string","null"],"title":"Category"},"vendorCode":{"type":["string","null"],"title":"Code"},"url":{"type":["string","null"],"format":"uri","title":"URL"},"price":{"type":["string","null"],"title":"Price"},"rating":{"type":["string","null"],"title":"Rating"},"matchedChain":{"type":["string","null"],"title":"Chain"},"scrapedAt":{"type":["string","null"],"title":"Scraped"}},"additionalProperties":true},"Response_pedidosya_com":{"type":"object","properties":{"jobId":{"type":"string"},"status":{"type":"string"},"done":{"type":"boolean"},"rowCount":{"type":"integer","minimum":1},"rowsBilled":{"type":"integer","minimum":1},"rowsDelivered":{"type":"integer","minimum":1},"rows":{"type":"array","items":{"$ref":"#/components/schemas/Row_pedidosya_com"}},"meta":{"type":"object","properties":{"site":{"type":"string"},"endpoint":{"type":"string"},"maxResults":{"type":"integer"},"payment":{"type":"object","properties":{"scheme":{"type":"string"},"network":{"type":"string"},"quotedMicrousd":{"type":"integer"},"settledMicrousd":{"type":"integer"},"transaction":{"type":"string"},"payer":{"type":"string"}}}}}},"required":["jobId","status","done","rowCount","rows"]}}}}