Forum Replies Created
-
AuthorPosts
-
Wednesday, November 18, 2020 at 8:59 AM in reply to: Risk factors and other items from 10-Q&10-K filings #187437Alice ChikaraParticipant
Hi David,
Could you share a sample query for text search i.e. endpoint /document
Thanks
Monday, November 23, 2020 at 10:24 AM in reply to: Risk factors and other items from 10-Q&10-K filings #187600David TaurielloKeymasterAlice – This may take a minute to run; it will return 10 reports where BDO, USA, LLP appears across multiple filings:
/document/search?document.text-search=%22BDO,%20USA,%20LLP%22&fields=dts.id,document.limit(10),document.example,report.id,document.uri,document.id,report.filing-date.sort(DESC),entity.name
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 BriziParticipantHi 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
Thanks.
David TaurielloKeymasterHi 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 BriziParticipantreturns data only for 1Q, 2Q, 1H 2020 but not for Q3 2020 which was filed on 11/5/2020
Thanks
David TaurielloKeymasterHi 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.
AnonymousInactiveI 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.
Code Details
400 Error: Bad Request
Response body
Download
{
“error”: “unsupported_grant_type”,
“error_description”: “Unsupported Grant Type”
}What can I do about this?
Many thanks to anyone who can help.
Elisa Roselli
David TaurielloKeymasterHi 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:
- Username
- Password
- Client ID
- Client Secret
- Grant Type
- Platform
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.
AnonymousInactiveDavid,
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 tokenwhereas, if I fill in every parameter in the oauth endpoint and set the grant_type to password, it returns 400:
{
“error”: “invalid_request”,
“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 Roselli
David TaurComcastParticipantElisa – thanks for your time offline from this thread today. I’m glad we could get together to discuss and resolve the issue.
AnonymousInactiveIt is better to get list of fact.id for specific filing and put it in request to get values.
David TaurielloKeymasterHi izrar – you can use a nested endpoint
/report/fact
to 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 ChikaraParticipantHello,
Is it possible to get the full Balance Sheet of a company with a single API call?
Thanks
AnonymousInactiveHi,
I would just like to add some extra feedback on this.Returning to the API Swagger page after logging in, I discovered that I was once again getting error messages about incorrect username or password.
What had happened since I last was able to log on with the help of David Tauriello in December, was that I had reset my password to the same password I use to log in to the xBRL site.
When I had worked with David, we had used a provisional password, which I noticed, was an alphanumeric string with NO SPECIAL CHARACTERS. My password, on the other hand, had some punctuation and non-alpha characters in it. There were no complaints from the xBRL site when I configured it, but apparently the API Swagger doesn’t like it, and refused to give me a JWT.
So I set the password again, this time using a purely alphanumeric string, and it is working.
So, advice to anyone who might be encountering similar problem: avoid passwords with non-alphanumeric characters for this web site.
David TaurielloKeymasterHi Alice – thanks for the great question. To get a ‘balance sheet’ for a company requires a couple of calls, because the SEC submissions are made up of a company taxonomy (the structure of the report) and an instance document (the facts for the report). This Google Sheet template shows one way to do this – https://xbrl.us/xbrl-api-explorer – essentially, you use the /network/{dts.id}/relationship object to identify the elements, then use /fact to fill in the details.
-
AuthorPosts