Help with SEC 403 Error While Using Arelle with Threading

35 views
Skip to first unread message

Faisal Anjum

unread,
Mar 20, 2025, 5:28:15 AM3/20/25
to Arelle-users

Hi Austin,

Hope you're doing well!

I have Python code that successfully fetches XBRL data using the Arelle library. However, when I try to run it on multiple SEC XBRL instances simultaneously using threading, I keep encountering a 403 Forbidden error from the SEC.

I'm struggling to understand how to bypass this issue to make it work. Do you have any insights?

Many thanks,
Faisal

Austin Matherne

unread,
Mar 20, 2025, 1:01:59 PM3/20/25
to Arelle-users
Hi Faisal,

You should declare an email address identifying your application in the user agent header and limit requests to 10 per second.


Kind regards,
Austin Matherne

Faisal Anjum

unread,
Mar 21, 2025, 5:25:28 AM3/21/25
to arelle...@googlegroups.com

 

Hi Austin,

 

Following your advice, I've implemented:

·      SEC-compliant user agent: "EventTrader-XBRL/1.0 (faia...@gmail.com)"

·      Conservative rate limiting: 2-second delay between requests (only 0.5 req/sec, well below the 10/sec limit)

·      Retry logic with exponential backoff (2, 4, 8 seconds)

 

The first XBRL document loads successfully, but subsequent requests still receive 403 Forbidden errors, even with these conservative settings. Is there a cooldown period required between successful requests, or another header beyond User-Agent that I'm missing?

 

Many thanks,

Faisal


--

---
You received this message because you are subscribed to a topic in the Google Groups "Arelle-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/arelle-users/pO-gJQwiOd4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to arelle-users...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/arelle-users/f7ed5c5d-543b-41b1-bb73-a115935e0872n%40googlegroups.com.

Austin Matherne

unread,
Mar 21, 2025, 8:44:37 AM3/21/25
to Arelle-users
Hi Faisal,

I would expect that to work. You can try reaching out to the SEC for more details using the email addresses available from the page I previously linked.

Best,
Austin

Reply all
Reply to author
Forward
0 new messages