Default search mode optimized for speed, returning results in ~1 second.
Fast search is the default mode. It returns results in approximately 1 second, making it suitable for real-time applications and high-volume workloads.
data = response.json()# Check what type of results came backprint(data["results_type"]) # e.g., "news", "search", "images"# Access resultsfor result in data["results"]: print(result["title"], result["link"])# Check performanceprint(f"Returned {data['metrics']['results_returned']} results in {data['metrics']['duration']}ms")
Adding extracts and metadata
Get richer data from each result:
# Text extracts from result pagescurl "https://search-api.andisearch.com/api/v1/search?q=latest+AI+news&extracts=true" \ -H "x-api-key: YOUR_API_KEY"# Full metadata including content type and reader datacurl "https://search-api.andisearch.com/api/v1/search?q=latest+AI+news&metadata=full" \ -H "x-api-key: YOUR_API_KEY"# Markdown format for passing to LLMscurl "https://search-api.andisearch.com/api/v1/search?q=latest+AI+news&format=context" \ -H "x-api-key: YOUR_API_KEY"
metadata=full adds latency because it fetches additional data from each result page. Use metadata=basic (the default) unless you need contentType or reader data.