wikidatawikidata-api

How to retrive full Wikidata info of an entity


I'm using different kind of queries to retrive wikidata info of an entity like, for Berlin:

but all of these did not include the full information. As an example, i'm not able to find the official language or population data.

How can I get all data?


Solution

  • Both of the shown URLs / APIs do should you the full data for the entity that you are looking at, Q64 being Berlin.

    In Wikidata the official language is represented by the Property P37 and the population by Property P1082.

    You will find references to these properties in the JSON output. For example for the language:

    {
      "mainsnak": {
        "snaktype": "value",
        "property": "P37",
        "hash": "b8dce904caadeef339763625b903974aa4c83c6a",
        "datavalue": {
          "value": {
            "entity-type": "item",
            "numeric-id": 188,
            "id": "Q188"
          },
          "type": "wikibase-entityid"
        },
        "datatype": "wikibase-item"
      },
      "type": "statement",
      "id": "Q64$9AEBFCE4-EC53-4A97-B20B-4579FBD32CE7",
      "rank": "normal"
    }
    

    This refers to Q188 which is German.