• Townie
    AI
  • Blog
  • Docs
  • Pricing
  • We’re hiring!
Log inSign up
stevekrouse

stevekrouse

wikidata

Public
Like
wikidata
Home
Code
2
README.md
main.tsx
Branches
1
Pull requests
Remixes
History
Environment variables
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
Sign up now
Code
/
README.md
Code
/
README.md
Search
8/17/2023
README.md

Query Wikidata via SPARQL

Usage

Create val
// get the death date for a person @stevekrouse.wikidata(`SELECT ?person ?personLabel ?death_date WHERE { ?person rdfs:label "Henry Kissinger"@en; wdt:P31 wd:Q5 . # Ensure the entity is a human OPTIONAL { ?person wdt:P570 ?death_date . # Try to find a date of death } SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } }`)

Learn more

  • https://agg-shashank.medium.com/an-introduction-to-using-wikidata-apis-a678ee6d2968

Migrated from folder: Archive/wikidata

FeaturesVersion controlCode intelligenceCLI
Use cases
TeamsAI agentsSlackGTM
DocsShowcaseTemplatesNewestTrendingAPI examplesNPM packages
PricingNewsletterBlogAboutCareers
We’re hiring!
Brandhi@val.townStatus
X (Twitter)
Discord community
GitHub discussions
YouTube channel
Bluesky
Open Source Pledge
Terms of usePrivacy policyAbuse contact
© 2025 Val Town, Inc.