# Live Streams giving a 504

**URL:** <http://forum.companieshouse.gov.uk/t/live-streams-giving-a-504/6142>\
**Category:** API Issues\
**Created:** [April 10, 2023, 7:38am UTC](http://forum.companieshouse.gov.uk/t/live-streams-giving-a-504/6142 "2023-04-10T07:38:40Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![robbie\_crawford](http://forum.companieshouse.gov.uk/letter_avatar_proxy/v4/letter/r/82dd89/32.png) [@robbie\_crawford](http://forum.companieshouse.gov.uk/u/robbie_crawford)\
**Post date:** [April 10, 2023, 7:38am UTC](http://forum.companieshouse.gov.uk/t/live-streams-giving-a-504/6142/1 "2023-04-10T07:38:40Z")

</div>

Hello All

The live streams are giving a 504 error.

Started yesterday morning but thought I’d let you have a peaceful Easter.

Rgs  
Robbie

---

<div class="post-metadata">

**Author:** ![MArkWilliams](http://forum.companieshouse.gov.uk/user_avatar/forum.companieshouse.gov.uk/markwilliams/32/194_2.png) [@MArkWilliams](http://forum.companieshouse.gov.uk/u/MArkWilliams)\
**Post date:** [April 11, 2023, 9:54am UTC](http://forum.companieshouse.gov.uk/t/live-streams-giving-a-504/6142/2 "2023-04-11T09:54:22Z")

</div>

Thank you for reporting this. There was an issue, which was resolved this morning.  
This should have been detected by our monitoring systems and this is being investigated of course.  
We apologise for any inconvenience.

---

<div class="post-metadata">

**Author:** ![luke2](http://forum.companieshouse.gov.uk/user_avatar/forum.companieshouse.gov.uk/luke2/32/1284_2.png) [@luke2](http://forum.companieshouse.gov.uk/u/luke2)\
**Post date:** [April 11, 2023, 9:54am UTC](http://forum.companieshouse.gov.uk/t/live-streams-giving-a-504/6142/3 "2023-04-11T09:54:47Z")

</div>

Experiencing the same issue

---

<div class="post-metadata">

**Author:** ![robbie\_crawford](http://forum.companieshouse.gov.uk/letter_avatar_proxy/v4/letter/r/82dd89/32.png) [@robbie\_crawford](http://forum.companieshouse.gov.uk/u/robbie_crawford)\
**Post date:** [April 11, 2023, 10:54am UTC](http://forum.companieshouse.gov.uk/t/live-streams-giving-a-504/6142/4 "2023-04-11T10:54:28Z")

</div>

All good now Mark - thanks.

---

<div class="post-metadata">

**Author:** ![fairchanceforcrm36](http://forum.companieshouse.gov.uk/letter_avatar_proxy/v4/letter/f/45deac/32.png) [@fairchanceforcrm36](http://forum.companieshouse.gov.uk/u/fairchanceforcrm36)\
**Post date:** [April 13, 2023, 4:42am UTC](http://forum.companieshouse.gov.uk/t/live-streams-giving-a-504/6142/5 "2023-04-13T04:42:38Z")

</div>

Hello @robbie_crawford can you explain me how to use Live Streams api

---

<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:** [April 13, 2023, 1:07pm UTC](http://forum.companieshouse.gov.uk/t/live-streams-giving-a-504/6142/6 "2023-04-13T13:07:46Z")

</div>

[Documentation for the Streaming API is available](https://developer-specs.company-information.service.gov.uk/streaming-api/reference). I recommend starting with the [Companies House Streaming API intro](https://developer-specs.company-information.service.gov.uk/streaming-api/guides/overview).

You should ensure that the Streaming API meets your requirements - there are several other sources of Companies House data available ([bulk data](https://www.gov.uk/guidance/companies-house-data-products), [other APIs](https://developer-specs.company-information.service.gov.uk/)).

I am not experienced with the Streaming API. I would however recommend some familiarity with the main [Public Data API](https://developer-specs.company-information.service.gov.uk/companies-house-public-data-api/reference) also. That allows you to interactively investigate the data structures and data you may receive (they use very similar data structures and the underlying data set is - presumably the same?)

This forum has ended up being a valuable source of “documentation” since the Companies House documentation is intermittently updated and there are a few outstanding “features” of the system which have not been fixed. Search it using the “magnifying glass” icon at the top right of the page.

Good luck.

---

<div class="post-metadata">

**Author:** ![ebrian101](http://forum.companieshouse.gov.uk/user_avatar/forum.companieshouse.gov.uk/ebrian101/32/1145_2.png) [@ebrian101](http://forum.companieshouse.gov.uk/u/ebrian101)\
**Post date:** [April 17, 2023, 10:31am UTC](http://forum.companieshouse.gov.uk/t/live-streams-giving-a-504/6142/7 "2023-04-17T10:31:34Z")

</div>

I have written a little guide on [Streams | CH Guide](https://chguide.co.uk/streams/) about using the streaming API. Have a look at some of the links on there and give it a go, and give me a shout if you have any questions.  
For an open source working example using NodeJS see [https://companies.stream](https://companies.stream).  
As voracityemail has said there are plenty of answered questions about the streaming API on this forum.

All the best

---

<div class="post-metadata">

**Author:** ![antonio.daria](http://forum.companieshouse.gov.uk/letter_avatar_proxy/v4/letter/a/3e96dc/32.png) [@antonio.daria](http://forum.companieshouse.gov.uk/u/antonio.daria)\
**Post date:** [March 24, 2025, 12:31pm UTC](http://forum.companieshouse.gov.uk/t/live-streams-giving-a-504/6142/8 "2025-03-24T12:31:23Z")

</div>

Does the Stream API include a counter on the filings endpoint to track the number of processed files?

In case of connectivity issues, how can I ensure that no filings were lost between the disconnection and reconnection?

---

<div class="post-metadata">

**Author:** ![ebrian101](http://forum.companieshouse.gov.uk/user_avatar/forum.companieshouse.gov.uk/ebrian101/32/1145_2.png) [@ebrian101](http://forum.companieshouse.gov.uk/u/ebrian101)\
**Post date:** [March 25, 2025, 9:09am UTC](http://forum.companieshouse.gov.uk/t/live-streams-giving-a-504/6142/9 "2025-03-25T09:09:25Z")

</div>

The timepoint parameter is used for this purpose.

Each event that comes through has a timepoint field under `event`, for example:

```auto
{
  "resource_kind": "filing-history",
  "resource_uri": "/company/16340168/filing-history/MzQ1OTgwNDMzMWFkaXF6a2N4",
  "resource_id": "MzQ1OTgwNDMzMWFkaXF6a2N4",
  "data": {
    "type": "NEWINC" 
  },
  "event": {
    "fields_changed": [
      "links.document_metadata"
    ],
    "timepoint": 188283700,
    "published_at": "2025-03-25T09:06:35",
    "type": "changed"
  }
}

```

If this was the last event you received, when reconnecting, specify `timepoint=188283700` in the URL query string to pick up where you left off.

Open source example: [companies-house-stream/server/src/streams/listenOnStream.ts at master · mrbrianevans/companies-house-stream · GitHub](https://github.com/mrbrianevans/companies-house-stream/blob/master/server/src/streams/listenOnStream.ts#L24)

---

<div class="post-metadata">

**Author:** ![antonio.daria](http://forum.companieshouse.gov.uk/letter_avatar_proxy/v4/letter/a/3e96dc/32.png) [@antonio.daria](http://forum.companieshouse.gov.uk/u/antonio.daria)\
**Post date:** [March 25, 2025, 9:44am UTC](http://forum.companieshouse.gov.uk/t/live-streams-giving-a-504/6142/10 "2025-03-25T09:44:49Z")

</div>

Ok, thanks for your answer, I have a follow up question.

- Are time point sequential, as in if i specify the timepoint of where i left off in the URL i will end up reprocessing the same filing and have a duplicate. could increment the timepoint by 1 and pass that in the URL ?

---

<div class="post-metadata">

**Author:** ![ebrian101](http://forum.companieshouse.gov.uk/user_avatar/forum.companieshouse.gov.uk/ebrian101/32/1145_2.png) [@ebrian101](http://forum.companieshouse.gov.uk/u/ebrian101)\
**Post date:** [March 25, 2025, 11:17am UTC](http://forum.companieshouse.gov.uk/t/live-streams-giving-a-504/6142/11 "2025-03-25T11:17:34Z")

</div>

Yes they are sequential. So you could increment it by one for future requests.

However, they send multiple events per filing. They send an inital event for the filing before the document has been fully processed. And then another event once the PDF is available for download. They may also send some pure duplicates of a small number of events.  
Therefore your system should be able to handle duplicates without issue.

---

<div class="post-metadata">

**Author:** ![antonio.daria](http://forum.companieshouse.gov.uk/letter_avatar_proxy/v4/letter/a/3e96dc/32.png) [@antonio.daria](http://forum.companieshouse.gov.uk/u/antonio.daria)\
**Post date:** [March 25, 2025, 12:11pm UTC](http://forum.companieshouse.gov.uk/t/live-streams-giving-a-504/6142/12 "2025-03-25T12:11:20Z")

</div>

Thanks very much for you prompt response, this is very helpful. i have one more if I may:

In regard to the night disconnection They deliberately disconnect every 24 hrs? Is this based on connection or key - for example In our system we have only one API Key shared across dev/staging/prod?  
Is restarting at 0 the best thing to do? Or are we safe just continually iterating the timepoint?

It looks like that when we reconnected with a given timepoint we just received nothing at all

---

<div class="post-metadata">

**Author:** ![ebrian101](http://forum.companieshouse.gov.uk/user_avatar/forum.companieshouse.gov.uk/ebrian101/32/1145_2.png) [@ebrian101](http://forum.companieshouse.gov.uk/u/ebrian101)\
**Post date:** [March 25, 2025, 2:44pm UTC](http://forum.companieshouse.gov.uk/t/live-streams-giving-a-504/6142/13 "2025-03-25T14:44:28Z")

</div>

So the timepoints keep incrementing across days, so you’ll never reset it to zero.  
They disconnect all connections each night, regardless of which API key was used to make the request. You just need to reconnect with the last timepoint you received on the connection.  
It’s quite simple to create more keys for different environments, but not essential.  
If you’re not receiving data at all, try look at [https://companies.stream](https://companies.stream) to see if there are currently events coming through. If you’ve used the latest timepoint in the URL parameter, then it might take 30 seconds or longer for a new filing event to come in.

---

<div class="post-metadata">

**Author:** ![antonio.daria](http://forum.companieshouse.gov.uk/letter_avatar_proxy/v4/letter/a/3e96dc/32.png) [@antonio.daria](http://forum.companieshouse.gov.uk/u/antonio.daria)\
**Post date:** [April 2, 2025, 2:33pm UTC](http://forum.companieshouse.gov.uk/t/live-streams-giving-a-504/6142/14 "2025-04-02T14:33:45Z")

</div>

Hello again, thanks for all your help so far. I wanted to ask aside form the night time disconnection between 2/3 AM does the company house tend to randomly disconnect at time during the day? I have noticed more disconnections during night time by means of alerts coming through a team’s channel.  
I am trying to understand if this is normal, or something to investigate within my software.  
thanks
