Image_domain_filter not being respected in sonar / sonar-pro api requests (also returning junk images)

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 and 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:

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
}
}
}
}


Response or error

{
  "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

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

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