---
title: "Wikidata API: Search Wikidata items by label | Perceptlayer"
description: "Search Wikidata items or properties by label and alias in a chosen language. Returns the Q or P id, label, description and how it matched."
url: https://perceptlayer.com/apis/wikidata/entity-search
---

[APIs](https://perceptlayer.com/apis) / [Wikidata](https://perceptlayer.com/apis/wikidata) / Search Wikidata items by label

# Wikidata: Search Wikidata items by label

Search Wikidata items or properties by label and alias in a chosen language. Returns the Q or P id, label, description and how it matched.

GET `/v1/wikidata/entity-search`

## Parameters

Send parameters in the query string.

| Parameter | Type | Required | Allowed values |
| --- | --- | --- | --- |
| `query` | string | Required | Up to 250 characters Text to match against labels and aliases, such as douglas adams. |
| `language` | string | Optional | Up to 20 characters Language code to search and display in, such as en or fr. Default en. |
| `type` | string | Optional | item, property Search items (Q ids) or properties (P ids). Default item. |
| `limit` | integer | Optional | Any Results per page, 1 to 50. Default 10. |
| `page` | integer | Optional | Any Page number, from 1. Default 1. |

## Example request

Wikidata

GET /v1/wikidata/entity-search?query=douglas+adams 

```
{
  "success": true,
  "data": {
    "page": 1,
    "has_more": true,
    "count": 10,
    "items": [
      {
        "id": "Q28421831",
        "label": "Douglas Adams",
        "description": "American environmental engineer",
        "match": {
          "type": "label",
          "language": "en",
          "text": "Douglas Adams"
        },
        "url": "https://www.wikidata.org/wiki/Q28421831"
      },
      {
        "id": "Q42",
        "label": "Douglas Adams",
        "description": "British science fiction writer and humorist (1952–2001)",
        "match": {
          "type": "label",
          "language": "mul",
          "text": "Douglas Adams"
        },
        "url": "https://www.wikidata.org/wiki/Q42"
      },
      {
        "id": "Q117249850",
        "label": "Douglas Adams",
        "description": "Global Co-Head of Equity Capital Markets, Citi",
        "match": {
          "type": "label",
          "language": "en",
          "text": "Douglas Adams"
        },
        "url": "https://www.wikidata.org/wiki/Q117249850"
      }
    ]
  },
  "meta": {
    "request_id": "req_d0bfc9da43864c09adc3d26e416ee2e8",
    "credits_charged": 1,
    "credits_remaining": 433
  }
}
```

200 OK JSON X-Credits-Used: 1

Recorded from our API and shortened.

[Run this endpoint in the playground](https://perceptlayer.com/apis/wikidata?try=entity-search#playground) with your own parameters. 1 credit per successful call; failed calls are free.

## Response fields

Each item in `data.items` has these 5 fields, read from a recorded call. The recording leaves out fields that were empty, so a live call can return more.

| Field | Type |
| --- | --- |
| `id` | string |
| `label` | string |
| `description` | string |
| `match` | object |
| `url` | url |
