# Image\_domain\_filter not being respected in sonar / sonar-pro api requests (also returning junk images)

**URL:** <https://community.perplexity.ai/t/image-domain-filter-not-being-respected-in-sonar-sonar-pro-api-requests-also-returning-junk-images/5580>\
**Category:** Bug Reports\
**Tags:** sonar-api\
**Created:** [July 14, 2026, 3:51pm UTC](https://community.perplexity.ai/t/image-domain-filter-not-being-respected-in-sonar-sonar-pro-api-requests-also-returning-junk-images/5580 "2026-07-14T15:51:41Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![tommy](https://sea1.discourse-cdn.com/flex001/user_avatar/community.perplexity.ai/tommy/32/3334_2.png) [@tommy](https://community.perplexity.ai/u/tommy)\
**Post date:** [July 14, 2026, 3:51pm UTC](https://community.perplexity.ai/t/image-domain-filter-not-being-respected-in-sonar-sonar-pro-api-requests-also-returning-junk-images/5580/1 "2026-07-14T15:51:41Z")

</div>

## Pre-flight checklist

- This is about the Perplexity API, not the Perplexity app, Comet, or web UI.
- I have removed API keys, secrets, and private data.
- I have included enough information for someone else to reproduce the issue.

## Bug type

- Error response or failed request
- Incorrect or unexpected model output
- Missing, invalid, or stale citations/search results
- Streaming issue
- Structured output or JSON schema issue
- SDK issue
- Billing, credits, or rate limit issue
- Dashboard, API key, or auth issue
- Other API bug

## Affected API area

- Agent API
- Search API
- Sonar API
- Embeddings API
- SDKs
- Dashboard, API keys, or auth
- Billing or credits
- Not sure

## Summary

We started noticing that some of our searches were returning junk image results for searches that worked well before. In this example, a search for a specific hotel is returning what look to be screenshots of github repos and other random unrelated images.

As a quick fix we tried adding those image url origins to the image\_domain\_filter, but got the same results.

## Expected behavior

1. Searching for a specific hotel with “return\_images”: true on sonar returns images of the hotel.
2. Searching with image\_domain\_filter (exclusion syntax) excludes results from the specified domains. E.g. “image\_domain\_filter”: [“-github.com”, “-githubassets.com”] excludes images from the [githubassets.com](http://githubassets.com) and [github.com](http://github.com) domains

## Actual behavior

1. Searching for a specific hotel with “return\_images”: true on sonar returns random junk
2. image\_domain\_filter not respected and images from filtered out domains are still returned.

Example image:

 ![image](https://us1.discourse-cdn.com/flex001/uploads/sonar1/original/2X/e/ee7b6ec3529c3d64c4438bc5cb08fde6fdaf93e9.png)

## Minimal reproduction

{  
“model”: “sonar-pro”,  
“return\_images”: true,  
“image\_domain\_filter”: [  
“-gettyimages.com”,  
“-shutterstock.com”,  
“-istockphoto.com”,  
“-pinterest.com”,  
“-github.com”,  
“-stormposter.com”,  
“-imgv2-2-f.scribdassets.com”,  
“-scribdassets.com”,  
“-opengraph.githubassets.com”,  
“-githubassets.com”,  
“-scribd.com”  
],  
“image\_format\_filter”: [  
“jpeg”,  
“png”,  
“webp”  
],  
“messages”: [  
{  
“role”: “user”,  
“content”: “Find 3 photos of name in Isla Mujeres, Mexico. The image should clearly show the real Lodging, not code, menus, or unrelated graphics.\n\nFill the JSON fields for this Lodging with clean, itinerary-ready values only.\n\nCRITICAL — every value must be a direct fact suitable for a database field:\n- No citation markers, footnotes, or bracketed reference numbers (e.g. [1], [2]).\n- No meta or conversational text: do not explain search limits, uncertainty, or alternatives (e.g. “not available”, “no match found”, “based on sources”, “known locations are”).\n- If you cannot verify a value for this exact entity in context, use an empty string for that field—never a sentence about why it is missing.\n- Use the shape each field implies: short labels or standard formats (single-line place strings, dates/times as the schema expects, compact identifiers)—not paragraphs, price lists, or marketing copy unless the field clearly requires a longer text.\n\nBe accurate. Do not fabricate. Do not add prose outside the required JSON structure.\n”  
}  
],  
“response\_format”: {  
“type”: “json\_schema”,  
“json\_schema”: {  
“name”: “entity\_lookup\_lodging”,  
“schema”: {  
“type”: “object”,  
“required”: [  
“lodging”  
],  
“properties”: {  
“lodging”: {  
“type”: “object”,  
“properties”: {  
“property\_name”: {  
“type”: “string”,  
“description”: “name of the hotel or lodging property”  
},  
“property\_address\_street”: {  
“type”: “string”,  
“description”: “street portion of the address of the property”  
},  
“property\_address\_city”: {  
“type”: “string”,  
“description”: “city portion of the address of the property”  
},  
“property\_address\_country”: {  
“type”: “string”,  
“description”: “country portion of the address of the property”  
},  
“description”: {  
“type”: “string”,  
“description”: “factual summary of around 4 sentences in length, suitable for a description of the entity in an itinerary.”  
}  
},  
“additionalProperties”: false  
}  
},  
“additionalProperties”: false  
}  
}  
}  
}

```bash

```

## Response or error

```json
{
  "name": "name",
  "location": "Isla Mujeres, Mexico",
  "entity_type": "lodging",
  "content": "{\"lodging\":{\"description\":\"\",\"property_address_city\":\"\",\"property_address_country\":\"\",\"property_address_street\":\"\",\"property_name\":\"\"}}",
  "images": [
    {
      "height": 1024,
      "image_url": "https://imgv2-2-f.scribdassets.com/img/document/1026883038/original/0e3356fdfa/1?v=1",
      "origin_url": "https://www.scribd.com/document/1026883038/Solution-Manual-for-Statistics-for-Managers-Using-Microsoft-Excel-8th-Edition-free-download",
      "title": "Solution Manual For Statistics For Managers Using Microsoft Excel 8th Edition | PDF | Pie Chart",
      "width": 768
    },
    {
      "height": 600,
      "image_url": "https://opengraph.githubassets.com/0967023206d04698ab7123a67520f5561f5ce7fe63502ca994458f8d24b807cb/SP2-MC2/Readability-Resources",
      "origin_url": "https://github.com/SP2-MC2/Readability-Resources/blob/master/cyberDictionary.txt",
      "title": "Readability-Resources/cyberDictionary.txt at master · SP2-MC2/Readability-Resources · GitHub",
      "width": 1200
    },
    {
      "height": 600,
      "image_url": "https://opengraph.githubassets.com/50a4898ca99091314df8edc54c10eb70ab02f393080048535302d455e4483aff/scrivna/PHP-Rake-IDF",
      "origin_url": "https://github.com/scrivna/PHP-Rake-IDF/blob/master/idf.json",
      "title": "PHP-Rake-IDF/idf.json at master · scrivna/PHP-Rake-IDF · GitHub",
      "width": 1200
    },
    {
      "height": 356,
      "image_url": "https://screenshots.scribd.com/Scribd/252_100_85/356/537503706/1.jpeg",
      "origin_url": "https://www.scribd.com/document/537503706/normal-60b3e4c68e855",
      "title": "Normal 60b3e4c68e855 | PDF | World Wide Web | Internet & Web",
      "width": 252
    },
    {
      "height": 198,
      "image_url": "https://imgv2-2-f.scribdassets.com/img/document/1026880085/149x198/f98d61d12d/1779783267?v=1",
      "origin_url": "https://www.scribd.com/document/1026883038/Solution-Manual-for-Statistics-for-Managers-Using-Microsoft-Excel-8th-Edition-free-download",
      "title": "Solution Manual For Statistics For Managers Using Microsoft Excel 8th Edition | PDF | Pie Chart",
      "width": 149
    }
  ],
  "citations": [
    "https://www.facebook.com/groups/6544751260/posts/10160532457096261/",
    "https://www.tripadvisor.com/Hotel_Review-g150810-d622600-Reviews-Ixchel_Beach_Hotel-Isla_Mujeres_Yucatan_Peninsula.html",
    "https://www.thehotelguru.com/en-us/best-hotels-in/mexico/isla-mujeres",
    "https://www.expedia.com/All-Isla-Mujeres-Hotels.d553248635654675306.Travel-Guide-City-All-Hotels",
    "https://www.tripadvisor.ca/Hotels-g150810-Isla_Mujeres_Yucatan_Peninsula-Hotels.html",
    "https://www.travelandleisure.com/how-to-visit-isla-mujeres-mexico-7559812",
    "https://www.youtube.com/watch?v=8RHWKSjW6mY",
    "https://www.booking.com/beach/city/mx/isla-mujeres.html",
    "https://www.travelocity.com/Isla-Mujeres-Hotels.d7925.Travel-Guide-Hotels",
    "https://www.ixchelbeachhotel.com/",
    "https://www.marriott.com/en-us/hotels/cunim-almare-a-luxury-collection-resort-isla-mujeres-cancun-adult-all-inclusive/overview/",
    "https://www.booking.com/city/mx/isla-mujeres.html",
    "https://www.expedia.com/Isla-Mujeres-Hotels.d7925.Travel-Guide-Hotels",
    "https://www.voyagemexique.info/en/where-to-stay-in-isla-mujeres/",
    "https://lacasadejardin.com/best-place-to-stay-in-isla-mujeres/"
  ],
  //....
}

```

## Request details

- Endpoint: completions
- Model or preset: sonar / sonar-pro (we tried both)
- SDK/language/version: http api
- Request ID: 2d3c62cf-8275-498b-a2e8-42066603c2fb
- Approximate time and timezone: Tue, 14 Jul 2026 15:21:27 GMT
- Consistent or intermittent: consistent today

## Additional context

---

<div class="post-metadata">

**Author:** ![Alex\_Romanov](https://sea1.discourse-cdn.com/flex001/user_avatar/community.perplexity.ai/alex_romanov/32/330_2.png) [@Alex\_Romanov](https://community.perplexity.ai/u/Alex_Romanov)\
**Post date:** [July 14, 2026, 4:22pm UTC](https://community.perplexity.ai/t/image-domain-filter-not-being-respected-in-sonar-sonar-pro-api-requests-also-returning-junk-images/5580/2 "2026-07-14T16:22:57Z")

</div>

Thanks for reporting, @tommy! The team will look into this.

---

<div class="post-metadata">

**Author:** ![tommy](https://sea1.discourse-cdn.com/flex001/user_avatar/community.perplexity.ai/tommy/32/3334_2.png) [@tommy](https://community.perplexity.ai/u/tommy)\
**Post date:** [July 28, 2026, 4:24pm UTC](https://community.perplexity.ai/t/image-domain-filter-not-being-respected-in-sonar-sonar-pro-api-requests-also-returning-junk-images/5580/3 "2026-07-28T16:24:12Z")

</div>

Hi @Alex_Romanov, has there been any updates here or do you have any suggestions on how we can improve results in the meantime?

---

<div class="post-metadata">

**Author:** ![albert\_pplx](https://avatars.discourse-cdn.com/v4/letter/a/258eb7/32.png) [@albert\_pplx](https://community.perplexity.ai/u/albert_pplx)\
**Post date:** [August 5, 2026, 4:48am UTC](https://community.perplexity.ai/t/image-domain-filter-not-being-respected-in-sonar-sonar-pro-api-requests-also-returning-junk-images/5580/4 "2026-08-05T04:48:14Z")

</div>

Hi @tommy

Thanks for your patience on this. The team is looking into this issue and a fix should be out this week at the latest.

If anything else comes up, please don’t hesitate to reach out.
