# Configuring IP2Location Database

## Content



Visitor API has built-in provider to find visitor's location based on their IP Address.

To configure the IP2Location Database, you need add the following code to the Startup.cs file in your Web API application.

```csharp
public void ConfigureServices(IServiceCollection services)
{
    // ...     
    services.ConfigureVisitor(builder =>
    {
        builder.UseIp2Location(*ip2LocationConnectionString*);
    });
}
```

As shown in the code above, Visitor API requires a ConnectionString to the Ip2Location database. It works with [ip-country-region-city-latitude-longitude-zipcode-timezone](https://lite.ip2location.com/database/ip-country-region-city-latitude-longitude-zipcode-timezone) database and MS SQL server. You can easily set up the database by following their instructions.


> type=note
> **Note**: The LITE edition is an open-source version of database with limited accuracy & number of records compares to commercial release. It is free for personal or commercial use with attribution required by mentioning the use of this data as follows:<br />This product includes IP2Location LITE data available from [IP2Location](https://lite.ip2location.com/ip2location-lite).