retrieve 'Officer' section for a person via Python API

Hi

As above, is it possible to pull in any of the data from the Officer page via API? Snapshot below with Elon Musk as an example.

Interested to run a person name search in Python, i.e. Elon Musk, and then return the 'Titles', 'Bio & Education', 'Affiliations' (including any RIC's ID's of company affiliations) data into dataframe, if there's a match.

Thank you

refinitiv-elon-musk.png

Best Answer

  • raksina.samasiri
    Answer ✓

    Hi @di.ti ,

    I found that this data can be retrieved with the code below (answered in this thread)

    Using TSLA.O (Tesla) with parameter ODRnk, the biography can be retrieved with the code below

    df = rd.get_data(
    universe=['TSLA.O'],
    fields=['TR.ODOfficerBiography'],
    parameters={"ODRnk" :"R1:R10"}
    )
    df

    1696423449178.png

    Checked in the CodeCreator app, this parameter is the rank of officers/directors, so we put R1:R10 here to get first ten rank of this company

    1696423389778.png

Answers

  • Hi @di.ti ,

    The Advanced Search application can be used here to generate the query for RD Library search API, you can follow an article Find content and functionality using Refinitiv Data Library with Eikon Advanced Search to export the query from advanced search

    For example, searching for people with the name 'Elon Musk', got the query below

    1694442662476.png

    Here's the Python code used and result

    import refinitiv.data as rd
    rd.open_session()

    rd.discovery.search(
    view = rd.discovery.Views.PEOPLE,
    top = 10,
    filter = "( BusinessEntity eq 'PERSON' and (DTSubjectName eq 'elon musk'))",
    select = "OfficersAndDirectorsPersonId,PrimaryOfficerDirectorNDAOrgID,PrimaryOfficerDirectorRIC,PrimaryOfficerDirectorCompanyId,ResearchAnalystPersonId,PI,ResearchAnalystCompanies,ResearchAnalystStarmineId,AnalystCode,BusinessEntity,SearchAllCategoryv3,SearchAllCategoryv2,SearchAllCategory,DTSubjectName,DTCharacteristics,DTSimpleType"
    )
    1694442654716.png

  • Hi
    @raksina.samasiri, thank you for this. Is it possible to also get the text from the 'Biography and Education' section too, as per my snapshot?
  • Hi @di.ti ,

    I tried search with all metadata fields available in People view but cannot find the biography. I only found the Education data available

    1696406105173.png

    Here's data in the field

    [{'Degree': 'Bachelor of Arts',
    'Id': '9939',
    'InstitutionName': 'University of Pennsylvania'},
    {'Degree': 'Bachelor of Science',
    'Id': '9649',
    'InstitutionName': "University of Pennsylvania's Wharton School"},
    {'Degree': 'Bachelor of Science',
    'Id': '917',
    'InstitutionName': 'University of Pennsylvania'},
    {'Degree': "Bachelor's Degree",
    'Id': '9649',
    'InstitutionName': "University of Pennsylvania's Wharton School"},
    {'Degree': 'Bachelor of Science',
    'Id': '3759',
    'InstitutionName': 'The Wharton School of the University of Pennsylvania'}]

    Hence I afraid the biography data is not available, all of the metadata fields available in the People view can be retrieved by the code below

    response = search.metadata.Definition(
    view = search.Views.PEOPLE
    ).get_data()

    response.data.df

    and here's all metadata I got

    AccountName,AccountType,Address,AllRoles,AnalystCode,AnalystEstRating,AnalystEstStarRating,AnalystHasEstimatesCoverage,AnalystHasResearchCoverage,AnalystRecRating,AnalystRecStarRating,BusinessEntity,City,ContactTitle,CosEstRating1,CosEstRating2,CosEstRating3,CosEstRating4,CosEstRating5,CosEstRatingOrder,CosRecRating1,CosRecRating2,CosRecRating3,CosRecRating4,CosRecRating5,CosRecRatingOrder,Country,CustomHomeSite,DocumentTitle,Domain,DTCharacteristics,DTSimpleType,DTSubjectName,Education,EducationData,EducationDegrees,EducationInstitutionIds,EducationInstitutions,EmailAddress,ExternalIDMxpdbID,FinancialAnalystIsCurrent,FinancialResearchContributorName,FirmFoundedDate,FirstName,FTLCompleteFlag,FTLCompleteFlagSetTime,FullName,FundDomicileCountryId,FundPortfolio,FundsFormerlyManaged,GeneralAliasName,GeographicalFocus,GeographicalFocusCode,GeographicalFocusSecondaryCode,HasFunds,HKAlias,HKVersion,HomeSite,HomeSiteRehome,InsertDateTime,InvestorAddressCity,InvestorAddressCountry,InvestorAddressCountryId,InvestorAddressLine1,InvestorAddressLine2,InvestorAddressMetroAreaId,InvestorAddressPostalCode,InvestorAddressStateProvinceId,InvestorAddressUsRegionId,InvestorContactAddressCity,InvestorContactAddressLine1,InvestorContactAddressPostalCode,InvestorContactAddressStateProvinceId,InvestorContactEmailAddress,InvestorContactFaxNumber,InvestorContactPrimaryFunction,InvestorContactRole,InvestorContactTelephoneNumber,InvestorContactTitle,InvestorEmailAddress,InvestorFaxNumber,InvestorFullName,InvestorId,InvestorInvestmentOrientation,InvestorInvestmentStyle,InvestorInvestmentStyleCode,InvestorLatestReportDate,InvestorPhoneNumber,InvestorPriorReportDate,InvestorShortName100,InvestorShortName50,InvestorSpecialties,InvestorType,InvestorTypeId,InvestorWebsite,IsActive,IsActiveInvestor,IsDeceased,IsInternal,IsNoLongerExistingInvestor,LastName,LastSuccessLogin,LastSuccessLoginSeconds,LegacyUltimateParentId,LocalDACSID,LocalFirstName,LocalLastName,LocationAccountID,MiddleName,NoLongerExistingInvestorDate,OfficerDirector,OfficerDirectorActiveCompanies,OfficerDirectorActiveCompanyIDs,OfficerDirectorCombinedCompanyTitle,OfficerDirectorCompanies,OfficerDirectorCompanyIds,OfficerDirectorCompanyRankings,OfficerDirectorData,OfficerDirectorEndDate,OfficerDirectorLabel,OfficerDirectorNDAOrgID,OfficerDirectorRics,OfficerDirectorStartDate,OfficerDirectorStatus,OfficerDirectorTitleCodes,OfficerDirectorTitleRankings,OfficerDirectorTitles,OfficerDirectorTitlesAsReported,OfficersAndDirectorsPersonId,OrganizationMktCap,OTPBypassPeriodEnd,OTPCompletedFlag,OTPEnabled,ParentAccountID,PermID,PersonGender,PersonOfficerDirectorOrder,PI,PreferredLanguage,PreferredName,PrimaryCompanyUltimateParentOrgid,PrimaryOfficerDirector,PrimaryOfficerDirectorCompanyId,PrimaryOfficerDirectorNDAOrgID,PrimaryOfficerDirectorRIC,PrimaryOfficerDirectorTitleAsReported,PrimaryOfficerDirectorTitleCode,PrimaryResearchAnalyst,PrimaryResearchAnalystTitleAsReported,PrimaryRole,PrimarySellSideBuySide,PrimarySellSideBuySideTitleAsReported,PrimaryTitleAsReported,RCSJobFunction,RCSJobFunctionName,RCSSecondaryJobFunction,RCSSecondaryJobFunctionName,RCSSecondaryUserAssetClass,RCSSecondaryUserAssetClassName,RCSUserAssetClass,RCSUserAssetClassName,ResearchAnalyst,ResearchAnalystCompanies,ResearchAnalystCompanyIds,ResearchAnalystCompanyRankings,ResearchAnalystCompanyRanks,ResearchAnalystData,ResearchAnalystLabel,ResearchAnalystPersonId,ResearchAnalystRics,ResearchAnalystStarmineId,ReutersMessengerPersonId,SearchAllCategory,SearchAllCategoryv2,SearchAllCategoryv3,SellSideBuySide,SellSideBuySideCompanies,SellSideBuySideCompanyIds,SellSideBuySideCompanyRankings,SellSideBuySideData,SellSideBuySidePersonId,SellSideBuySideRics,SellSideBuySideStatus,SellSideBuySideTitleRankings,SellSideBuySideTitles,SellSideBuySideTitlesAsReported,ShareholderActivistType,Site,Source,SourceAccountID,SourceParentAccountID,SourceUUID,SubscriberAccount,SUMHoldingsValue,SUMHoldingsValueBought,SUMHoldingsValueSold,SUMInstrumentsBought,SUMInstrumentsHeld,SUMInstrumentsSold,SUMTotalEquityAssets,TelephoneNumber,UltimateParentId,UUID,YearOfBirth

    And as the moderators
    on this forum are expertise on Refinitiv APIs usage. However, they do not have
    deep expertise in every type of content available through Refinitiv products.
    Such expertise is available through Refinitiv Helpdesk, which can be reached
    via MyRefinitiv and the support team is going to contact you soon to assist with this.

    Hope this helps
    and please let me know in case you have any further questions