> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://docs.ntropy.com/documentation/api/entities/search-entity-v-3-entities-resolve-post/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.ntropy.com/_mcp/server. # Resolves an entity POST https://api.ntropy.com/v3/entities/resolve Content-Type: application/json Resolves a query into an entity by querying our entity resolution system. The parameters `name` and `website` are mutually exclusive. Calls to this endpoint using the `name` parameter are billed the same way transactions are. Reference: https://docs.ntropy.com/documentation/api/entities/search-entity-v-3-entities-resolve-post ## Authentication - `X-Api-Key` header (required) — API Key authentication via header ## Request ### Body (application/json) This endpoint expects an EntityQuery. - `name` (string, optional, nullable) — The name of the entity to resolve - `website` (string, optional, nullable) — The website of the entity to resolve - `location` (string, optional, nullable) — An unstructured location string of the entity to resolve ## Response ### 200 Entity - `id` (string, optional, nullable) — The unique UUID identifier of the entity - `name` (string, optional, nullable) — The name of the entity - `website` (string, optional, nullable) — The website URL of the entity - `phone_number` (string, optional, nullable) — The phone number of the entity. This is a premium feature, please contact support to enable it. - `tax_number` (string, optional, nullable) — The tax number of the entity. This is a premium feature, please contact support to enable it. - `naics2017` (string, optional, nullable) — The 2017 NAICS code of the entity. This is a premium feature, please contact support to enable it. - `logo` (string, optional, nullable) — Logo's URL - `mccs` (list of integer, optional) — A list of [Merchant Category Codes](https://en.wikipedia.org/wiki/Merchant_category_code) - `parent` (EntityParent, optional, nullable) — The parent entity - `location` (Location, optional, nullable) ## Errors ### 400 Bad Request Error Bad request. - `any` ### 422 Unprocessable Entity Error Validation Error - `detail` (list of ValidationError, optional) ### 423 Locked Error Not enough credits. - `any` ## Types ### EntityParent - `id` (string, optional, nullable) — The unique UUID identifier of the entity - `name` (string, optional, nullable) — The name of the entity - `website` (string, optional, nullable) — The website URL of the entity - `phone_number` (string, optional, nullable) — The phone number of the entity. This is a premium feature, please contact support to enable it. - `tax_number` (string, optional, nullable) — The tax number of the entity. This is a premium feature, please contact support to enable it. - `naics2017` (string, optional, nullable) — The 2017 NAICS code of the entity. This is a premium feature, please contact support to enable it. ### Location - `raw_address` (string, optional, nullable) — An unstructured string containing the address - `structured` (LocationStructured, optional, nullable) — When raw is set, a structured representation of it. ### ValidationError - `loc` (list of ValidationErrorLocItems, required) - `msg` (string, required) - `type` (string, required) ### LocationStructured - `street` (string, optional, nullable) — The street name of the location - `city` (string, optional, nullable) — The city where the location is situated - `state` (string, optional, nullable) — The state or region of the location - `postcode` (string, optional, nullable) — The postal code or ZIP code of the location - `country_code` (string, optional, nullable) — The country code of the location in ISO 3166-2 format - `country` (string, optional, nullable) — The full name of the country - `house_number` (string, optional, nullable) — The house number if, applicable - `latitude` (double, optional, nullable) — The latitude coordinate of the location - `longitude` (double, optional, nullable) — The longitude coordinate of the location - `google_maps_url` (string, optional, nullable) — A URL link to view the location on Google Maps - `apple_maps_url` (string, optional, nullable) — A URL link to view the location on Apple Maps - `store_number` (string, optional, nullable) — A unique identifier for a specific store or branch, if applicable ### ValidationErrorLocItems ## Examples **Request** ```json {} ``` **Response** ```json { "id": "d4bc3c80-ec1a-3da2-836e-2a4ca4758be5", "name": "Starbucks", "website": "starbucks.com", "phone_number": "+1 4153753176", "tax_number": "80-0429876", "naics2017": "541519", "logo": "https://logos.ntropy.com/starbucks.com", "mccs": [ 5814 ] } ``` **SDK Code** ```python Python SDK from ntropy_sdk import SDK sdk = SDK("cd1H...Wmhl") entity = sdk.entities.resolve(name="Starbucks") ``` ```javascript const url = 'https://api.ntropy.com/v3/entities/resolve'; const options = { method: 'POST', headers: {'X-Api-Key': '', 'Content-Type': 'application/json'}, body: '{}' }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.ntropy.com/v3/entities/resolve" payload := strings.NewReader("{}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("X-Api-Key", "") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby require 'uri' require 'net/http' url = URI("https://api.ntropy.com/v3/entities/resolve") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["X-Api-Key"] = '' request["Content-Type"] = 'application/json' request.body = "{}" response = http.request(request) puts response.read_body ``` ```java import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.post("https://api.ntropy.com/v3/entities/resolve") .header("X-Api-Key", "") .header("Content-Type", "application/json") .body("{}") .asString(); ``` ```php request('POST', 'https://api.ntropy.com/v3/entities/resolve', [ 'body' => '{}', 'headers' => [ 'Content-Type' => 'application/json', 'X-Api-Key' => '', ], ]); echo $response->getBody(); ``` ```csharp using RestSharp; var client = new RestClient("https://api.ntropy.com/v3/entities/resolve"); var request = new RestRequest(Method.POST); request.AddHeader("X-Api-Key", ""); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "{}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift import Foundation let headers = [ "X-Api-Key": "", "Content-Type": "application/json" ] let parameters = [] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "https://api.ntropy.com/v3/entities/resolve")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "POST" request.allHTTPHeaderFields = headers request.httpBody = postData as Data let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ```