country_codestringआवश्यक
ISO 2-letter country code, case-insensitive (e.g., 'tr', 'us', 'gb')
https://api.sandbase.ai/v1/api/accuweather/list-citiesList all provinces or major administrative divisions within a country by its ISO 2-letter code. Searches across regional browse pages to find the country.
आपका आउटपुट यहाँ दिखाई देगा
इनपुट पूरा करें, फिर Run पर क्लिक करें।
Returns the provinces or major administrative divisions of a country on AccuWeather. You send an ISO 2-letter country code in country_code, and each result has a name, a type, and an AccuWeather browse-page URL.
curl -X POST "https://api.sandbase.ai/v1/api/accuweather/list-cities" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"country_code": "US"}'
The result is returned in outputs[0].data.
| Name | Type | Required | Description |
|---|---|---|---|
country_code | string | Yes | ISO 2-letter country code, case-insensitive (e.g., 'tr', 'us', 'gb') |
Real response for the request above, trimmed: lists keep their first item and long strings are cut.
{
"data": {
"items": [
{
"name": "Alabama",
"type": "Province/City",
"url": "https://www.accuweather.com/en/browse-locations/eur/us/al"
}
]
},
"status": "success"
}
| Field | Meaning |
|---|---|
data.items[] | One province or major administrative division in the country. |
data.items[].name | Name of the division, for example Alabama. |
data.items[].type | Kind of division. The sample shows Province/City for US states. |
data.items[].url | AccuWeather browse-locations page for the division. The path ends with a short division code such as al or ak. |
status | Result of the call. The sample shows success. |
country_code is case-insensitive, so US and us give the same request.url values include the country code and a short division code in the path, for example /us/al.country_code.$0.01 per successful call. Failed calls are not charged. It is included in the daily free quota of each organization.
बिल्डिंग शुरू करें
एकीकृत authentication और usage tracking के साथ Platform API endpoint.
curl -X POST "https://api.sandbase.ai/v1/api/accuweather/list-cities" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"country_code": "US"
}'अपने SandBase API key को अपने सर्वर environment में सेट करें। Requests Bearer authentication का उपयोग करती हैं।
export SANDBASE_API_KEY="YOUR_API_KEY"अपना key सर्वर पर रखें। इसे browser code में expose न करें।
country_codestringआवश्यकISO 2-letter country code, case-insensitive (e.g., 'tr', 'us', 'gb')
इस API के लिए सेव किया गया example response; इसे देखते समय कोई live request नहीं की जाती।
कोई सेव response प्रकाशित नहीं किया गया है। इसका response देखने के लिए Playground में API चलाएँ।
और जानें
| API | कीमत | प्रतिक्रिया |
|---|---|---|
AccuWeather List Citiesयह API AccuWeather | $0.01 प्रति कॉल | असिंक्रोनस JSON |
AccuWeather | $0.01 प्रति कॉल | असिंक्रोनस JSON |
AccuWeather | $0.05 प्रति कॉल | असिंक्रोनस JSON |
प्रश्न
https://api.sandbase.ai/v1/api/accuweather/list-cities पर Authorization header (Bearer) में अपनी SandBase API key और parameters को JSON body के रूप में भेजें। आप इस पेज के Playground में बिना code लिखे भी इसे आज़मा सकते हैं।
$0.01 प्रति call, आपकी SandBase balance से बिल किया जाएगा। आपसे केवल आपके किए गए calls के लिए शुल्क लिया जाता है; कोई subscription नहीं है।
आवश्यक: country_code (string)। Parameters table और इस पेज का Playground हर field सूचीबद्ध करते हैं।
एक JSON result। यह endpoint asynchronously चलता है, इसलिए response आपको बताता है कि तैयार result कैसे प्राप्त करना है। इस पेज का README एक sample response शामिल करता है।
नहीं। AccuWeather List Cities SandBase के माध्यम से चलता है, इसलिए एक SandBase API key इस endpoint और catalog के हर अन्य API और model को कवर करती है। आपको अलग से AccuWeather API access के लिए आवेदन करने की आवश्यकता नहीं है।