Chapters · Quick start

Quick start

An API key created in Webmaster Tools is required for machine-search routes. Keep it server-side in an environment variable; never commit its value.

curl --fail-with-body \
  -H "Authorization: Bearer $BANQUISE_API_KEY" \
  "https://www.banquise.ca/api/v1/search?q=library+Moncton&language=en&limit=10"

For an agent, prefer context: the response is bounded, sourced and ready to cite.

curl --fail-with-body -X POST \
  -H "Authorization: Bearer $BANQUISE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query":"technology grants in New Brunswick",
       "max_tokens":2000,"province":"NB","source_type":"government"}' \
  https://www.banquise.ca/api/v1/context