Request and Response

This page provides a detailed breakdown of the data returned by the IP Location API, helping you understand the nesting and data types of various attributes. Especially within the location object.

Request

Headers

  • apikey: Required in header or body.
  • Content-Type: Must be application/json.

Body

{
  "apiKey": "your-api-key-here",
  "ip": "101.49.50.12"
}

Response

200 OK

Successful response with location information.

AttributeTypeDescriptionExample
errorbooleanIndicates if there was an error.false
errorMessagestringError message if any.null
ipstringThe IP address queried.101.49.50.12
locationobjectContains the detailed information about the IP location.

200 OK Location Object Attributes

AttributeTypeDescriptionExample
city.namestringCity name.Changzhou
city.nameTranslations.destringGerman translation.Changzhou
city.nameTranslations.esstringSpanish translation.Changzhou
city.nameTranslations.fastringPersian translation.چانگژو
city.nameTranslations.frstringFrench translation.Changzhou
city.nameTranslations.jastringJapanese translation.常州市
city.nameTranslations.kostringKorean translation.창저우 시
city.nameTranslations.pt-BRstringBrazilian Portuguese translation.Changzhou
city.nameTranslations.rustringRussian translation.Чанчжоу
city.nameTranslations.zh-CNstringSimplified Chinese translation.常州
continent.iso2CodestringContinent ISO 2 code.AS
continent.namestringContinent name.Asia
continent.nameTranslations.destringGerman translation.Asien
continent.nameTranslations.esstringSpanish translation.Asia
continent.nameTranslations.fastringPersian translation.آسیا
continent.nameTranslations.frstringFrench translation.Asie
continent.nameTranslations.jastringJapanese translation.アジア大陸
continent.nameTranslations.kostringKorean translation.아시아
continent.nameTranslations.pt-BRstringBrazilian Portuguese translation.Ásia
continent.nameTranslations.rustringRussian translation.Азия
continent.nameTranslations.zh-CNstringSimplified Chinese translation.亚洲
country.callingCodestringCountry calling code.+8
country.capitalstringCountry capital.Beijing
country.currencies.codestringCurrency code.CNY
country.currencies.namestringCurrency name.Chinese yuan
country.currencies.symbolstringCurrency symbol.¥
country.europeanUnionMemberbooleanIs the country an EU member.false
country.flag.descriptionstringDescription of the flag.The flag of China has a red field. In the canton are five yellow five-pointed stars — a large star and four smaller stars arranged in a vertical arc on the fly side of the large star.
country.flag.emojistringFlag emoji.🇨🇳
country.flag.svgstringURL to SVG image of the flag.https://flagcdn.com/cn.svg
country.independentbooleanIs the country independent.true
country.iso2CodestringCountry ISO 2 code.CN
country.namestringCountry name.China
country.nameTranslations.destringGerman translation.China, Volksrepublik
country.nameTranslations.esstringSpanish translation.China
country.nameTranslations.fastringPersian translation.چین
country.nameTranslations.frstringFrench translation.Chine
country.nameTranslations.jastringJapanese translation.中国
country.nameTranslations.kostringKorean translation.중국
country.nameTranslations.pt-BRstringBrazilian Portuguese translation.China
country.nameTranslations.rustringRussian translation.Китай
country.nameTranslations.zh-CNstringSimplified Chinese translation.中国
country.populationintegerCountry population.1402112000
country.timeZonesarrayArray of time zone strings.UTC+08:00
country.tldarrayArray of top-level domain strings..cn
country.unitedNationsMemberbooleanIs the country a UN member.true
coordinates.latitudenumberLatitude of the location.31.8107
coordinates.longitudenumberLongitude of the location.119.974
network.connectionTypestringType of connection.Corporate
network.ispstringInternet Service Provider.BITCOMM
network.organizationstringOrganization name.ChangZhou Bitcomm Software Technology Co.
network.userTypestringType of user.business
postalCodestringPostal code.213000
stateOrProvince.iso2CodestringState or province ISO 2 code.JS
stateOrProvince.namestringState or province name.Jiangsu
stateOrProvince.nameTranslations.frstringFrench translation.Province de Jiangsu
stateOrProvince.nameTranslations.zh-CNstringSimplified Chinese translation.江苏
timeZonestringTime zone.Asia/Shanghai
weatherCodestringWeather code.CHXX0015

204 OK Result

AttributeTypeDescriptionExample
errorbooleanIndicates if there was an error.false
errorMessagestringError message.null
ipstringThe IP address queried.101.49.50.12
locationobjectThe search was completed successfully, but no results were found.{}

400 Bad Request

AttributeTypeDescriptionExample
errorbooleanIndicates if there was an error.true
errorMessagestringError message.Invalid or missing apiKey parameter.

401 Forbidden

AttributeTypeDescriptionExample
errorbooleanIndicates if there was an error.true
errorMessagestringError message.Invalid apiKey parameter.

415 Unsupported Content Type

AttributeTypeDescriptionExample
errorbooleanIndicates if there was an error.true
errorMessagestringError message.Content-Type must be application/json.

429 Requests per Month Exceeded

AttributeTypeDescriptionExample
errorbooleanIndicates if there was an error.true
errorMessagestringError message.API limit exceeded. Please upgrade your plan through the Dashboard.

500 Internal Server Error

AttributeTypeDescriptionExample
errorbooleanIndicates if there was an error.true
errorMessagestringError message.Internal Server Error.

Get Started

FeaturesPricingStart a Free Trial
IP Location API Logo

© 2024 IP Location API, LLC. All rights reserved.