Hi Brave Devs,
I’m trying to use the Brave AI Grounding API via curl
to get answers with all the source links included. While the API returns the answer text correctly, there are no sources attached—neither in a separate grounding.sources
array nor inside the text via <citation>
tags.
I tested using enable_research
and enable_citations
, in all combinations. When I specifically ask for sources, I sometimes get them at the end of the text, but not in a consistent format.
Here’s an example request I tried:
curl -X POST "https://api.search.brave.com/res/v1/chat/completions" \
-H "accept: application/json" \
-H "Content-Type: application/json" \
-H "x-subscription-token: $BRAVE_API_KEY" \
-d '{
"stream": false,
"messages": [
{"role": "user", "content": "What is Trade Republic? Please provide your sources."}
],
"extra_body": {"enable_citations": true}
}'
Response snippet:
{
"model": "brave-pro",
"system_fingerprint": "",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "Trade Republic Bank GmbH is a German online broker and neobank headquartered in Berlin.
Founded in 2015 in Munich as Neon Trading within the startup incubator of Comdirect Bank,
the company was established by Christian Hecker (a philosopher), Thomas Pischke (a physicist),
and Marco Cancellieri (a computer scientist). It rebranded to Trade Republic and launched its mobile trading app in Germany in 2019,
initially for a closed user group before expanding to the general public.\n\nThe platform allows users to trade stocks, bonds, derivatives,
and cryptocurrencies commission-free via a mobile application. As of January 2025, Trade Republic reported eight million customers and
€100 billion in assets under management (AUM). The company serves customers across multiple European countries, including Germany, Austria,
France, Spain, and others.\n\nTrade Republic received a full banking license from Germany’s Federal Financial Supervisory Authority (BaFin)
at the end of 2023, enabling it to offer broader financial services. It began paying interest on cash deposits in January 2023 and launched
its own payment card in 2024. The broker introduced fractional share trading in October 2022, allowing customers to invest in stocks and ETFs
starting at €1 per order.\n\nIn May 2021, Trade Republic raised $900 million in funding at a $5 billion valuation, followed by an additional
€250 million in 2022. The company employed approximately 1,100 people as of 2025, though it underwent layoffs in 2022 due to workforce overexpansion
and challenging market conditions.\n\nClient funds are held in omnibus trust accounts with major banks such as Deutsche Bank AG, J.P. Morgan SE, HSBC
Continental Europe S.A., and Citibank Europe plc.\n\nSources:\n- Wikipedia: [Trade Republic](https://en.wikipedia.org/wiki/Trade_Republic)\n-
PitchBook: [Trade Republic Company Profile](https://pitchbook.com/profiles/company/277451-74)\n- BrokerChooser: [Trade Republic Review 2025](https://brokerchooser.com/broker-reviews/trade-republic-review)"
},
"finish_reason": "stop"
}
],
"created": 1756128797,
"id": "someid",
"object": "chat.completion",
"usage": {
"completion_tokens": 466,
"prompt_tokens": 6265,
"total_tokens": 6731,
"completion_tokens_details": {
"reasoning_tokens": 0
}
}
}
As you can see, sources appear sometimes at the end of the text, but there is no consistent structure or separate array returned.
Could you clarify:
-
Is this expected behavior?
-
Am I missing any parameters to reliably get a structured
sources
array for every request?
Btw also tested using the provided python script from Documentation. Same results.
Thanks in advance for your help!