Skip to content

Latest commit

 

History

History
96 lines (67 loc) · 3.14 KB

File metadata and controls

96 lines (67 loc) · 3.14 KB

unifapi.LocalApi

All URIs are relative to https://api.unifapi.com

Method HTTP request Description
local_search_post POST /local/search Search Local Finder

local_search_post

LocalSearchPost200Response local_search_post(local_finder_request=local_finder_request)

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.

Example

  • Bearer Authentication (bearerAuth):
import unifapi
from unifapi.models.local_finder_request import LocalFinderRequest
from unifapi.models.local_search_post200_response import LocalSearchPost200Response
from unifapi.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.unifapi.com
# See configuration.py for a list of all supported configuration parameters.
configuration = unifapi.Configuration(
    host = "https://api.unifapi.com"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure Bearer authorization: bearerAuth
configuration = unifapi.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with unifapi.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = unifapi.LocalApi(api_client)
    local_finder_request = unifapi.LocalFinderRequest() # LocalFinderRequest |  (optional)

    try:
        # Search Local Finder
        api_response = api_instance.local_search_post(local_finder_request=local_finder_request)
        print("The response of LocalApi->local_search_post:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling LocalApi->local_search_post: %s\n" % e)

Parameters

Name Type Description Notes
local_finder_request LocalFinderRequest [optional]

Return type

LocalSearchPost200Response

Authorization

bearerAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

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 -

[Back to top] [Back to API list] [Back to Model list] [Back to README]