Home › Forums › The XBRL API › Duplicate results returned
- This topic has 2 replies, 2 voices, and was last updated 3 years, 7 months ago by David Tauriello.
-
AuthorPosts
-
-
Thursday, May 27, 2021 at 12:28 PM #190781Bruno LererParticipant
In order to try out the API (using this interface (although I don’t think it makes a difference), I randomly picked a company (Carnival Corporation), a form (10-K), two reporting periods (2019,2020) and one concept (local name “LiabilitiesCurrent”). In an ideal world, only two hits should be returned (“8,686” for 2020 and “9,127” for 2019, in each case using “fact.inline-display-value”).
However, this search
https://api.xbrl.us/api/v1/fact/search?concept.local-name=LiabilitiesCurrent&dimensions.count=0&entity.cik=0000815097&period.fiscal-period=Y&period.year=2020,2019&report.document-type=10-K&fields=concept.id,concept.local-name,dimensions,dts.id,entity.name,fact.inline-display-value,period.year,report.entry-url
returns 4 hits. The correct value for 2020 is returned once in the 2020 filing. That filing, however, also returns the 2019 value which is included as comparison in the 2020 financials. Hence the first question: is it possible to exclude items related to periods other than the period for which the specific filing is filed?
The 2019 filing returns the 2019 value twice: once, correctly, as it appears in the balance sheet, but once again since it appears in one of the notes to the financials. Hence question two: is it possible to limit hits to only those concepts included, in this case, in the balance sheet?
Thanks.
-
Thursday, May 27, 2021 at 12:30 PM #191801David TaurielloKeymaster
Hi Bruno – apologies for the delay in getting to your questions.
On the first question – to restrict values to a single year, remove the other year from the query.
If you want to use both the 2019 and 2020 values from the 2020 report, you should first get the dts.id or report.id from the /report endpoint.
https://api.xbrl.us/api/v1/report/search?entity.cik=0000815097&report.document-type=10-K&fields=report.entity-name,report.id,dts.id,report.limit(3),report.entry-type,report.period-end.sort(DESC)
Use either dts.id or report.id to return facts from the report for the years required.
https://api.xbrl.us/api/v1/fact/search?dts.id=435013&concept.local-name=LiabilitiesCurrent&dimensions.count=0&entity.cik=0000815097&period.fiscal-period=Y&period.year=2020,2019&report.document-type=10-K&fields=concept.id,concept.local-name,dimensions,dts.id,entity.name,fact.inline-display-value,period.year,report.entry-url
We’re working on a filter parameter that will prevent ‘duplicate’ values like you note for Carnival in 2019, and we’ll update the community when it’s available.
Let me know if I’ve misunderstood your questions.
-
-
AuthorPosts
- You must be logged in to reply to this topic.
Search Forums
Recent Topics
Recent Replies
-
Spreadsheet Commands: Query Worksheet and Query Workbook Query Workbook 2 months, 3 weeks ago
-
Query for multiple dimensions 4 months, 3 weeks ago
-
Query for multiple dimensions 4 months, 3 weeks ago
-
Showdata function 7 months, 1 week ago
-
Showdata function 7 months, 1 week ago
Documentation & Discussion
- Get started with Google Sheets OR
- Get started with Microsoft Excel OR
- Get access to as-filed data from us for other tools or your own app
- XBRL API Interactive Documentation
- Ten Tips & Techniques
- The XBRL API
- XBRL Data Community
- 2024 US GAAP Taxonomy Viewer
- Live support - Monday, 3:30 - 4:30 PM ET
Who's using this free data?
API Use 2024 || API Use 2023 || API Use 2022 || API Use 2021 || API Use 2020 || API Use 2019 || API Use 2018
Join XBRL US
- Individual Options - Basic, Power User & Sole Practitioner
- For Your Team - Startup, Non-Profit, Academic & Corporate options
- Member Benefits Comparison Table
Using the XBRL API with the Public Filings Database
Unless otherwise agreed to in writing, any and all use of the XBRL API to authenticate and retrieve data from the XBRL US Database of Public Filings implies user consent and agreement with the XBRL US API Agreement. If you are unable to agree to these terms, do not use the XBRL API.
To use the XBRL API outside of Google Sheets, your account needs to be provisioned for OAuth2 access.