Quickstart
Introduction
Section titled “Introduction”Welcome to the Quickstart Guide for integrating comprehensive, high-quality answers with precise and reliable citations using our Smart, Research, and Search APIs. This guide will walk you through the initial setup and provide you with sample code to perform searches and retrieve results.
Step 1: Set Up Your API Key
Section titled “Step 1: Set Up Your API Key”Replace X-API-Key in the code with your actual API key:
YOUR_API_KEY = "your_actual_api_key_here"Step 2: Write the Search Function
Section titled “Step 2: Write the Search Function”Create a function to interact with the Research API:
import requests
def get_smart_results(query):headers = {"X-API-Key": YOUR_API_KEY}params = {"query": query, "instructions": instructions}return requests.get("https://chat-api.you.com/smart?query={query}",params=params,headers=headers,).json()import requests
def get_research_results(query):headers = {"X-API-Key": YOUR_API_KEY}params = {"query": query}return requests.get("https://chat-api.you.com/research?query={query}",params=params,headers=headers,).json()import requests
def get_search_results(query):headers = {"X-API-Key": YOUR_API_KEY}params = {"query": query}return requests.get("https://api.ydc-index.io/search?query={query}",params=params,headers=headers,).json()