{ "status": "error", "message": "This feature is not available on your current plan.", "details": { "feature": "phoneDialCode", "currentTier": "community", "requiredTier": "starter", "upgradeUrl": "https://app.countrystatecity.in/pricing" }}
{ "status": "error", "message": "Country not found."}
{ "status": "error", "message": "No dial code available for this country."}
Phone
Get Dial Code by Country
Retrieve the international dial code for a single country by ISO2, ISO3, or numeric ID
GET
/
phone
/
{ciso}
curl -X GET 'https://api.countrystatecity.in/v1/phone/US' \ -H 'X-CSCAPI-KEY: YOUR_API_KEY'
curl -X GET 'https://api.countrystatecity.in/v1/phone/IND' \ -H 'X-CSCAPI-KEY: YOUR_API_KEY'
curl -X GET 'https://api.countrystatecity.in/v1/phone/233' \ -H 'X-CSCAPI-KEY: YOUR_API_KEY'
{ "status": "error", "message": "This feature is not available on your current plan.", "details": { "feature": "phoneDialCode", "currentTier": "community", "requiredTier": "starter", "upgradeUrl": "https://app.countrystatecity.in/pricing" }}
{ "status": "error", "message": "Country not found."}
{ "status": "error", "message": "No dial code available for this country."}
Get the dial code for one country. The path parameter accepts three forms — the same identifier flexibility as the rest of the geographic API:
ISO 3166-1 alpha-2 (e.g. US, IN)
ISO 3166-1 alpha-3 (e.g. USA, IND)
Numeric CSC country ID (e.g. 233)
Availability: Starter plan and above. Returns 403 on lower tiers.
Responses are cached server-side for 24 hours. Numeric IDs 1 and 001 resolve to the same cache slot; letter codes are case-insensitive.
Response
A single phone entry (object, not an array — unlike the list endpoint).
curl -X GET 'https://api.countrystatecity.in/v1/phone/US' \ -H 'X-CSCAPI-KEY: YOUR_API_KEY'
curl -X GET 'https://api.countrystatecity.in/v1/phone/IND' \ -H 'X-CSCAPI-KEY: YOUR_API_KEY'
curl -X GET 'https://api.countrystatecity.in/v1/phone/233' \ -H 'X-CSCAPI-KEY: YOUR_API_KEY'
{ "status": "error", "message": "This feature is not available on your current plan.", "details": { "feature": "phoneDialCode", "currentTier": "community", "requiredTier": "starter", "upgradeUrl": "https://app.countrystatecity.in/pricing" }}
{ "status": "error", "message": "Country not found."}
{ "status": "error", "message": "No dial code available for this country."}
Related Endpoints
List Dial Codes — every country, plus reverse lookup by dial code
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Country State City Documentation","description":"Documentation for the Country State City ecosystem: a REST API, downloadable database and tools covering 250 countries, 5,000+ states and 150,000+ cities with ISO codes, coordinates, timezones and currencies.","colors":{"primary":"#2563EB","light":"#3B82F6","dark":"#1E40AF"},"logo":{"light":"https://mintcdn.com/webbywonder/DXb6lzT49e7Mz1Kh/logo/csc-docs-logo-dark.svg?fit=max\u0026auto=format\u0026n=DXb6lzT49e7Mz1Kh\u0026q=85\u0026s=893eeadd293f0443a7f2b192eb9b59d0","dark":"https://mintcdn.com/webbywonder/DXb6lzT49e7Mz1Kh/logo/csc-docs-logo-light.svg?fit=max\u0026auto=format\u0026n=DXb6lzT49e7Mz1Kh\u0026q=85\u0026s=cff7bfba805966e45c27a602c96e8252"},"favicon":"https://mintcdn.com/webbywonder/fAkIAEvO-IGHwy4I/favicon.svg?fit=max\u0026auto=format\u0026n=fAkIAEvO-IGHwy4I\u0026q=85\u0026s=1b0ea88bfb2dcdc3ed92888be25695ae","api":{"openapi":"https://raw.githubusercontent.com/dr5hn/csc-swagger-playground/main/config.json","playground":{"display":"interactive"},"mdx":{"auth":{"method":"key","name":"X-CSCAPI-KEY"},"server":"https://api.countrystatecity.in/v1"}},"navbar":{"links":[{"href":"https://countrystatecity.in","label":"Home"},{"href":"https://countrystatecity.in/pricing","label":"Pricing"},{"href":"https://countrystatecity.org","label":"Encyclopedia"}],"primary":{"type":"button","label":"Get API Key","href":"https://countrystatecity.in/product/api/"}},"footer":{"socials":{"github":"https://github.com/dr5hn/countries-states-cities-database","linkedin":"https://www.linkedin.com/in/dr5hn","x":"https://x.com/dr5hn"},"links":[{"header":"Products","items":[{"label":"REST API","href":"https://countrystatecity.in/product/api"},{"label":"Database","href":"https://countrystatecity.in/product/database"},{"label":"Export Tool","href":"https://export.countrystatecity.in/"},{"label":"Update Tool","href":"https://countrystatecity.in/product/update-tool"}]},{"header":"Resources","items":[{"label":"API Playground","href":"https://playground.countrystatecity.in/"},{"label":"Live Demo","href":"https://demo.countrystatecity.in/"},{"label":"Products","href":"https://countrystatecity.in/ecosystem"},{"label":"Changelog","href":"/changelog"},{"label":"Status","href":"https://status.countrystatecity.in/"}]},{"header":"Company","items":[{"label":"About","href":"https://countrystatecity.in/about"},{"label":"Pricing","href":"https://countrystatecity.in/pricing"},{"label":"Contact","href":"https://countrystatecity.in/contact"},{"label":"Encyclopedia","href":"https://countrystatecity.org/"}]}]},"search":{"prompt":"Search the documentation..."},"seo":{"metatags":{"og:site_name":"Country State City Docs","og:image":"https://docs.countrystatecity.in/images/hero-light.png","twitter:card":"summary_large_image","twitter:site":"@dr5hn","twitter:image":"https://docs.countrystatecity.in/images/hero-light.png","keywords":"country state city API, countries API, states API, cities API, ISO 3166, geographical database, location dropdown"}},"integrations":{"clarity":{"projectId":"z4ojfuzvou"},"ga4":{"measurementId":"G-7LDSKYGZJB"}},"banner":{"content":"[**MakeMySiteLive** Publish your website in under 2 minutes *New*](https://makemysitelive.com/?utm_source=csc-docs\u0026utm_medium=banner\u0026utm_campaign=cross-promo\u0026utm_content=makemysitelive) [**RemoteGigs** Find remote jobs and gigs](https://remotegig.in/?utm_source=csc-docs\u0026utm_medium=banner\u0026utm_campaign=cross-promo\u0026utm_content=remotegig)","dismissible":true},"contextual":{"options":["copy","view","chatgpt","claude","perplexity","mcp","cursor","vscode"],"display":"header"},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"webbywonder","hasAudioNarration":false,"actualSubdomain":"webbywonder","customDomains":["docs.countrystatecity.in"],"gitSource":{"type":"github","owner":"dr5hn","repo":"csc-docs","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"feedback":{"thumbs":true,"edits":true,"issues":true,"agentFeedback":true},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6af82140f773a48258624b61","clientVersion":"0.0.4177","searchFilterCounts":[{"language":"default","tag":"API Reference","count":31},{"language":"default","tag":"Database","count":14},{"language":"default","tag":"API Guides","count":13},{"language":"default","tag":"Tools","count":12},{"language":"default","tag":"Installation Guides","count":7},{"language":"default","tag":"SDKs \u0026 Examples","count":6},{"language":"default","tag":"Database Documentation","count":6},{"language":"default","tag":"Update Tool","count":6},{"language":"default","tag":"Regions","count":5},{"language":"default","tag":"Export Tool","count":5}],"searchSettings":{"showContentSnippets":true,"isFiltersEnabled":true,"maxResults":10}},"assistantConfig":{"enableStarterQuestions":true,"enableContextualStarterQuestions":true,"deflection":{"enabled":true,"email":"[email protected]"}},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[],"privacy":{"consentBanner":{"enabled":true}},"googleFontsInlined":false},"customCss":[{"filePath":"custom.css","content":"#banner{background:#eef4fb;border-bottom:1px solid #dbe5f1;padding-top:6px;padding-bottom:6px}#banner>div{max-width:100%}#banner p{display:flex;flex-wrap:nowrap;align-items:center;justify-content:center;gap:8px 12px;margin:0}#banner a{display:inline-flex;align-items:center;gap:8px;padding:4px 12px 4px 4px;background:#ffffff;border:1px solid #dbe5f1;border-radius:999px;flex:none;font-family:Inter, ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;font-size:13px;font-weight:400;text-decoration:none;white-space:nowrap;transition:box-shadow 0.15s ease, border-color 0.15s ease}#banner a:hover{border-color:#bcd0ea;box-shadow:0 1px 6px rgba(37, 99, 235, 0.15)}#banner a,#banner a *{-webkit-text-fill-color:#475569}#banner a [data-streamdown=\"strong\"]{white-space:nowrap;font-weight:600;-webkit-text-fill-color:#0f172a}#banner a::before{content:'';flex:none;width:24px;height:24px;background:no-repeat center / cover;border-radius:7px}#banner a:nth-of-type(1)::before{background-image:url('/images/makemysitelive-icon.png')}#banner a:nth-of-type(2)::before{background-image:url('/images/remotegigs-icon.png');border-radius:50%}#banner a::after{content:'';flex:none;width:12px;height:12px;background-color:#2563eb;-webkit-mask:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 17 17 7M8 7h9v9'/%3E%3C/svg%3E\") no-repeat center / contain;mask:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 17 17 7M8 7h9v9'/%3E%3C/svg%3E\") no-repeat center / contain}#banner a em{padding:1px 8px;background:#fef3c7;border-radius:999px;font-size:11px;font-style:normal;font-weight:500;-webkit-text-fill-color:#92400e}#banner button{right:6px;opacity:0.6}#banner button:hover{opacity:1;background:rgba(15, 23, 42, 0.08)}#banner button svg path{stroke:#334155}@media (min-width: 901px) and (max-width: 1024px){#banner p{gap:8px;padding:0 40px}#banner a{gap:6px;padding:4px 10px 4px 4px;font-size:12.5px}}@media (min-width: 768px) and (max-width: 900px){#banner p{gap:6px;padding:0 32px}#banner a{gap:6px;padding:3px 10px 3px 3px;font-size:12px}#banner a::before{width:20px;height:20px}#banner a::after{width:10px;height:10px}#banner a em{display:none}}@media (max-width: 767px){#banner p{gap:6px;padding:0 28px}#banner a{font-size:0;gap:5px;padding:3px 8px 3px 3px}#banner a *:not([data-streamdown=\"strong\"]){font-size:0}#banner a [data-streamdown=\"strong\"]{font-size:12px}#banner a::before{width:20px;height:20px}#banner a::after{width:10px;height:10px}#banner a em{display:none}}@media (max-width: 400px){#banner a{gap:3px;padding-right:6px}#banner a [data-streamdown=\"strong\"]{font-size:11px}#banner a::after{display:none}}.dark #banner{background:#0f1b33;border-bottom-color:#1e2d4a}.dark #banner a{background:#16233f;border-color:#28395c}.dark #banner a,.dark #banner a *{-webkit-text-fill-color:#cbd5e1}.dark #banner a [data-streamdown=\"strong\"]{-webkit-text-fill-color:#f1f5f9}.dark #banner a::after{background-color:#60a5fa}.dark #banner a em{background:#3b2f0b;-webkit-text-fill-color:#fcd34d}.dark #banner button:hover{background:rgba(255, 255, 255, 0.1)}.dark #banner button svg path{stroke:#cbd5e1}"}],"page":{"pagePath":"api/endpoints/get-dial-code-by-country","slug":"/api/endpoints/get-dial-code-by-country","pageMetadata":{"title":"Get Dial Code by Country","openapi":"GET /phone/{ciso}","description":"Retrieve the international dial code for a single country by ISO2, ISO3, or numeric ID","href":"/api/endpoints/get-dial-code-by-country"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Retrieve the international dial code for a single country by ISO2, ISO3, or numeric ID\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,p:`p`,strong:`strong`,ul:`ul`,..._provideComponents(),...props.components},{Heading,Info,Note}=_components;if(!Heading)_missingMdxReference(`Heading`,true);if(!Info)_missingMdxReference(`Info`,true);if(!Note)_missingMdxReference(`Note`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`Get the dial code for one country. The path parameter accepts `,_jsx(_components.strong,{children:`three forms`}),` — the same identifier flexibility as the rest of the geographic API:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`ISO 3166-1 alpha-2 (e.g. `,_jsx(_components.code,{children:`US`}),`, `,_jsx(_components.code,{children:`IN`}),`)`]}),`\n`,_jsxs(_components.li,{children:[`ISO 3166-1 alpha-3 (e.g. `,_jsx(_components.code,{children:`USA`}),`, `,_jsx(_components.code,{children:`IND`}),`)`]}),`\n`,_jsxs(_components.li,{children:[`Numeric CSC country ID (e.g. `,_jsx(_components.code,{children:`233`}),`)`]}),`\n`]}),`\n`,_jsxs(Note,{children:[_jsx(_components.strong,{children:`Availability:`}),` Starter plan and above. Returns `,_jsx(_components.code,{children:`403`}),` on lower tiers.`]}),`\n`,_jsxs(Info,{children:[`Responses are cached server-side for 24 hours. Numeric IDs `,_jsx(_components.code,{children:`1`}),` and `,_jsx(_components.code,{children:`001`}),` resolve to the same cache slot; letter codes are case-insensitive.`]}),`\n`,_jsx(Heading,{level:`2`,id:`response`,children:`Response`}),`\n`,_jsxs(_components.p,{children:[`A single phone entry (object, `,_jsx(_components.strong,{children:`not`}),` an array — unlike the list endpoint).`]}),`\n`,`\n`,`\n`,_jsx(Heading,{level:`2`,id:`related-endpoints`,children:`Related Endpoints`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.a,{href:`/api/endpoints/list-dial-codes`,children:`List Dial Codes`}),` — every country, plus reverse lookup by dial code`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.a,{href:`/api/endpoints/parse-phone-number`,children:`Parse Phone Number`}),` — given an E.164 number, identify the country`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.a,{href:`/api/endpoints/get-country-details`,children:`Get Country Details`}),` — full country record, including `,_jsx(_components.code,{children:`phonecode`})]}),`\n`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Get Dial Code by Country","openapi":"GET /phone/{ciso}","description":"Retrieve the international dial code for a single country by ISO2, ISO3, or numeric ID","href":"/api/endpoints/get-dial-code-by-country"}}},"mdxSourceWithNoJs":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,Info,Note,RequestExample,ResponseExample}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Info)_missingMdxReference(`Info`,true);if(!Note)_missingMdxReference(`Note`,true);if(!RequestExample)_missingMdxReference(`RequestExample`,true);if(!ResponseExample)_missingMdxReference(`ResponseExample`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`Get the dial code for one country. The path parameter accepts `,_jsx(_components.strong,{children:`three forms`}),` — the same identifier flexibility as the rest of the geographic API:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`ISO 3166-1 alpha-2 (e.g. `,_jsx(_components.code,{children:`US`}),`, `,_jsx(_components.code,{children:`IN`}),`)`]}),`\n`,_jsxs(_components.li,{children:[`ISO 3166-1 alpha-3 (e.g. `,_jsx(_components.code,{children:`USA`}),`, `,_jsx(_components.code,{children:`IND`}),`)`]}),`\n`,_jsxs(_components.li,{children:[`Numeric CSC country ID (e.g. `,_jsx(_components.code,{children:`233`}),`)`]}),`\n`]}),`\n`,_jsxs(Note,{children:[_jsx(_components.strong,{children:`Availability:`}),` Starter plan and above. Returns `,_jsx(_components.code,{children:`403`}),` on lower tiers.`]}),`\n`,_jsxs(Info,{children:[`Responses are cached server-side for 24 hours. Numeric IDs `,_jsx(_components.code,{children:`1`}),` and `,_jsx(_components.code,{children:`001`}),` resolve to the same cache slot; letter codes are case-insensitive.`]}),`\n`,_jsx(Heading,{level:`2`,id:`response`,children:`Response`}),`\n`,_jsxs(_components.p,{children:[`A single phone entry (object, `,_jsx(_components.strong,{children:`not`}),` an array — unlike the list endpoint).`]}),`\n`,_jsxs(RequestExample,{children:[_jsx(CodeBlock,{filename:`cURL (ISO2)`,numberOfLines:`2`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` -X GET `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'https://api.countrystatecity.in/v1/phone/US'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` -H `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'X-CSCAPI-KEY: YOUR_API_KEY'`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`cURL (ISO3)`,numberOfLines:`2`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` -X GET `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'https://api.countrystatecity.in/v1/phone/IND'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` -H `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'X-CSCAPI-KEY: YOUR_API_KEY'`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`cURL (numeric ID)`,numberOfLines:`2`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` -X GET `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'https://api.countrystatecity.in/v1/phone/233'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` -H `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'X-CSCAPI-KEY: YOUR_API_KEY'`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`JavaScript`,numberOfLines:`6`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`6`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`const`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` response = `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` fetch(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'https://api.countrystatecity.in/v1/phone/US'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` headers: { `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'X-CSCAPI-KEY'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'YOUR_API_KEY'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`const`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { dial_code } = `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` response.json();`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`console.log(dial_code); `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// \"+1\"`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`Python`,numberOfLines:`8`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`8`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` requests`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`response = requests.get(`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'https://api.countrystatecity.in/v1/phone/IN'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` headers={`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'X-CSCAPI-KEY'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'YOUR_API_KEY'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`print(response.json()[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'dial_code'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]) `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# \"+91\"`})]}),`\n`]})})})]}),`\n`,_jsxs(ResponseExample,{children:[_jsx(CodeBlock,{filename:`200 - Standard country`,numberOfLines:`6`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`6`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"country\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"IN\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"dial_code\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"+91\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"iso2\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"IN\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"iso3\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"IND\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`200 - NANP entry (with area_code)`,numberOfLines:`7`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`7`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"country\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"BB\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"dial_code\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"+1\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"area_code\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"246\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"iso2\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"BB\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"iso3\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"BRB\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`403 - Feature Restricted`,numberOfLines:`10`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`10`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"status\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"This feature is not available on your current plan.\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"details\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"feature\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"phoneDialCode\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"currentTier\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"community\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"requiredTier\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"starter\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"upgradeUrl\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://app.countrystatecity.in/pricing\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`404 - Country Not Found`,numberOfLines:`4`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`4`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"status\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Country not found.\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`404 - No Dial Code on Record`,numberOfLines:`4`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`4`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"status\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"No dial code available for this country.\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})})]}),`\n`,_jsx(Heading,{level:`2`,id:`related-endpoints`,children:`Related Endpoints`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.a,{href:`/api/endpoints/list-dial-codes`,children:`List Dial Codes`}),` — every country, plus reverse lookup by dial code`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.a,{href:`/api/endpoints/parse-phone-number`,children:`Parse Phone Number`}),` — given an E.164 number, identify the country`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.a,{href:`/api/endpoints/get-country-details`,children:`Get Country Details`}),` — full country record, including `,_jsx(_components.code,{children:`phonecode`})]}),`\n`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Get Dial Code by Country","openapi":"GET /phone/{ciso}","description":"Retrieve the international dial code for a single country by ISO2, ISO3, or numeric ID","href":"/api/endpoints/get-dial-code-by-country"}}}},"mdxExtracts":{"tableOfContents":[{"title":"Response","slug":"response","depth":2,"children":[]},{"title":"Related Endpoints","slug":"related-endpoints","depth":2,"children":[]}],"codeExamples":{"request":{"type":"RequestExample","children":[{"filename":"cURL (ISO2)","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"shellscript\">\u003ccode language=\"shellscript\" numberOfLines=\"2\">\u003cspan class=\"line\">\u003cspan style=\"color:#8250DF;--shiki-dark:#DCDCAA\">curl\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> -X GET \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">'https://api.countrystatecity.in/v1/phone/US'\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> -H \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">'X-CSCAPI-KEY: YOUR_API_KEY'\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"cURL (ISO3)","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"shellscript\">\u003ccode language=\"shellscript\" numberOfLines=\"2\">\u003cspan class=\"line\">\u003cspan style=\"color:#8250DF;--shiki-dark:#DCDCAA\">curl\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> -X GET \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">'https://api.countrystatecity.in/v1/phone/IND'\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> -H \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">'X-CSCAPI-KEY: YOUR_API_KEY'\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"cURL (numeric ID)","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"shellscript\">\u003ccode language=\"shellscript\" numberOfLines=\"2\">\u003cspan class=\"line\">\u003cspan style=\"color:#8250DF;--shiki-dark:#DCDCAA\">curl\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> -X GET \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">'https://api.countrystatecity.in/v1/phone/233'\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> -H \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">'X-CSCAPI-KEY: YOUR_API_KEY'\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"JavaScript","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"javascript\">\u003ccode language=\"javascript\" numberOfLines=\"6\">\u003cspan class=\"line\">\u003cspan style=\"color:#CF222E;--shiki-dark:#C586C0\">const\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> response = \u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#C586C0\">await\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> fetch(\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">'https://api.countrystatecity.in/v1/phone/US'\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">, {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> headers: { \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">'X-CSCAPI-KEY'\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">'YOUR_API_KEY'\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">});\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CF222E;--shiki-dark:#C586C0\">const\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> { dial_code } = \u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#C586C0\">await\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> response.json();\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">console.log(dial_code); \u003c/span>\u003cspan style=\"color:#6E7781;--shiki-dark:#6A9955\">// \"+1\"\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"Python","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"python\">\u003ccode language=\"python\" numberOfLines=\"8\">\u003cspan class=\"line\">\u003cspan style=\"color:#CF222E;--shiki-dark:#C586C0\">import\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> requests\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">response = requests.get(\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> 'https://api.countrystatecity.in/v1/phone/IN'\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> headers={\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">'X-CSCAPI-KEY'\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">'YOUR_API_KEY'\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">}\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">)\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">print(response.json()[\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">'dial_code'\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">]) \u003c/span>\u003cspan style=\"color:#6E7781;--shiki-dark:#6A9955\"># \"+91\"\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"}],"attributes":[]},"response":{"type":"ResponseExample","children":[{"filename":"200 - Standard country","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"json\">\u003ccode language=\"json\" numberOfLines=\"6\">\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"country\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"IN\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"dial_code\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"+91\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"iso2\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"IN\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"iso3\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"IND\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">}\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"200 - NANP entry (with area_code)","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"json\">\u003ccode language=\"json\" numberOfLines=\"7\">\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"country\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"BB\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"dial_code\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"+1\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"area_code\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"246\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"iso2\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"BB\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"iso3\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"BRB\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">}\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"403 - Feature Restricted","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"json\">\u003ccode language=\"json\" numberOfLines=\"10\">\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"status\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"error\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"message\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"This feature is not available on your current plan.\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"details\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"feature\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"phoneDialCode\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"currentTier\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"community\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"requiredTier\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"starter\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"upgradeUrl\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"https://app.countrystatecity.in/pricing\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">}\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"404 - Country Not Found","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"json\">\u003ccode language=\"json\" numberOfLines=\"4\">\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"status\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"error\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"message\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"Country not found.\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">}\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"404 - No Dial Code on Record","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"json\">\u003ccode language=\"json\" numberOfLines=\"4\">\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"status\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"error\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"message\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"No dial code available for this country.\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">}\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"}],"attributes":[]}}},"jsLinks":[],"openApiReferenceData":{"operation":{"tags":["Phone"],"summary":"Get dial code by country","description":"Retrieve the international dial code for a single country by ISO2, ISO3, or numeric ID","operationId":"getDialCodeByCountry","parameters":["0e088f3f-ed25-4af8-9abc-9e3580b4c056"],"responses":{"200":"36f146b6-3858-44c2-bd42-bc33cd4a08e5","401":"8035ccf4-038f-4422-ab31-930af014cf50","403":"96e73f7e-95e7-4806-87aa-ebb2fc1f77dd","404":"9c9778f0-c46d-478e-ae04-47d6642c9c73","429":"06be6cd2-4390-49d5-ad94-6bc83bd0cb8a"},"security":["8a933b2b-bb4c-4ac7-b641-446c623f703a"],"method":"get","type":"path","servers":["8053fe64-a420-4986-ab18-c4b2594158b3"],"path":"/phone/{ciso}","baseUrlOptions":["https://api.countrystatecity.in/v1"],"title":"Get dial code by country","codeSamples":[],"requiredOnlyExamples":false,"requestExamples":[{"dropdown":false,"language":"shellscript","code":{"type":"pre","key":null,"ref":null,"props":{"className":"shiki shiki-themes github-light-default dark-plus","style":{"backgroundColor":"#ffffff","--shiki-dark-bg":"#0B0C0E","color":"#1f2328","--shiki-dark":"#D4D4D4"},"language":"shellscript","children":{"type":"code","key":null,"ref":null,"props":{"language":"shellscript","numberOfLines":"2","children":[{"type":"span","key":"0","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#8250DF","--shiki-dark":"#DCDCAA"},"children":"curl"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":" -X GET "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"'https://api.countrystatecity.in/v1/phone/US'"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":" \\"}}]}},"\n",{"type":"span","key":"2","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":" -H "}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"'X-CSCAPI-KEY: YOUR_API_KEY'"}}]}},"\n"]}}}},"filename":"cURL (ISO2)"},{"dropdown":false,"language":"shellscript","code":{"type":"pre","key":null,"ref":null,"props":{"className":"shiki shiki-themes github-light-default dark-plus","style":{"backgroundColor":"#ffffff","--shiki-dark-bg":"#0B0C0E","color":"#1f2328","--shiki-dark":"#D4D4D4"},"language":"shellscript","children":{"type":"code","key":null,"ref":null,"props":{"language":"shellscript","numberOfLines":"2","children":[{"type":"span","key":"0","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#8250DF","--shiki-dark":"#DCDCAA"},"children":"curl"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":" -X GET "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"'https://api.countrystatecity.in/v1/phone/IND'"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":" \\"}}]}},"\n",{"type":"span","key":"2","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":" -H "}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"'X-CSCAPI-KEY: YOUR_API_KEY'"}}]}},"\n"]}}}},"filename":"cURL (ISO3)"},{"dropdown":false,"language":"shellscript","code":{"type":"pre","key":null,"ref":null,"props":{"className":"shiki shiki-themes github-light-default dark-plus","style":{"backgroundColor":"#ffffff","--shiki-dark-bg":"#0B0C0E","color":"#1f2328","--shiki-dark":"#D4D4D4"},"language":"shellscript","children":{"type":"code","key":null,"ref":null,"props":{"language":"shellscript","numberOfLines":"2","children":[{"type":"span","key":"0","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#8250DF","--shiki-dark":"#DCDCAA"},"children":"curl"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":" -X GET "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"'https://api.countrystatecity.in/v1/phone/233'"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":" \\"}}]}},"\n",{"type":"span","key":"2","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":" -H "}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"'X-CSCAPI-KEY: YOUR_API_KEY'"}}]}},"\n"]}}}},"filename":"cURL (numeric ID)"},{"dropdown":false,"language":"javascript","code":{"type":"pre","key":null,"ref":null,"props":{"className":"shiki shiki-themes github-light-default dark-plus","style":{"backgroundColor":"#ffffff","--shiki-dark-bg":"#0B0C0E","color":"#1f2328","--shiki-dark":"#D4D4D4"},"language":"javascript","children":{"type":"code","key":null,"ref":null,"props":{"language":"javascript","numberOfLines":"6","children":[{"type":"span","key":"0","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#C586C0"},"children":"const"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":" response = "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#C586C0"},"children":"await"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":" fetch("}},{"type":"span","key":"4","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"'https://api.countrystatecity.in/v1/phone/US'"}},{"type":"span","key":"5","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":", {"}}]}},"\n",{"type":"span","key":"2","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":" headers: { "}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"'X-CSCAPI-KEY'"}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"'YOUR_API_KEY'"}},{"type":"span","key":"4","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":" }"}}]}},"\n",{"type":"span","key":"4","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"});"}}}},"\n",{"type":"span","key":"6","ref":null,"props":{"className":"line","children":null}},"\n",{"type":"span","key":"8","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#C586C0"},"children":"const"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":" { dial_code } = "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#C586C0"},"children":"await"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":" response.json();"}}]}},"\n",{"type":"span","key":"10","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"console.log(dial_code); "}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#6E7781","--shiki-dark":"#6A9955"},"children":"// \"+1\""}}]}},"\n"]}}}},"filename":"JavaScript"},{"dropdown":false,"language":"python","code":{"type":"pre","key":null,"ref":null,"props":{"className":"shiki shiki-themes github-light-default dark-plus","style":{"backgroundColor":"#ffffff","--shiki-dark-bg":"#0B0C0E","color":"#1f2328","--shiki-dark":"#D4D4D4"},"language":"python","children":{"type":"code","key":null,"ref":null,"props":{"language":"python","numberOfLines":"8","children":[{"type":"span","key":"0","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#C586C0"},"children":"import"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":" requests"}}]}},"\n",{"type":"span","key":"2","ref":null,"props":{"className":"line","children":null}},"\n",{"type":"span","key":"4","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"response = requests.get("}}}},"\n",{"type":"span","key":"6","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" 'https://api.countrystatecity.in/v1/phone/IN'"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"8","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":" headers={"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"'X-CSCAPI-KEY'"}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"'YOUR_API_KEY'"}},{"type":"span","key":"4","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"}"}}]}},"\n",{"type":"span","key":"10","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":")"}}}},"\n",{"type":"span","key":"12","ref":null,"props":{"className":"line","children":null}},"\n",{"type":"span","key":"14","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"print(response.json()["}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"'dial_code'"}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"]) "}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#6E7781","--shiki-dark":"#6A9955"},"children":"# \"+91\""}}]}},"\n"]}}}},"filename":"Python"}],"requestExampleType":"mdx","responseExamples":[{"dropdown":false,"language":"json","code":{"type":"pre","key":null,"ref":null,"props":{"className":"shiki shiki-themes github-light-default dark-plus","style":{"backgroundColor":"#ffffff","--shiki-dark-bg":"#0B0C0E","color":"#1f2328","--shiki-dark":"#D4D4D4"},"language":"json","children":{"type":"code","key":null,"ref":null,"props":{"language":"json","numberOfLines":"6","children":[{"type":"span","key":"0","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"{"}}}},"\n",{"type":"span","key":"2","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"country\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"IN\""}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"4","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"dial_code\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"+91\""}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"6","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"iso2\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"IN\""}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"8","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"iso3\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"IND\""}}]}},"\n",{"type":"span","key":"10","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"}"}}}},"\n"]}}}},"filename":"200 - Standard country"},{"dropdown":false,"language":"json","code":{"type":"pre","key":null,"ref":null,"props":{"className":"shiki shiki-themes github-light-default dark-plus","style":{"backgroundColor":"#ffffff","--shiki-dark-bg":"#0B0C0E","color":"#1f2328","--shiki-dark":"#D4D4D4"},"language":"json","children":{"type":"code","key":null,"ref":null,"props":{"language":"json","numberOfLines":"7","children":[{"type":"span","key":"0","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"{"}}}},"\n",{"type":"span","key":"2","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"country\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"BB\""}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"4","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"dial_code\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"+1\""}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"6","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"area_code\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"246\""}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"8","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"iso2\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"BB\""}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"10","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"iso3\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"BRB\""}}]}},"\n",{"type":"span","key":"12","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"}"}}}},"\n"]}}}},"filename":"200 - NANP entry (with area_code)"},{"dropdown":false,"language":"json","code":{"type":"pre","key":null,"ref":null,"props":{"className":"shiki shiki-themes github-light-default dark-plus","style":{"backgroundColor":"#ffffff","--shiki-dark-bg":"#0B0C0E","color":"#1f2328","--shiki-dark":"#D4D4D4"},"language":"json","children":{"type":"code","key":null,"ref":null,"props":{"language":"json","numberOfLines":"10","children":[{"type":"span","key":"0","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"{"}}}},"\n",{"type":"span","key":"2","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"status\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"error\""}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"4","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"message\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"This feature is not available on your current plan.\""}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"6","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"details\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": {"}}]}},"\n",{"type":"span","key":"8","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"feature\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"phoneDialCode\""}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"10","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"currentTier\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"community\""}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"12","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"requiredTier\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"starter\""}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"14","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"upgradeUrl\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"https://app.countrystatecity.in/pricing\""}}]}},"\n",{"type":"span","key":"16","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":" }"}}}},"\n",{"type":"span","key":"18","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"}"}}}},"\n"]}}}},"filename":"403 - Feature Restricted"},{"dropdown":false,"language":"json","code":{"type":"pre","key":null,"ref":null,"props":{"className":"shiki shiki-themes github-light-default dark-plus","style":{"backgroundColor":"#ffffff","--shiki-dark-bg":"#0B0C0E","color":"#1f2328","--shiki-dark":"#D4D4D4"},"language":"json","children":{"type":"code","key":null,"ref":null,"props":{"language":"json","numberOfLines":"4","children":[{"type":"span","key":"0","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"{"}}}},"\n",{"type":"span","key":"2","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"status\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"error\""}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"4","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"message\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"Country not found.\""}}]}},"\n",{"type":"span","key":"6","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"}"}}}},"\n"]}}}},"filename":"404 - Country Not Found"},{"dropdown":false,"language":"json","code":{"type":"pre","key":null,"ref":null,"props":{"className":"shiki shiki-themes github-light-default dark-plus","style":{"backgroundColor":"#ffffff","--shiki-dark-bg":"#0B0C0E","color":"#1f2328","--shiki-dark":"#D4D4D4"},"language":"json","children":{"type":"code","key":null,"ref":null,"props":{"language":"json","numberOfLines":"4","children":[{"type":"span","key":"0","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"{"}}}},"\n",{"type":"span","key":"2","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"status\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"error\""}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"4","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"message\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"No dial code available for this country.\""}}]}},"\n",{"type":"span","key":"6","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"}"}}}},"\n"]}}}},"filename":"404 - No Dial Code on Record"}],"responseExampleType":"mdx"},"dependencies":{"parameters":{"0e088f3f-ed25-4af8-9abc-9e3580b4c056":{"name":"ciso","in":"path","description":"ISO 3166-1 alpha-2 (e.g., `IN`), alpha-3 (e.g., `IND`), or numeric country ID (e.g., `101`). Case-insensitive.","required":true,"schema":{"type":"string","example":"IN","isRequired":true,"description":"ISO 3166-1 alpha-2 (e.g., `IN`), alpha-3 (e.g., `IND`), or numeric country ID (e.g., `101`). Case-insensitive.","uniqueKey":"","typeLabel":"string"}}},"responses":{"36f146b6-3858-44c2-bd42-bc33cd4a08e5":{"description":"Dial code for the country","headers":{"Cache-Control":{"description":"Cache directive","schema":{"type":"string","example":"public, max-age=3600"}},"ETag":{"description":"Entity tag for conditional requests (use with `If-None-Match`)","schema":{"type":"string","example":"\"a3f2b8c1d4e5f6a7b8c9d0e1f2a3b4c5\""}},"X-Cache":{"description":"Whether the response was served from cache","schema":{"type":"string","enum":["HIT","MISS"],"example":"HIT"}},"X-CSC-Plan":{"description":"Your current pricing tier","schema":{"type":"string","enum":["community","starter","supporter","professional","business","legacy","custom"],"example":"supporter"}},"X-CSC-Daily-Used":{"description":"Number of requests used today","schema":{"type":"integer","example":42}},"X-CSC-Daily-Limit":{"description":"Your daily request limit (or 'unlimited' for custom plans)","schema":{"type":"string","example":"1000"}},"X-CSC-Monthly-Used":{"description":"Number of requests used this month","schema":{"type":"integer","example":850}},"X-CSC-Monthly-Limit":{"description":"Your monthly request limit (or 'unlimited' for custom plans)","schema":{"type":"string","example":"30000"}}},"content":{"application/json":{"schema":{"type":"object","description":"International dial code entry for a country. Follows ITU-T E.164 standards.","properties":{"country":{"type":"string","description":"ISO 3166-1 alpha-2 country code","example":"IN","isRequired":true,"uniqueKey":"country","typeLabel":"string"},"dial_code":{"type":"string","description":"International dial code with `+` prefix","example":"+91","isRequired":true,"uniqueKey":"dial_code","typeLabel":"string"},"iso2":{"type":"string","description":"ISO 3166-1 alpha-2 code","example":"IN","isRequired":true,"uniqueKey":"iso2","typeLabel":"string"},"iso3":{"type":"string","description":"ISO 3166-1 alpha-3 code","example":"IND","isRequired":true,"uniqueKey":"iso3","typeLabel":"string"},"area_code":{"oneOf":[{"type":"string","description":"Fixed area code for NANP territories (e.g., `246` for Barbados). Present only when applicable.","example":null,"uniqueKey":"area_code.oneOf.0","typeLabel":"string"},{"type":"null","description":"Fixed area code for NANP territories (e.g., `246` for Barbados). Present only when applicable.","example":null,"uniqueKey":"area_code.oneOf.1","typeLabel":"null"}],"uniqueKey":"area_code","typeLabel":"string | null"}},"required":["country","dial_code","iso2","iso3"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"country":"IN","dial_code":"+91","iso2":"IN","iso3":"IND","area_code":null}}},"exampleType":"generated"}},"exampleType":"generated"},"8035ccf4-038f-4422-ab31-930af014cf50":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Error message","isRequired":true,"uniqueKey":"error","typeLabel":"string"}},"required":["error"],"uniqueKey":"","typeLabel":"object"},"example":{"error":"Unauthorized. You shouldn't be here."},"examples":{"Example":{"title":"Example","value":{"error":"Unauthorized. You shouldn't be here."}}},"exampleType":"examples"}},"exampleType":"examples"},"96e73f7e-95e7-4806-87aa-ebb2fc1f77dd":{"description":"Feature not available on your current plan. Upgrade to access this endpoint. `details.feature` names the denied feature and `details.requiredTier` the lowest plan that includes it (the example is for `/states`).","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"],"isRequired":true,"uniqueKey":"status","typeLabel":"enum\u003cstring>"},"message":{"type":"string","example":"This feature is not available on your current plan.","isRequired":true,"uniqueKey":"message","typeLabel":"string"},"details":{"type":"object","properties":{"feature":{"type":"string","description":"The feature flag that was denied","example":"bulkStates","isRequired":true,"uniqueKey":"details.feature","typeLabel":"string"},"currentTier":{"type":"string","example":"community","isRequired":true,"uniqueKey":"details.currentTier","typeLabel":"string"},"requiredTier":{"oneOf":[{"type":"string","description":"Lowest plan that unlocks the feature; null when it cannot be determined","example":"starter","isRequired":true,"uniqueKey":"details.requiredTier.oneOf.0","typeLabel":"string"},{"type":"null","description":"Lowest plan that unlocks the feature; null when it cannot be determined","example":"starter","isRequired":true,"uniqueKey":"details.requiredTier.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"details.requiredTier","typeLabel":"string | null"},"upgradeUrl":{"type":"string","format":"uri","example":"https://countrystatecity.in/pricing","isRequired":true,"uniqueKey":"details.upgradeUrl","typeLabel":"string\u003curi>"}},"required":["feature","currentTier","requiredTier","upgradeUrl"],"isRequired":true,"uniqueKey":"details","typeLabel":"object"}},"required":["status","message","details"],"uniqueKey":"","typeLabel":"object"},"example":{"status":"error","message":"This feature is not available on your current plan.","details":{"feature":"bulkStates","currentTier":"community","requiredTier":"starter","upgradeUrl":"https://countrystatecity.in/pricing"}},"examples":{"Example":{"title":"Example","value":{"status":"error","message":"This feature is not available on your current plan.","details":{"feature":"bulkStates","currentTier":"community","requiredTier":"starter","upgradeUrl":"https://countrystatecity.in/pricing"}}}},"exampleType":"examples"}},"exampleType":"examples"},"9c9778f0-c46d-478e-ae04-47d6642c9c73":{"description":"Country not found, or no dial code for it","content":{"application/json":{"schema":{"type":"object","description":"Error envelope used by the postcode and meta endpoints.","properties":{"status":{"type":"string","example":"error","isRequired":true,"uniqueKey":"status","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"message","typeLabel":"string"},"details":{"oneOf":[{"type":"object","properties":{"reason":{"type":"string","description":"Machine-readable reason. Check this instead of parsing `message`.","uniqueKey":"details.oneOf.0.reason","typeLabel":"string"}},"additionalProperties":true,"uniqueKey":"details.oneOf.0","typeLabel":"object"},{"type":"null","properties":{"reason":{"type":"string","description":"Machine-readable reason. Check this instead of parsing `message`."}},"additionalProperties":true,"uniqueKey":"details.oneOf.1","typeLabel":"null"}],"uniqueKey":"details","typeLabel":"object | null"}},"required":["status","message"],"uniqueKey":"","typeLabel":"object"},"example":{"status":"error","message":"Country not found."},"examples":{"Example":{"title":"Example","value":{"status":"error","message":"Country not found."}}},"exampleType":"examples"}},"exampleType":"examples"},"06be6cd2-4390-49d5-ad94-6bc83bd0cb8a":{"description":"Daily or monthly usage limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Daily usage limit exceeded. Please try again tomorrow or contact support for higher limits.","isRequired":true,"uniqueKey":"error","typeLabel":"string"},"limit":{"type":"integer","description":"Your plan's limit for the exceeded period","example":100,"uniqueKey":"limit","typeLabel":"integer"},"period":{"type":"string","enum":["daily","monthly"],"example":"daily","uniqueKey":"period","typeLabel":"enum\u003cstring>"},"tier":{"type":"string","description":"Your current tier","example":"community","uniqueKey":"tier","typeLabel":"string"},"upgradeUrl":{"type":"string","description":"URL to upgrade your plan","example":"https://countrystatecity.in/pricing","uniqueKey":"upgradeUrl","typeLabel":"string"}},"required":["error"],"uniqueKey":"","typeLabel":"object"},"example":{"error":"Daily usage limit exceeded. Please try again tomorrow or contact support for higher limits.","limit":100,"period":"daily","tier":"community","upgradeUrl":"https://countrystatecity.in/pricing"},"examples":{"Example":{"title":"Example","value":{"error":"Daily usage limit exceeded. Please try again tomorrow or contact support for higher limits.","limit":100,"period":"daily","tier":"community","upgradeUrl":"https://countrystatecity.in/pricing"}}},"exampleType":"examples"}},"exampleType":"examples"}},"security":{"8a933b2b-bb4c-4ac7-b641-446c623f703a":{"ApiKeyAuth":{"type":"apiKey","description":"API key for authentication. Get your free key at [app.countrystatecity.in](https://app.countrystatecity.in).","name":"X-CSCAPI-KEY","in":"header","scopes":[]}}},"servers":{"8053fe64-a420-4986-ab18-c4b2594158b3":{"url":"https://api.countrystatecity.in/v1","description":"Production API"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"apiKey","description":"API key for authentication. Get your free key at [app.countrystatecity.in](https://app.countrystatecity.in).","name":"X-CSCAPI-KEY","in":"header","scopes":[]},"schema":{"title":"X-CSCAPI-KEY","type":"string","description":"API key for authentication. Get your free key at [app.countrystatecity.in](https://app.countrystatecity.in).","isRequired":true,"typeLabel":"string","deprecated":false},"schemeName":"ApiKeyAuth","name":"X-CSCAPI-KEY"}],"title":"ApiKeyAuth"}]},"originalFileLocation":"https://raw.githubusercontent.com/dr5hn/csc-swagger-playground/main/config.json"},"subdomain":"webbywonder","siteName":"Country State City Documentation","title":"Get Dial Code by Country - Country State City Documentation","relatedPagesConfig":{"enabled":true,"limit":5,"mode":"automatic"},"contextualStarterQuestions":[{"_id":"6acaa0d4fbd69a7ea3c957a3","deploymentId":"68c5124ba1ff923c83a9da5f","questionText":"What formats are accepted for countries?","status":"active","generatedBy":"contextual","path":"api/endpoints/get-dial-code-by-country","createdAt":"2026-10-10T20:32:20.865Z","updatedAt":"2026-10-10T20:32:20.865Z","__v":0},{"_id":"6acaa0d4fbd69a7ea3c957a2","deploymentId":"68c5124ba1ff923c83a9da5f","questionText":"How do I get a country dial code?","status":"active","generatedBy":"contextual","path":"api/endpoints/get-dial-code-by-country","createdAt":"2026-10-10T20:32:20.865Z","updatedAt":"2026-10-10T20:32:20.865Z","__v":0},{"_id":"6acaa0d4fbd69a7ea3c957a4","deploymentId":"68c5124ba1ff923c83a9da5f","questionText":"How long are responses cached?","status":"active","generatedBy":"contextual","path":"api/endpoints/get-dial-code-by-country","createdAt":"2026-10-10T20:32:20.865Z","updatedAt":"2026-10-10T20:32:20.865Z","__v":0}],"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-09-29T14:26:23.258Z","originalFileLocation":"api/endpoints/get-dial-code-by-country.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Retrieve the international dial code for a single country by ISO2, ISO3, or numeric ID\">\u003cmeta data-mint-head name=\"keywords\" content=\"country state city API, countries API, states API, cities API, ISO 3166, geographical database, location dropdown\">\u003cmeta data-mint-head name=\"application-name\" content=\"Country State City Documentation\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/webbywonder/QCoQSc7Hfg85lHKO/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/webbywonder/QCoQSc7Hfg85lHKO/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/webbywonder/QCoQSc7Hfg85lHKO/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/webbywonder/QCoQSc7Hfg85lHKO/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/webbywonder/QCoQSc7Hfg85lHKO/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/webbywonder/QCoQSc7Hfg85lHKO/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/webbywonder/QCoQSc7Hfg85lHKO/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/webbywonder/QCoQSc7Hfg85lHKO/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/webbywonder/QCoQSc7Hfg85lHKO/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Get Dial Code by Country - Country State City Documentation\">\u003cmeta data-mint-head property=\"og:description\" content=\"Retrieve the international dial code for a single country by ISO2, ISO3, or numeric ID\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Country State City Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.countrystatecity.in/api/endpoints/get-dial-code-by-country\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://docs.countrystatecity.in/images/hero-light.png\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Get Dial Code by Country - Country State City Documentation\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Retrieve the international dial code for a single country by ISO2, ISO3, or numeric ID\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://docs.countrystatecity.in/images/hero-light.png\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/webbywonder/QCoQSc7Hfg85lHKO/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Country State City Documentation\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#2563EB\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.countrystatecity.in/api/endpoints/get-dial-code-by-country\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api/endpoints/get-dial-code-by-country.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.countrystatecity.in/#organization\",\"name\":\"Country State City Documentation\",\"url\":\"https://docs.countrystatecity.in\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/webbywonder/DXb6lzT49e7Mz1Kh/logo/csc-docs-logo-dark.svg?fit=max\u0026auto=format\u0026n=DXb6lzT49e7Mz1Kh\u0026q=85\u0026s=893eeadd293f0443a7f2b192eb9b59d0\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.countrystatecity.in#website\",\"name\":\"Country State City Documentation\",\"url\":\"https://docs.countrystatecity.in\",\"publisher\":{\"@id\":\"https://docs.countrystatecity.in/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.countrystatecity.in/api/endpoints/get-dial-code-by-country#webpage\",\"url\":\"https://docs.countrystatecity.in/api/endpoints/get-dial-code-by-country\",\"name\":\"Get Dial Code by Country\",\"description\":\"Retrieve the international dial code for a single country by ISO2, ISO3, or numeric ID\",\"dateModified\":\"2026-09-29T14:26:23.258Z\",\"isPartOf\":{\"@id\":\"https://docs.countrystatecity.in#website\"},\"breadcrumb\":{\"@id\":\"https://docs.countrystatecity.in/api/endpoints/get-dial-code-by-country#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.countrystatecity.in/api/endpoints/get-dial-code-by-country#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Phone\",\"item\":\"https://docs.countrystatecity.in/api/endpoints/list-dial-codes\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Get Dial Code by Country\",\"item\":\"https://docs.countrystatecity.in/api/endpoints/get-dial-code-by-country\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.countrystatecity.in/api/endpoints/get-dial-code-by-country#apireference\",\"headline\":\"Get Dial Code by Country\",\"name\":\"Get Dial Code by Country\",\"description\":\"Retrieve the international dial code for a single country by ISO2, ISO3, or numeric ID\",\"url\":\"https://docs.countrystatecity.in/api/endpoints/get-dial-code-by-country\",\"mainEntityOfPage\":{\"@id\":\"https://docs.countrystatecity.in/api/endpoints/get-dial-code-by-country#webpage\"},\"image\":\"https://docs.countrystatecity.in/images/hero-light.png\",\"dateModified\":\"2026-09-29T14:26:23.258Z\",\"publisher\":{\"@id\":\"https://docs.countrystatecity.in/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.countrystatecity.in#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Country State City Documentation\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Country State City Documentation\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/api/endpoints/get-dial-code-by-country.md","siteName":"Country State City Documentation","nav":{"global":null,"tabs":[{"tab":"Home","pages":[{"title":"Home","href":""}]},{"tab":"API Guides","icon":"book","pages":[{"title":"API Guides","href":"/api/introduction"}]},{"tab":"API Reference","icon":"code","groups":[{"group":"Countries","icon":"earth-americas","pages":[{"title":"Get All Countries","openapi":"GET /countries","href":"/api/endpoints/get-all-countries"},{"title":"Get Country Details","openapi":"GET /countries/{ciso}","href":"/api/endpoints/get-country-details"}]},{"group":"States","icon":"map","pages":[{"title":"Get All States","openapi":"GET /states","href":"/api/endpoints/get-all-states"},{"title":"Get States by Country","openapi":"GET /countries/{ciso}/states","href":"/api/endpoints/get-states-by-country"},{"title":"Get State Details","openapi":"GET /countries/{ciso}/states/{siso}","href":"/api/endpoints/get-state-details"}]},{"group":"Cities","icon":"city","pages":[{"title":"Get Cities by Country","openapi":"GET /countries/{ciso}/cities","href":"/api/endpoints/get-cities-by-country"},{"title":"Get Cities by State","openapi":"GET /countries/{ciso}/states/{siso}/cities","href":"/api/endpoints/get-cities-by-state"}]},{"group":"Postcodes","icon":"envelope","pages":[{"title":"Get Postcode by Code","openapi":"GET /countries/{ciso}/postcodes/{code}","href":"/api/endpoints/get-postcode-by-code"},{"title":"Get Postcodes by Country","openapi":"GET /countries/{ciso}/postcodes","href":"/api/endpoints/get-postcodes-by-country"}]},{"group":"Regions","icon":"globe","pages":[{"title":"Get All Regions","openapi":"GET /regions","href":"/api/endpoints/get-all-regions"},{"title":"Get Region Details","openapi":"GET /regions/{id}","href":"/api/endpoints/get-region-details"},{"title":"Get Subregions by Region","openapi":"GET /regions/{id}/subregions","href":"/api/endpoints/get-subregions-by-region"},{"title":"Get Subregion Details","openapi":"GET /subregions/{id}","href":"/api/endpoints/get-subregion-details"},{"title":"Get Countries by Subregion","openapi":"GET /subregions/{id}/countries","href":"/api/endpoints/get-countries-by-subregion"}]},{"group":"Timezones","icon":"clock","pages":[{"title":"Get Timezone by Country","openapi":"GET /timezone/{ciso}","href":"/api/endpoints/get-timezone-by-country"},{"title":"Get Timezone by State","openapi":"GET /timezone/{ciso}/{siso}","href":"/api/endpoints/get-timezone-by-state"},{"title":"Get Timezone by City","openapi":"GET /timezone/{ciso}/{siso}/{city_id}","href":"/api/endpoints/get-timezone-by-city"}]},{"group":"Currencies","icon":"coins","pages":[{"title":"List All Currencies","openapi":"GET /currency","href":"/api/endpoints/list-all-currencies"},{"title":"Get Currency by Country","openapi":"GET /currency/{ciso}","href":"/api/endpoints/get-currency-by-country"}]},{"group":"Phone","icon":"phone","pages":[{"title":"List Dial Codes","openapi":"GET /phone","description":"List every country's international dial code, with optional reverse lookup by dial code","href":"/api/endpoints/list-dial-codes"},{"title":"Get Dial Code by Country","openapi":"GET /phone/{ciso}","href":"/api/endpoints/get-dial-code-by-country"},{"title":"Parse Phone Number","openapi":"GET /phone/parse","description":"Parse an E.164 phone number into its country and national parts","href":"/api/endpoints/parse-phone-number"}]},{"group":"ISO Codes","icon":"hashtag","pages":[{"title":"Lookup Country by ISO Code","openapi":"GET /iso/country","href":"/api/endpoints/lookup-country-by-iso"},{"title":"Lookup State by ISO Code","openapi":"GET /iso/state","href":"/api/endpoints/lookup-state-by-iso"},{"title":"Convert ISO Code","openapi":"GET /iso/country/convert","href":"/api/endpoints/convert-iso-code"}]},{"group":"Search","icon":"magnifying-glass","pages":[{"title":"Fuzzy Search","openapi":"GET /search/fuzzy","href":"/api/endpoints/fuzzy-search"},{"title":"Autocomplete","openapi":"GET /search/autocomplete","href":"/api/endpoints/get-search-autocomplete"},{"title":"Nearby Search","openapi":"GET /search/nearby","href":"/api/endpoints/get-search-nearby"}]},{"group":"Data Changes","icon":"code-compare","pages":[{"title":"Data Change Feed","openapi":"GET /changes","href":"/api/endpoints/get-data-changes"}]},{"group":"GraphQL API","icon":"diagram-project","pages":[{"title":"GraphQL API","api":"POST https://api.countrystatecity.in/v1/graphql","href":"/api/graphql"}]},{"group":"Meta","icon":"circle-info","pages":[{"title":"Get Data Version","openapi":"GET /meta/data-version","href":"/api/endpoints/get-data-version"}]}]},{"tab":"Tools","pages":[{"title":"Tools","href":"/tools/overview"}]},{"tab":"Database","pages":[{"title":"Database","href":"/database/overview"}]}]},"basePath":"","title":"Get Dial Code by Country - Country State City Documentation","deploymentId":"dpl_HhUetB7eHHDAmK9T1Teip38TgFx9","buildId":"dpl_HhUetB7eHHDAmK9T1Teip38TgFx9","dynamics":["10e4515597","c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["BannerMarkdown-BjdIPj1P.js","dist-C5gjFYHe.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","katex-YMM-FMeD.js","html-void-elements-mCSPHezU.js","marked.esm-CZWythHk.js","OpenApiReferenceProvider-jJHA3WSo.js","utils-DbZn3Mjn.js","cloneDeep-CnBnaSyy.js","_Uint8Array-CMQtTgBR.js","isObject-FP1Yky1u.js","utils-Bl2DvzOJ.js","addUniqueKeysToSchema-BwOLo9p1.js","snippetPresets-BBiPpKa-.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","conditional-requirements-CFM0id0Q.js","ApiExamples-C0px4Tml.js","isEqual-zAyttAAO.js","usePlaygroundInputsStore-Dell6dGw.js","shallow-0VKqkSqN.js","getApiPlaygroundDisplay-CP_ctPEB.js","CodeSnippet-5L35ic0s.js","CodeSnippets-DOXbNhJw.js","Page-DRLI_2Ue.js","getPastedJson-VhzT9m2P.js","icon-CD8_AtCO.js","MethodPill-DGgOMftG.js","DuplicateIcon-DZ6A_EtN.js","createIcon-DUl4oM5f.js","DynamicMarkdown-BGHukeRM.js","SectionHeading-ChrEUs8u.js","axios-vUo_bRtp.js","Markdown-Dj-na-_-.js","AssistantPageLink-DEBW87tT.js"]}