> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tinyfish.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# TinyAnswer Examples

> Examples for current facts, company information, and citations

Set `TINYFISH_API_KEY` before running these examples. TinyAnswer must be enabled for your personal account. See the [overview](https://docs.tinyfish.ai/tinyanswer.md) for Python and TypeScript setup and your first request.

## Look Up a Current Fact

Ask a focused question and inspect the cited sources before relying on a time-sensitive answer.

```bash cURL theme={null}
curl -X POST https://api.answer.tinyfish.ai/ \
  -H "X-API-Key: $TINYFISH_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"question": "Who is the current CEO of Stripe?"}'
```

## Find Company Information

Include the company name and the fact you need. The response contains answer text and its cited sources; it does not guarantee a particular output structure inside `answer`.

```bash cURL theme={null}
curl -X POST https://api.answer.tinyfish.ai/ \
  -H "X-API-Key: $TINYFISH_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"question": "What does Deel do, and where is it headquartered?"}'
```

## Display the Answer and Sources

This Python example requires `pip install httpx`. It prints each source next to the `[n]` marker that cites it. Citation titles can be `null`, and the citation list can be empty.

```python Python theme={null}
import os
import httpx

response = httpx.post(
    "https://api.answer.tinyfish.ai/",
    headers={"X-API-Key": os.environ["TINYFISH_API_KEY"]},
    json={"question": "What products does Stripe offer for subscription billing?"},
    timeout=70,
)
response.raise_for_status()
result = response.json()
print(result["answer"])
for n, citation in enumerate(result["citations"], start=1):
    print(f"[{n}] {citation['title'] or citation['url']}: {citation['url']}")
```

For error handling and retry guidance, see the [API reference](https://docs.tinyfish.ai/api-reference/answer-a-question.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.