xiaohongshu
xiaohongshu
wikidata-search
Search for items and properties on Wikidata and retrieve entity details, claims, and external identifiers. Supports both keyword search (Wikidata Action API) and semantic/hybrid search (Wikidata Vector Database), plus direct entity retrieval (Special:EntityData) and structured querying (WDQS SPAR...
Full skill instructions
Search and retrieve data from Wikidata, the free knowledge base.
Use the method that matches the task to reduce load and improve accuracy:
wbsearchentitiesBase URL: https://www.wikidata.org/w/api.php
Entity JSON (often faster for current state): https://www.wikidata.org/wiki/Special:EntityData/{ID}.json
SPARQL endpoint: https://query.wikidata.org/sparql
Vector DB API: https://wd-vectordb.wmcloud.org
Search for entities by label or alias.
curl 'https://www.wikidata.org/w/api.php?action=wbsearchentities&search=QUERY&language=en&format=json&type=item&limit=10'
Parameters:
search: Search term (required)language: Language code (default: en)type: item (Q-entities) or property (P-entities)limit: Max results (1-50, default: 7)continue: Offset for paginationResponse fields per result:
id: Entity ID (e.g., Q42)label: Primary labeldescription: Short descriptionaliases: Alternative namesurl: Wikidata page URLRetrieve full entity data including claims/identifiers.
curl 'https://www.wikidata.org/w/api.php?action=wbgetentities&ids=Q42&format=json&props=labels|descriptions|aliases|claims'
Parameters:
ids: Pipe-separated entity IDs (max 50)props: labels|descriptions|aliases|claims|sitelinks|infolanguages: Filter languages (e.g., en|fr|de)Retrieve claims for specific entity/property.
curl 'https://www.wikidata.org/w/api.php?action=wbgetclaims&entity=Q42&property=P31&format=json'
When you don't know the exact label, or want "things like this" discovery, use the Vector DB.
Item search:
curl 'https://wd-vectordb.wmcloud.org/item/query/?query=QUERY&lang=all&K=20'
Property search:
curl 'https://wd-vectordb.wmcloud.org/property/query/?query=QUERY&lang=all&K=20&exclude_external_ids=false'
Optional parameters:
lang: language code, or all for cross-languageK: number of resultsinstanceof: comma-separated QIDs to filter items by "instance of"rerank: true|false (slower)Response fields:
QID / PIDsimilarity_scorerrf_scoresourcecurl 'https://www.wikidata.org/wiki/Special:EntityData/Q42.json?flavor=simple'
flavor:
simple: truthy statements + sitelinks/versionfull: full datacurl -G 'https://query.wikidata.org/sparql' --data-urlencode 'query=SELECT * WHERE { wd:Q42 ?p ?o } LIMIT 5' -H 'Accept: application/sparql-results+json'
External identifiers are stored as claims with datatype external-id. Common identifier properties:
| Property | Name | Example |
|---|---|---|
| P214 | VIAF ID | 75121530 |
| P227 | GND ID | 119033364 |
| P244 | Library of Congress ID | n79023811 |
| P213 | ISNI | 0000 0001 2144 9326 |
| P345 | IMDb ID | nm0001354 |
| P646 | Freebase ID | /m/0282x |
| P349 | NDL ID | 00621256 |
| P268 | BnF ID | 11888092r |
| P269 | IdRef ID | 026927608 |
| P906 | SELIBR ID | 182099 |
| P396 | SBN author ID | IT\ICCU\CFIV\000163 |
To extract identifiers from wbgetentities response:
# claims = response['entities']['Q42']['claims']
# For each property P:
# claims[P][0]['mainsnak']['datavalue']['value'] -> identifier string
Use scripts/wikidata_api.py for programmatic access:
from scripts.wikidata_api import WikidataAPI
wd = WikidataAPI()
# Search for items
results = wd.search("Albert Einstein", language="en", limit=5)
# Get entity with identifiers
entity = wd.get_entity("Q937", props=["labels", "descriptions", "claims"])
# Get external identifiers only (all values by default)
identifiers = wd.get_identifiers("Q937")
# Returns: {'P214': ['75121530', ...], 'P227': '118529579', ...}
# Semantic search (Vector DB)
candidates = wd.vector_search_items("a famous science fiction writer", lang="en", k=5)
# SPARQL
raw = wd.execute_sparql("SELECT * WHERE { wd:Q42 ?p ?o } LIMIT 5")
{
"searchinfo": {"search": "query"},
"search": [
{
"id": "Q42",
"label": "Douglas Adams",
"description": "English writer and humorist",
"aliases": ["Douglas Noël Adams"],
"url": "//www.wikidata.org/wiki/Q42"
}
]
}
{
"entities": {
"Q42": {
"type": "item",
"id": "Q42",
"labels": {"en": {"language": "en", "value": "Douglas Adams"}},
"descriptions": {"en": {"language": "en", "value": "..."}},
"claims": {
"P31": [...], // instance of
"P214": [{"mainsnak": {"datavalue": {"value": "113230702"}}}] // VIAF
}
}
}
}
wbgetentities call)Retry-After and back offmaxlag and request only needed propsxiaohongshu
technical spec
product ux expert
database patterns
Conduct multi-agent task orchestration and workflow coordination.
Initialize project with Conductor artifacts (product definition,
Expert in web animations, transitions, and motion design using Framer Motion and CSS
Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...
PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.
Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...
Display project status, active tracks, and next actions
Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience