The method find_places returns a list of places that matched the value parameter.The value can match with the place’s name, or description.Once you have the IDs, you can use them to filter your search queries with an Entity query filter.
Copy
Ask AI
from dotenv import load_dotenvfrom bigdata_client import Bigdataimport osload_dotenv()# Initialize the Bigdata APIusername = os.environ.get("BIGDATA_USERNAME")password = os.environ.get("BIGDATA_PASSWORD")bigdata = Bigdata(username, password)results = bigdata.knowledge_graph.find_places("Spain")for place in results: print(f"Entity ID: {place.id}") print(f"Name: {place.name}") print(f"Description: {place.description}\n")
Output:
Copy
Ask AI
Entity ID: 986F1AName: SpainDescription: The Kingdom of Spain is a country located in southwestern Europe on the Iberian Peninsula.Entity ID: 99ED7CName: Port of SpainDescription: Port of Spain, is the capital city of Trinidad and Tobago, located on the northwest coast of the island of Trinidad....