# Formatting in search results

**URL:** <http://forum.companieshouse.gov.uk/t/formatting-in-search-results/39>\
**Category:** API Issues\
**Created:** [March 12, 2015, 6:00pm UTC](http://forum.companieshouse.gov.uk/t/formatting-in-search-results/39 "2015-03-12T18:00:59Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![chris\_taggart](http://forum.companieshouse.gov.uk/letter_avatar_proxy/v4/letter/c/ea5d25/32.png) [@chris\_taggart](http://forum.companieshouse.gov.uk/u/chris_taggart)\
**Post date:** [March 12, 2015, 6:00pm UTC](http://forum.companieshouse.gov.uk/t/formatting-in-search-results/39/1 "2015-03-12T18:00:59Z")

</div>

Is there a reason there’s HTML in the search results. In particular, searching for a company by name doesn’t seem to return the name as plain text but only formatted:  
{  
“kind”: “searchresults#company”,  
“number”: “03331571”,  
“title”: “03331571: BERKELEY **GOLDMAN** LIMITED: active”,  
“snippet”: “The Courtyard, 75A Odsal Rad, Bradford, West Yorkshire BD6 1PN”,  
“\_score”: 0.019182215,  
“reg”: “”,  
“name”: “BERKELEY **GOLDMAN** LIMITED”,  
“diss”: “”,  
“status”: “active”,  
“formattedUrl”: “/company/03331571”,  
“date”: “11 March 1997”,  
“liquidation\_ind”: “”,  
“live”: 1  
}

Similarly searching by number doesn’t return the company number in an unformatted way, e.g.  
“items”: [  
{  
“formattedUrl”: “/company/07444723”,  
“title”: “ **07444723** : CHRINON LTD: active”,  
“liquidation\_ind”: “”,  
“date”: “18 November 2010”,  
“\_score”: 0.18652505,  
“snippet”: “Aston House, Cornwall Avenue, London N3 1LF”,  
“live”: “”,  
“name”: “CHRINON LTD”,  
“number”: “ **07444723** ”,  
“kind”: “searchresults#company”,  
“status”: “active”,  
“diss”: “”,  
“reg”: 1  
}  
This means using this programmatically involves parsing, for example, the URL, or stripping out tags from the name field in the first case. That’s not difficult, but I think it’s important that the results should be raw data first, with formatting as an add on in fields that are clearly marked as such.

---

<div class="post-metadata">

**Author:** ![csmith](http://forum.companieshouse.gov.uk/user_avatar/forum.companieshouse.gov.uk/csmith/32/8_2.png) [@csmith](http://forum.companieshouse.gov.uk/u/csmith)\
**Post date:** [March 13, 2015, 10:31am UTC](http://forum.companieshouse.gov.uk/t/formatting-in-search-results/39/2 "2015-03-13T10:31:17Z")

</div>

Thanks Chris,

Please refer to the following two posts which cover this issue:

> [@Html markup in JSON responses](http://forum.aws.chdev.org/t/html-markup-in-json-responses/23):
>
> I did a search for company STL GROUP. And in the json results i get html markup (\<STRONG\>) in the name and title. There shouldn’t be any type of UI markup in any of the JSON responses. Example: request: GET /search/companies?q=stl+group HTTP/1.1 part of the response: "name": "\<strong\>STL\</strong\> \<strong\>GROUP\</strong\> PLC", "title": "01171409: \<strong\>STL\</strong\> \<strong\>GROUP\</strong\> PLC: active"

and

> [@Some API resources are changing](http://forum.aws.chdev.org/t/some-api-resources-are-changing/31):
>
> The new Companies House API is in early Beta. We’re giving software developers early sight of the API to help them get up to speed with what we’re doing and plan development, and also to help us catch issues early. As a result, some API resources are in a state of flux, and are being cleaned up and made consistent. For example, the search results resource is going through a big re-factor to make it much simpler to consume. We will post notifications about pending change over the coming weeks. …

---

<div class="post-metadata">

**Author:** ![csmith](http://forum.companieshouse.gov.uk/user_avatar/forum.companieshouse.gov.uk/csmith/32/8_2.png) [@csmith](http://forum.companieshouse.gov.uk/u/csmith)\
**Post date:** [March 13, 2015, 10:31am UTC](http://forum.companieshouse.gov.uk/t/formatting-in-search-results/39/3 "2015-03-13T10:31:23Z")

</div>

Closed on March 13, 2015, 10:31am UTC


