# Query examples

### Getting basic company data query

```graphql
# variables
{ "domain": "amazon.com" }

# query
query findCompanyByDomain($domain: String!) {
    company(domain: $domain) {
        displayName
        facebook
        duns
        foundedYear
        latestSharePrice {
            amount
            currency
        }
        locationsCount
        logo {
            url
        }
        stockTicker
        totalFunding {
            amount
        }
        twitter
    }
}
```

* [Query basic financial data](/company-data-api/data-points/financials.md)
* [Query human capital data](/company-data-api/data-points/human-capital.md)
* [Query operating data](/company-data-api/data-points/operating-data.md)

### Getting all company data query example

```graphql
# variables
{ "domain": "amazon.com" }

# query
query findCompanyByDomain($domain: String!) {
  company(domain: $domain) {
    companyType
    countryOfRegistration
    displayName
    duns
    figi
    foundedYear
    id
    locationsCount
    logo {
      url
    }
    longDescription
    parentCompany {
      displayName
    }
    shortDescription
    status
    stockTicker
    taxId
    tags {
      name
    }

    # Web links
    blog
    craftUrl
    crunchbase
    facebook
    homepage
    instagram
    linkedin
    pinterest
    twitter
    youtube

    ev {
      currency
      amount
    }
    totalFunding {
      currency
      amount
    }
    stocksSummary {
      closingDatetime
      marketcap
    }
    incomeStatements {
      period {
        periodType
        endDate
      }
      revenue
    }
    latestZScore {
      period {
        endDate
        periodType
      }
      value
    }
    fundingRounds {
      amount {
        amount
        currency
      }
      date
      stage
    }
    stocksSummaries {
      actualOn
      marketcap
    }
    stocksSummary {
      beta
      actualOn
      closingPrice
      currencyCode
      date
      day200MovingAvg
      day50MovingAvg
      day5ChangePercent
      marketcap
      month1ChangePercent
      month3ChangePercent
      month6ChangePercent
      sharesOutstanding
      week52Change
      week52High
      week52Low
      year1ChangePercent
      year2ChangePercent
      year5ChangePercent
      ytdChangePercent
    }
    acquisitions {
      date
      description
      duns
      id
      name
      slug
      value {
        currency
        amount
      }
    }
    sustainability {
      group
      measure
      name
      period {
        displayEndDate
        endDate
        periodType
        startDate
      }
      source {
        label
        url
      }
      units
      value
    }
    analystRating {
      buyRecommendations
      currency
      date
      holdRecommendations
      lastUpdated
      overweightRecommendations
      recommendation
      recommendationScore
      sellRecommendations
      targetPrice
      totalRecommendations
      underweightRecommendations
      unreportedRecommendations
    }
    balanceSheets {
      accountsPayable
      accountsReceivable
      additionalPaidInCapital
      cash
      commonStock
      currency
      currentAssets
      currentLiabilities
      debtToAssetsRatio
      debtToEquityRatio
      dividendsPayable
      eps
      financialLeverage
      goodwill
      inventories
      longTermDebtCurrent
      longTermDebtNoncurrent
      nonCurrentLiabilities
      period {
        periodType
        endDate
      }
      ppE
      preferredStock
      prepaidExpenses
      retainedEarnings
      sharesOutstanding
      source {
        url
      }
      taxRate
      totalAssets
      totalDebt
      totalEquity
      totalLiabilities
    }
    balanceSheetsSources {
      url
    }
    cashFlowStatements {
      accountsPayable
      accountsReceivable
      capex
      cashFromFinancingActivities
      cashFromInvestingActivities
      cashFromOperatingActivities
      currency
      depreciationAmortization
      dividendsPaid
      freeCashFlow
      incomeTaxesPaid
      interestPaid
      inventories
      longTermBorrowings
      netChangeInCash
      netIncome

      period {
        periodType
        endDate
      }

      purchasesPpe
      shortTermBorrowings

      source {
        url
      }
    }

    cashFlowStatementsSources {
      url
    }
    incomeStatements {
      costOfGoodsSold
      currency
      depreciationAmortization
      ebit
      ebitMargin
      ebitda
      ebitdaMargin
      generalAdministrativeExpense
      grossBookings
      grossProfit
      grossProfitMargin
      incomeTaxExpense
      interestExpense
      interestIncome
      netIncome
      netInterestExpense
      period {
        periodType
        endDate
      }
      preTaxProfit
      researchDevelopmentExpense
      revenue
      revenueGrowth
      salesMarketingExpense

      source {
        url
      }

      totalOperatingExpense
    }

    incomeStatementsSources {
      url
    }
    privateValuations {
      comments
      date
      fundingRound {
        date
      }
      postMoneyValuation {
        amount
        currency
      }
      preMoneyValuation {
        amount
        currency
      }
      source {
        url
      }
      valuationStepUp
    }
    ratios {
      avgDaysInventoryOut
      avgDaysPayableOut
      currentRatio
      debtToAssetsRatio
      debtToEquityRatio
      ebitInterestExp
      ebitMargin
      ebitdaCapexInterestExp
      ebitdaInterestExp
      ebitdaMargin
      evCfo
      evEbit
      evEbitda
      evFcf
      financialLeverage
      fixedAssetTurnover
      grossMargin
      inventoryTurnover
      ltDebtCapital
      ltDebtEquity
      netDebtEbitda
      netDebtEbitdaCapex
      netIncomeMargin
      operatingCashFlowRatio
      pE
      period {
        periodType
        endDate
      }
      quickRatio
      returnOnAssets
      returnOnCapital
      returnOnEquity
      revenuePerEmployee
      sgnaMargin
      totalAssetTurnover
      totalDebtCapital
      totalDebtEbitda
      totalDebtEbitdaCapex
      totalDebtEquity
      totalLiabilitiesTotalAssets
      z
      zPrime
      zDoublePrime
    }
    revenueBreakdowns {
      period {
        periodType
        endDate
      }
      values {
        segmentCategory
        segmentName
        unitType
        value
      }
    }
    filings {
      craftUrl
      period {
        periodType
        endDate
      }
      secUrl
    }

    blacklisted {
      description
      organization
    }
    dataBreaches {
      affectedRecordsCount
      date
      description
      source
      sourceUrl
    }
    latestTwitterEngagement {
      avgLikesPerTweet
      avgRetweetsPerTweet
      avgTweetsPerDay
      collectedAt
      followers
      following
      tweets
      tweetsForPeriod
      tweetsPercentageEngagementForPeriod
    }
    locationsCount
    locations {
      address
      city
      country
      hq
      id
      latitude
      longitude
      state
      zipCode
    }
    competitors {
      displayName
      logo {
        url
      }
      shortDescription
      slug
    }
    news {
      headline
      publishedAt
      source
      summary
      url
    }
    blogs {
      headline
      publishedAt
      source
      summary
      url
    }
    operatingMetrics {
      companySpecificKpi
      footnotes
      source {
        url
      }

      timePeriod {
        periodType
        displayEndDate
        endDate
      }

      unitType
      value {
        currency
        amount
      }
    }
    technologies {
      category
      description
      lastUpdatedAt
      name
      url
    }
    twitterFollowers {
      amount
      date
    }
    websiteTraffic {
      companyUrl
      websiteTrafficHistory {
        date
        visits
      }
    }
    courtFilings {
      caseName
      courtName
      dateFiled
      dateTerminated
      defendant
      districtName
      docketId
      natureOfSuit
      plaintiff
    }

    companyRatings {
      careerOpportunitiesRating
      compensationAndBenefitsRating
      cultureAndValuesRating
      overallRating
      seniorLeadershipRating
      workLifeBalanceRating
    }
    employees {
      date
      employeeGrowth
      employeeNumber
    }
    ethnicityMetrics {
      name
      timePeriod {
        periodType
        endDate
      }
      unitType
      value
    }

    genderMetrics {
      name
      timePeriod {
        periodType
        endDate
      }
      unitType
      value
    }
    rolesMetrics {
      name
      timePeriod {
        periodType
        endDate
      }
      unitType
      value
    }
    jobCategories {
      category
      percentage
    }
    jobsCount
    jobs(first: 1, offset: 100) {
      city
      country
      createdAt
      description
      id
      naicsCode
      naicsDescription
      onetOccupationCode
      onetOccupationName
      region
      title
      updatedAt
      zipCode
    }
    keyExecutives {
      facebook
      headshot {
        url
      }
      linkedin
      name
      title
      twitter
    }
    salaries {
      jobCategory
      medianSalary {
        amount
        currency
      }
    }
  }
}

```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.craft.co/company-data-api/example.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
