Forum Replies Created
Wednesday, November 18, 2020 at 8:59 AM in reply to: Risk factors and other items from 10-Q&10-K filings #187437Alice ChikaraParticipant
Could you share a sample query for text search i.e. endpoint /document
ThanksMonday, November 23, 2020 at 10:24 AM in reply to: Risk factors and other items from 10-Q&10-K filings #187600
Alice – This may take a minute to run; it will return 10 reports where BDO, USA, LLP appears across multiple filings:
Google Sheets is not the best tool for this – you should have a client ID/secret pair and use a tool like postman or insomnia (Google stops queries that take longer than 60 seconds).Angelo BriziParticipant
Hi David, I tried to run the query
This returns only 3 results for 1Q 2020, 2Q 2020 and 1H 2020.
3Q 2020 is missing even if the 10Q for 3Q was filed on 11/4/2020
Hi Angelo – thanks, again, for the ping on this – still not sure why it was stuck in ‘pending’.
Anyway, as you noted in email, the 3QCUM value does appear – there are 5 results total for the query: 1Q, 2Q, 1H, 3Q and 3QCUM.Angelo BriziParticipant
The following query
returns data only for 1Q, 2Q, 1H 2020 but not for Q3 2020 which was filed on 11/5/2020
Hi Angelo – I get 5 values for this query. If possible, please add .sort(DESC) to the period.fiscal-period field, so that these sort numerically – you should see 3Q and 3QCUM listed at the top.
If you use a tool like postman or insomnia, you should see a ‘count’ in the return that is a sum of the number of records that are returned by the query.
Send me an email for follow up, if you’re not getting 5 results, and I’ll send some options to get together for screen-sharing to see what might be the cause of the issue.Elisa RoselliParticipant
I have received a client_id and client_secret from xBRL, but am unable to get an access_token from the Swagger page at https://xbrlus.github.io/xbrl-api/, because it repeatedly claims that client_credentials is an unsupported grant type.
400 Error: Bad Request
“error_description”: “Unsupported Grant Type”
What can I do about this?
Many thanks to anyone who can help.
Hi Elisa – welcome and thanks for posting. Sorry for the issues you’re having – appreciate the screen capture you sent along, as well.
We don’t allow users to submit via ‘client_credentials’ until they’re authorized using ‘password’ (client_credentials is for renewing a token).
On the initial authorization, you’ll need to pass:
- Client ID
- Client Secret
- Grant Type
Tip: you can also use one of the open lock icons on the right side of the Swagger page to dive into the data – it may be a bit quicker.
Also, we’ve produced a couple of Jupyter Notebooks for Python and R that handle authorization – see https://mybinder.org/v2/gh/xbrlus/xbrl-api-ipynb/python?filepath=xbrl_us_api.ipynb or https://mybinder.org/v2/gh/xbrlus/xbrl-api-ipynb/master?filepath=xbrl_us_api_r.ipynb linked in the XBRL Data Community
Let me know how you make out.Elisa RoselliParticipant
Thanks for your help, but even when I fill in all the parameters as you suggest, I still don’t get access.
The method using the lock icon at the right returns:
Auth ErrorError: Bad Request, error: invalid_request, description: Bad or expired token
whereas, if I fill in every parameter in the oauth endpoint and set the grant_type to password, it returns 400:
“error_description”: “Bad Username or Password”
I also tried getting another client_id and client_secret, on the idea that the first one may have expired, but the new ones have exactly the same behavior.
I have also tried logging out and in again, just to make sure that the login details are the same as the ones entered for user and password (i.e. my email address and the password I configured on the xBRL site), but the results are the same.
I can’t find what I’m doing wrong. Thanks for your patience.
Elisa RoselliDavid TaurComcastParticipant
Elisa – thanks for your time offline from this thread today. I’m glad we could get together to discuss and resolve the issue.John NoelsParticipant
Thanks David.izrar UlhaqParticipant
It is better to get list of fact.id for specific filing and put it in request to get values.
Hi izrar – you can use a nested endpoint
/report/factto get the facts for a specific report without ’round-tripping’ to get the fact.id first. With the nested approach, you can get the value, id and all other attributes of the fact. See https://xbrlus.github.io/xbrl-api for details.Alice ChikaraParticipant
Is it possible to get the full Balance Sheet of a company with a single API call?