Messy/Wrong facts data
As shown in the results above, there are many entities labeled with the same 'fy' and 'fp' , yet different 'val' for the facts 'Revenues'.
Which company is this for? I am only speculating, but it could be that the reason you're seeing different revenue values for the same FY & FP is that edgartools may be incorrectly classifying "Cost of Revenue" as "Revenue", which is what I see in https://github.com/dgunning/edgartools/issues/308.
"accn" in the above data represents a unique document / filing with the SEC. The "FY and FP" represent the period of the source document... not the period of the particular fact.
In your example above, 0001784535-23-000048 is the 2023 Q3 10-Q for Porch.
This doc can be found at: https://www.sec.gov/ix?doc=/Archives/edgar/data/0001784535/000178453523000048/prch-20230930.htm
Searching for Revenue on above URL shows:
Note that the URL is /edgar/data/{cik}/{accn}/....
Within the document, the same fact can be reported for different periods. For example, that filing has 4 different revenue facts:
- 2022-01-01 to 2022-09-30 (previous year 9 months): 211835000
- 2022-07-01 to 2022-09-30 (previous year 3 months), Frame CY2022Q3: 77353000
- 2023-01-01 to 2023-09-30 (current past 9 months): 315690000
- 2023-07-01 to 2023-09-30 (current past 3 months): 129556000
Anyway, the messiness here is not Edgartools, but that Edgar tools is faithfully showing you the data as it is reported.
Just remember; XBRL is quite difficult at first, but once you use it regularly and learn more about it, it's even worse.
** apologies to original author of this quote, whom I don't remember... and I think they were talking about sql.
Can you let me know which API is this? Is it from the Facts API OR XBRL?
A similar issue was fixed in XBRK Financials. I'm going to start working on the Facts API now.