Location:

IP Positioning

Service Introduction

Returns the user's approximate location information (city level) based on the IP address entered by the user.

Interface address

https://lbs.navinfo.com/open-api/position/v1/ip

Request method

GET

Request parameters

IP positioning instructions please see the table below:

ParameterTypeMeaningRequiredDefaultRemarks

ak

string

Developer Key

Yes

If there is no key, please apply

guid

string

device id

No

ip

string

ip address

No

If ip is empty, get the ip in the user's http request to locate

Response data

Return ValueTypeMeaningRemarks

status

int

Return status

Refer to the status code table

msg

string

Back status description

Refer to the status code table

data

object

return results

prov

string

Province

If it is a municipality, display the name of the municipality

city

string

City

adcode

string

City Code

Service example

ParameterValueTypeMeaningRequiredRemarks

ak

your ak

string

developer key

Yes

Click to apply

guid

string

device id

No

ip

string

ip address

No

If ip is empty, get the ip in the user http request to locate

TOP