# Web Search API - url\_citations not coming through

**URL:** <https://community.openai.com/t/web-search-api-url-citations-not-coming-through/1145410>\
**Category:** API\
**Tags:** gpt-4, web-search\
**Created:** [March 17, 2025, 5:57pm UTC](https://community.openai.com/t/web-search-api-url-citations-not-coming-through/1145410 "2025-03-17T17:57:43Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![moog](https://avatars.discourse-cdn.com/v4/letter/m/7ea924/32.png) [@moog](https://community.openai.com/u/moog)\
**Post date:** [March 17, 2025, 5:57pm UTC](https://community.openai.com/t/web-search-api-url-citations-not-coming-through/1145410/1 "2025-03-17T17:57:43Z")

</div>

In the example code below

{  
“model”: “gpt-4o”,  
“tools”: [  
{  
“type”: “web\_search\_preview”,  
“search\_context\_size”: “high”  
}  
],  
“input”: “What is the best VPN for security?”  
}

Should url\_citations always be generated? I’m not getting any results back.

---

<div class="post-metadata">

**Author:** ![keith12](https://avatars.discourse-cdn.com/v4/letter/k/a587f6/32.png) [@keith12](https://community.openai.com/u/keith12)\
**Post date:** [July 17, 2025, 1:37pm UTC](https://community.openai.com/t/web-search-api-url-citations-not-coming-through/1145410/2 "2025-07-17T13:37:34Z")

</div>

Same issue here. The response text shows there is a web search citation (e.g. \ue200cite\ue202turn0search0\ue201), but the ResponseFunctionWebSearch object does not provide the actual citation.

---

<div class="post-metadata">

**Author:** ![Foxalabs](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/foxalabs/32/738355_2.png) [@Foxalabs](https://community.openai.com/u/Foxalabs)\
**Post date:** [July 17, 2025, 1:47pm UTC](https://community.openai.com/t/web-search-api-url-citations-not-coming-through/1145410/3 "2025-07-17T13:47:07Z")

</div>

Do you get the url citations if you change the prompt to “Search for the best VPN for security”?

---

<div class="post-metadata">

**Author:** ![keith12](https://avatars.discourse-cdn.com/v4/letter/k/a587f6/32.png) [@keith12](https://community.openai.com/u/keith12)\
**Post date:** [July 17, 2025, 2:11pm UTC](https://community.openai.com/t/web-search-api-url-citations-not-coming-through/1145410/4 "2025-07-17T14:11:42Z")

</div>

Actually, for my request, the lack of annotations is due the structured output. Either

```auto
client.responses.create(
    model="o3",
    tools=[{"type": "web_search"}],
    input=prompt,
    text = {
        "format": {
            "type": "json_schema",
            "name": "ResponseObj",
            "strict": True,
            "schema": schema
        },
    },
)

```

or the preferred

```auto
client.responses.parse(
    model="o3",
    tools=[{"type": "web_search"}],
    input=prompt,
    text_format=ResponseObj
)

```

will give an empty list for the annotations in the response. This request

```auto
client.responses.create(
    model="o3",
    tools=[{"type": "web_search"}],
    input=prompt,
)

```

actually returns the expected annotation list, but no structured output!!

---

<div class="post-metadata">

**Author:** ![cjpwood](https://avatars.discourse-cdn.com/v4/letter/c/7ba0ec/32.png) [@cjpwood](https://community.openai.com/u/cjpwood)\
**Post date:** [July 30, 2025, 5:07pm UTC](https://community.openai.com/t/web-search-api-url-citations-not-coming-through/1145410/5 "2025-07-30T17:07:41Z")

</div>

I’m having the same problem, tried a bunch of prompts, response formats and models…if i run all the same paramaters 10 times 1 out of the ten will contain annotations, they will all have a webSearchId.

frustrating…

---

<div class="post-metadata">

**Author:** ![Camden\_Parker](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/camden_parker/32/515470_2.png) [@Camden\_Parker](https://community.openai.com/u/Camden_Parker)\
**Post date:** [October 22, 2025, 4:23pm UTC](https://community.openai.com/t/web-search-api-url-citations-not-coming-through/1145410/6 "2025-10-22T16:23:56Z")

</div>

Same issue as others have discussed. This does not seem unique to the OpenAi api. I had the same problem with the Gemini API. In either case atm, you cannot eat your cake and have it to. I imagine they are using structured-output-functionality under to hood already to produce the annotation array, and so asking for your own structured output on top of it overwrites this structure.

The best solution I have found is to include an annotations array in the schema you define. I don’t really trust the output without a bunch of manual verification as I have seen sources be hallucinated, which really slows development down. The whole point of the annotations array imo is to have an easy way corroborate your output in the first place. You’d think there’d be more crossover between users requiring structured output for agentic applications and those wanting their responses to be ground-truthed.

Can someone at OpenAI fix this please? In the meantime I guess I will try Claude or X or someone else.

---

<div class="post-metadata">

**Author:** ![granaker](https://avatars.discourse-cdn.com/v4/letter/g/59ef9b/32.png) [@granaker](https://community.openai.com/u/granaker)\
**Post date:** [December 15, 2025, 9:55am UTC](https://community.openai.com/t/web-search-api-url-citations-not-coming-through/1145410/7 "2025-12-15T09:55:34Z")

</div>

+1

I’m seeing the same thing, annotations break when combining web\_search with structured outputs.

Would be great with a comment from OpenAI on this.
