question

Upvotes
Accepted
5 0 2 6

Using GraphQL to find 10-K Filings

GraphQL in API Playground gives error when attempting to post query filter to 10-K taken from "Cheat Sheet"

{

FinancialFiling(filter: {AND: [{FilingDocument: {DocumentSummary: {FormType: {EQ: "10-K"}}}}, {FilingDocument: {DocumentSummary: {FilingDate: {BETWN: {FROM: "2020-01-01T00:00:00Z", TO: "2020-12-31T00:00:00Z"}}}}}]}, sort: {FilingDocument: {DocumentSummary: {FilingDate: DESC}}}, limit: 10) {

_metadata {

totalCount

}

FilingDocument {

Identifiers {

Dcn

}

DocId

FinancialFilingId

DocumentSummary {

DocumentTitle

FeedName

FormType

HighLevelCategory

MidLevelCategory

FilingDate

SecAccessionNumber

SizeInBytes

}

FilesMetaData {

MimeType

}

DocumentText

}

}

}

graphql.jpg

#technologyrdp-apigraph-ql
graphql.jpg (79.9 KiB)
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
Accepted
80.3k 259 52 75

@ETLBATeam

Thank you for reaching out to us.

I think that you need to run it on the Graphiql tab.

1692249005597.png


1692249005597.png (66.1 KiB)
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Thanks that helped.... The next question how to modify the query so it returns link to pdf, instead of Document text?

{

FinancialFiling(filter: {AND: [

{FilingDocument:

{DocumentSummary: {FormType: {EQ: "10-K"}}}},

{FilingDocument: {Identifiers: {OrganizationId: {EQ: "4295907168"}}}},

{FilingDocument:

{DocumentSummary: {

FilingDate: {BETWN: {FROM: "2022-01-01T00:00:00Z", TO: "2022-12-31T00:00:00Z"}

}

}}}]},

sort: {FilingDocument: {DocumentSummary: {FilingDate: DESC}}}, limit: 10) {

_metadata {

totalCount

}

FilingDocument {

Identifiers {

Dcn

}

DocId

FinancialFilingId

DocumentSummary {

DocumentTitle

FeedName

FormType

HighLevelCategory

MidLevelCategory

FilingDate

SecAccessionNumber

SizeInBytes

}

FilesMetaData {

MimeType

}

DocumentText

}

}

}

See Query return with only Docuement.txt in GraphQL.txt


graphql.txt (1.7 KiB)
Upvotes
80.3k 259 52 75

@ETLBATeam

You can try this one:

{
  FinancialFiling(filter: {AND: [{FilingDocument: {DocumentSummary: {FormType: {EQ: "10-K"}}}}, {FilingDocument: {Identifiers: {OrganizationId: {EQ: "4295907168"}}}}, {FilingDocument: {DocumentSummary: {FilingDate: {BETWN: {FROM: "2022-01-01T00:00:00Z", TO: "2022-12-31T00:00:00Z"}}}}}]}, sort: {FilingDocument: {DocumentSummary: {FilingDate: DESC}}}, limit: 10) {
    _metadata {
      totalCount
    }
    FilingDocument {
      Identifiers {
        Dcn
      }
      DocId
      FinancialFilingId
      DocumentSummary {
        DocumentTitle
        FeedName
        FormType
        HighLevelCategory
        MidLevelCategory
        FilingDate
        SecAccessionNumber
        SizeInBytes
      }
      FilesMetaData {
        FileLink
        FileName
        MimeType
      }
      DocumentText
    }
  }
}

The output is:

1692322791883.png



1692322791883.png (30.4 KiB)
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

OK. Great. I am able to get the link. Can you please advise which API to call to download the file.

https://api.refinitiv.com/data-store/document/v1/FinancialFiling/FilingDocument/97673606782/20220728_4295907168_97673606782_1_1_10-K_raw.pdf

@ETLBATeam

You can use this endpoint: /data-store/document/v1/FinancialFiling/FilingDocument/{id}/{filename}.

1692327307763.png

1692327307763.png (65.7 KiB)
@Jirapongse Thank you! It worked.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.