# Advanced-search CORS error

**URL:** <http://forum.companieshouse.gov.uk/t/advanced-search-cors-error/5939>\
**Category:** Uncategorized\
**Created:** [February 21, 2023, 2:18pm UTC](http://forum.companieshouse.gov.uk/t/advanced-search-cors-error/5939 "2023-02-21T14:18:59Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![panthercap](http://forum.companieshouse.gov.uk/letter_avatar_proxy/v4/letter/p/a6a055/32.png) [@panthercap](http://forum.companieshouse.gov.uk/u/panthercap)\
**Post date:** [February 21, 2023, 2:18pm UTC](http://forum.companieshouse.gov.uk/t/advanced-search-cors-error/5939/1 "2023-02-21T14:18:59Z")

</div>

Hi,

Great API, thanks for providing.

So, I’ve got the standard company search working fine, but switching to the advanced-search I’m getting a CORS error in my app. The error comes immediately in the OPTIONS request.

The same request to the advanced-search is working fine in postman. Nothing has changed in my app after switching from the basic to the advanced-search, other than the query, which is:

[https://api.company-information.service.gov.uk/advanced-search/companies?company\_name\_includes=vodaphone](https://api.company-information.service.gov.uk/advanced-search/companies?company_name_includes=vodaphone)

Is there some additional step to access the advanced-search? Or, have the query params been changed?

Thanks in advance

---

<div class="post-metadata">

**Author:** ![voracityemail](http://forum.companieshouse.gov.uk/letter_avatar_proxy/v4/letter/v/b77776/32.png) [@voracityemail](http://forum.companieshouse.gov.uk/u/voracityemail)\
**Post date:** [February 21, 2023, 5:42pm UTC](http://forum.companieshouse.gov.uk/t/advanced-search-cors-error/5939/2 "2023-02-21T17:42:33Z")

</div>

Works OK for me (using your URL and curl - so not via AJAX / CORS).

Looks like there may be an issue with the Advanced Search via CORS - or at least a couple of people on this forum have reported errors (404 with a CORS error). Is your case the same?

> **[Advanced Search API Not Working Using Javascript](https://forum.aws.chdev.org/t/advanced-search-api-not-working-using-javascript/5573)**
>
> I am trying to access the advanced search from front end Javascript fetch(). This call works for all endpoints I have tried apart from the advanced search endpoint. Here is the code. var url =...

[https://forum.aws.chdev.org/t/advanced-search-404-but-standard-search-works-fine/5670](https://forum.aws.chdev.org/t/advanced-search-404-but-standard-search-works-fine/5670)

---

<div class="post-metadata">

**Author:** ![panthercap](http://forum.companieshouse.gov.uk/letter_avatar_proxy/v4/letter/p/a6a055/32.png) [@panthercap](http://forum.companieshouse.gov.uk/u/panthercap)\
**Post date:** [February 21, 2023, 7:46pm UTC](http://forum.companieshouse.gov.uk/t/advanced-search-cors-error/5939/3 "2023-02-21T19:46:06Z")

</div>

Hi @voracityemail, yes the same … using fetch, problem in the preflight OPTIONS, all other endpoints except advanced-search working.

---

<div class="post-metadata">

**Author:** ![panthercap](http://forum.companieshouse.gov.uk/letter_avatar_proxy/v4/letter/p/a6a055/32.png) [@panthercap](http://forum.companieshouse.gov.uk/u/panthercap)\
**Post date:** [February 28, 2023, 2:58pm UTC](http://forum.companieshouse.gov.uk/t/advanced-search-cors-error/5939/4 "2023-02-28T14:58:37Z")

</div>

Looks like CORs may still be broken on the advanced company search … anyone else getting this?
