All URIs are relative to https://api.unifapi.com
| Method | HTTP request | Description |
|---|---|---|
| localSearchPost | POST /local/search | Search Local Finder |
LocalSearchPost200Response localSearchPost(localFinderRequest)
Search Local Finder
Run one live Local Finder search — the expanded local-pack listing — and receive ranked local places for a query, including title, address, rating, phone, and booking links.
// Import classes:
import com.unifapi.sdk.ApiClient;
import com.unifapi.sdk.ApiException;
import com.unifapi.sdk.Configuration;
import com.unifapi.sdk.auth.*;
import com.unifapi.sdk.models.*;
import com.unifapi.sdk.api.LocalApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.unifapi.com");
// Configure HTTP bearer authorization: bearerAuth
HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
bearerAuth.setBearerToken("BEARER TOKEN");
LocalApi apiInstance = new LocalApi(defaultClient);
LocalFinderRequest localFinderRequest = new LocalFinderRequest(); // LocalFinderRequest |
try {
LocalSearchPost200Response result = apiInstance.localSearchPost(localFinderRequest);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling LocalApi#localSearchPost");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| localFinderRequest | LocalFinderRequest | [optional] |
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
| 400 | Validation or invalid-id error | - |
| 401 | Missing, invalid, disabled, revoked, or expired UnifAPI API key | - |
| 402 | Insufficient workspace credits | - |
| 404 | Resource not found | - |
| 429 | Rate limited | - |
| 500 | Internal error | - |
| 502 | Source error | - |
| 503 | Source unavailable | - |