Amadeus自助酒店搜索API部分城市请求报500服务器内部错误
I’ve run into similar quirks with Amadeus APIs before, so let’s walk through why your request works for PAR but throws 500s for NYC/SFO, and how to fix it:
Top Causes & Troubleshooting Steps
Double-check city code validity (and regional quirks)
While NYC and SFO are standard IATA codes, Amadeus sometimes has edge cases for certain regions. Make sure you’re using the exact codes recognized by their system—you can cross-verify this in the Amadeus API Explorer’s built-in reference docs.Simplify your request to isolate the issue
Your full request has several parameters that might be conflicting for US cities. Start with the most basic call first:https://test.api.amadeus.com/v1/shopping/hotel-offers?cityCode=NYCIf this works, add parameters one by one (like
radius,bestRateOnly) to see which one triggers the 500. For example, some regions have stricter limits onradiusvalues or don’t support certainsortoptions that PAR allows.Check your API key’s permissions and rate limits
It’s possible your API credentials don’t have access to US hotel data, or you’ve hit a region-specific rate limit. Head to your Amadeus Developer Portal settings to confirm your quota and allowed endpoints.Test environment data limitations
Amadeus’s test sandbox often has limited data coverage—European hubs like PAR are usually well-represented, but US cities might not be fully supported in the test environment. You can reach out to Amadeus support to confirm if NYC/SFO are included in the test dataset, or try the production API (if you have access) to see if the issue persists.Validate URL encoding
Even if your URL looks correct, unencoded characters can sometimes cause server-side errors. Use a simple URL encoder tool to make sure all parameters are properly formatted before sending the request.
If All Else Fails
Grab the full error response body (if the 500 includes any error details) and send it to Amadeus support. Their team can pull server logs to get to the root of the issue—this is usually the fastest way to resolve unexpected 500s with their APIs.
内容的提问来源于stack exchange,提问作者Yashveer Rana

