Press Monitor Wikidata API

Version 1.0.0

REST API for searching and retrieving Wikidata entities. Responses follow a { data, error, errors, meta } envelope.

Base URL

https://api.pressmonitor.com/wikidata/v1

Authentication

ApiKeyAuth

Type: apiKey

GET /search/by-label

Search entities by label/title

Parameters

Name Type In Required Description
query_text string query Required Search text
lang_code string query Optional BCP47 / Wikidata language code (e.g., en, fr, hi)
Default: en
limit integer query Optional Page size
Default: 20
offset integer query Optional Result offset for pagination
Default: 0

Code Examples

curl --request GET \ --url 'https://api.pressmonitor.com/wikidata/v1/search/by-label?query_text=SOME_STRING_VALUE&lang_code=SOME_STRING_VALUE&limit=SOME_INTEGER_VALUE&offset=SOME_INTEGER_VALUE' \ --header 'x-api-key: REPLACE_KEY_VALUE'
import requests url = "https://api.pressmonitor.com/wikidata/v1/search/by-label" querystring = {"query_text":"SOME_STRING_VALUE","lang_code":"SOME_STRING_VALUE","limit":"SOME_INTEGER_VALUE","offset":"SOME_INTEGER_VALUE"} headers = {"x-api-key": "REPLACE_KEY_VALUE"} response = requests.request("GET", url, headers=headers, params=querystring) print(response.text)
const http = require("https"); const options = { "method": "GET", "hostname": "api.pressmonitor.com", "port": null, "path": "/wikidata/v1/search/by-label?query_text=SOME_STRING_VALUE&lang_code=SOME_STRING_VALUE&limit=SOME_INTEGER_VALUE&offset=SOME_INTEGER_VALUE", "headers": { "x-api-key": "REPLACE_KEY_VALUE" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end();
OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://api.pressmonitor.com/wikidata/v1/search/by-label?query_text=SOME_STRING_VALUE&lang_code=SOME_STRING_VALUE&limit=SOME_INTEGER_VALUE&offset=SOME_INTEGER_VALUE") .get() .addHeader("x-api-key", "REPLACE_KEY_VALUE") .build(); Response response = client.newCall(request).execute();
<?php $curl = curl_init(); curl_setopt_array($curl, [ CURLOPT_URL => "https://api.pressmonitor.com/wikidata/v1/search/by-label?query_text=SOME_STRING_VALUE&lang_code=SOME_STRING_VALUE&limit=SOME_INTEGER_VALUE&offset=SOME_INTEGER_VALUE", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", CURLOPT_HTTPHEADER => [ "x-api-key: REPLACE_KEY_VALUE" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; }

Responses

200 OK

Content-Type: application/json

GET /search/by-description

Search entities by description text

Parameters

Name Type In Required Description
query_text string query Required Search text
lang_code string query Optional BCP47 / Wikidata language code (e.g., en, fr, hi)
Default: en
limit integer query Optional Page size
Default: 20
offset integer query Optional Result offset for pagination
Default: 0

Code Examples

curl --request GET \ --url 'https://api.pressmonitor.com/wikidata/v1/search/by-description?query_text=SOME_STRING_VALUE&lang_code=SOME_STRING_VALUE&limit=SOME_INTEGER_VALUE&offset=SOME_INTEGER_VALUE' \ --header 'x-api-key: REPLACE_KEY_VALUE'
import requests url = "https://api.pressmonitor.com/wikidata/v1/search/by-description" querystring = {"query_text":"SOME_STRING_VALUE","lang_code":"SOME_STRING_VALUE","limit":"SOME_INTEGER_VALUE","offset":"SOME_INTEGER_VALUE"} headers = {"x-api-key": "REPLACE_KEY_VALUE"} response = requests.request("GET", url, headers=headers, params=querystring) print(response.text)
const http = require("https"); const options = { "method": "GET", "hostname": "api.pressmonitor.com", "port": null, "path": "/wikidata/v1/search/by-description?query_text=SOME_STRING_VALUE&lang_code=SOME_STRING_VALUE&limit=SOME_INTEGER_VALUE&offset=SOME_INTEGER_VALUE", "headers": { "x-api-key": "REPLACE_KEY_VALUE" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end();
OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://api.pressmonitor.com/wikidata/v1/search/by-description?query_text=SOME_STRING_VALUE&lang_code=SOME_STRING_VALUE&limit=SOME_INTEGER_VALUE&offset=SOME_INTEGER_VALUE") .get() .addHeader("x-api-key", "REPLACE_KEY_VALUE") .build(); Response response = client.newCall(request).execute();
<?php $curl = curl_init(); curl_setopt_array($curl, [ CURLOPT_URL => "https://api.pressmonitor.com/wikidata/v1/search/by-description?query_text=SOME_STRING_VALUE&lang_code=SOME_STRING_VALUE&limit=SOME_INTEGER_VALUE&offset=SOME_INTEGER_VALUE", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", CURLOPT_HTTPHEADER => [ "x-api-key: REPLACE_KEY_VALUE" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; }

Responses

200 OK

Content-Type: application/json

GET /search/by-claim

Search entities where a property has a particular value

Parameters

Name Type In Required Description
property string query Required Wikidata Property id (e.g., P31, P279)
value string query Optional Value for property queries. Can be Q-id, string, number, or date ISO8601.
mode string query Optional Match mode for value: exact, prefix, fulltext
Default: exact
lang_code string query Optional BCP47 / Wikidata language code (e.g., en, fr, hi)
Default: en
limit integer query Optional Page size
Default: 20
offset integer query Optional Result offset for pagination
Default: 0

Code Examples

curl --request GET \ --url 'https://api.pressmonitor.com/wikidata/v1/search/by-claim?property=SOME_STRING_VALUE&value=SOME_STRING_VALUE&mode=SOME_STRING_VALUE&lang_code=SOME_STRING_VALUE&limit=SOME_INTEGER_VALUE&offset=SOME_INTEGER_VALUE' \ --header 'x-api-key: REPLACE_KEY_VALUE'
import requests url = "https://api.pressmonitor.com/wikidata/v1/search/by-claim" querystring = {"property":"SOME_STRING_VALUE","value":"SOME_STRING_VALUE","mode":"SOME_STRING_VALUE","lang_code":"SOME_STRING_VALUE","limit":"SOME_INTEGER_VALUE","offset":"SOME_INTEGER_VALUE"} headers = {"x-api-key": "REPLACE_KEY_VALUE"} response = requests.request("GET", url, headers=headers, params=querystring) print(response.text)
const http = require("https"); const options = { "method": "GET", "hostname": "api.pressmonitor.com", "port": null, "path": "/wikidata/v1/search/by-claim?property=SOME_STRING_VALUE&value=SOME_STRING_VALUE&mode=SOME_STRING_VALUE&lang_code=SOME_STRING_VALUE&limit=SOME_INTEGER_VALUE&offset=SOME_INTEGER_VALUE", "headers": { "x-api-key": "REPLACE_KEY_VALUE" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end();
OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://api.pressmonitor.com/wikidata/v1/search/by-claim?property=SOME_STRING_VALUE&value=SOME_STRING_VALUE&mode=SOME_STRING_VALUE&lang_code=SOME_STRING_VALUE&limit=SOME_INTEGER_VALUE&offset=SOME_INTEGER_VALUE") .get() .addHeader("x-api-key", "REPLACE_KEY_VALUE") .build(); Response response = client.newCall(request).execute();
<?php $curl = curl_init(); curl_setopt_array($curl, [ CURLOPT_URL => "https://api.pressmonitor.com/wikidata/v1/search/by-claim?property=SOME_STRING_VALUE&value=SOME_STRING_VALUE&mode=SOME_STRING_VALUE&lang_code=SOME_STRING_VALUE&limit=SOME_INTEGER_VALUE&offset=SOME_INTEGER_VALUE", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", CURLOPT_HTTPHEADER => [ "x-api-key: REPLACE_KEY_VALUE" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; }

Responses

200 OK

Content-Type: application/json

GET /suggest-entities

Suggest entities by query prefix

Parameters

Name Type In Required Description
query_text string query Required Search text
lang_code string query Optional BCP47 / Wikidata language code (e.g., en, fr, hi)
Default: en
limit integer query Optional Page size
Default: 20
offset integer query Optional Result offset for pagination
Default: 0

Code Examples

curl --request GET \ --url 'https://api.pressmonitor.com/wikidata/v1/suggest-entities?query_text=SOME_STRING_VALUE&lang_code=SOME_STRING_VALUE&limit=SOME_INTEGER_VALUE&offset=SOME_INTEGER_VALUE' \ --header 'x-api-key: REPLACE_KEY_VALUE'
import requests url = "https://api.pressmonitor.com/wikidata/v1/suggest-entities" querystring = {"query_text":"SOME_STRING_VALUE","lang_code":"SOME_STRING_VALUE","limit":"SOME_INTEGER_VALUE","offset":"SOME_INTEGER_VALUE"} headers = {"x-api-key": "REPLACE_KEY_VALUE"} response = requests.request("GET", url, headers=headers, params=querystring) print(response.text)
const http = require("https"); const options = { "method": "GET", "hostname": "api.pressmonitor.com", "port": null, "path": "/wikidata/v1/suggest-entities?query_text=SOME_STRING_VALUE&lang_code=SOME_STRING_VALUE&limit=SOME_INTEGER_VALUE&offset=SOME_INTEGER_VALUE", "headers": { "x-api-key": "REPLACE_KEY_VALUE" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end();
OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://api.pressmonitor.com/wikidata/v1/suggest-entities?query_text=SOME_STRING_VALUE&lang_code=SOME_STRING_VALUE&limit=SOME_INTEGER_VALUE&offset=SOME_INTEGER_VALUE") .get() .addHeader("x-api-key", "REPLACE_KEY_VALUE") .build(); Response response = client.newCall(request).execute();
<?php $curl = curl_init(); curl_setopt_array($curl, [ CURLOPT_URL => "https://api.pressmonitor.com/wikidata/v1/suggest-entities?query_text=SOME_STRING_VALUE&lang_code=SOME_STRING_VALUE&limit=SOME_INTEGER_VALUE&offset=SOME_INTEGER_VALUE", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", CURLOPT_HTTPHEADER => [ "x-api-key: REPLACE_KEY_VALUE" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; }

Responses

200 OK

Content-Type: application/json

GET /search/by-type

Search entities filtered by instance-of/type (e.g., Q5 for human)

Parameters

Name Type In Required Description
query_text string query Required Search text
lang_code string query Optional BCP47 / Wikidata language code (e.g., en, fr, hi)
Default: en
type string query Required Wikidata Q-id for the instance-of / type filter (P31)
limit integer query Optional Page size
Default: 20
offset integer query Optional Result offset for pagination
Default: 0

Code Examples

curl --request GET \ --url 'https://api.pressmonitor.com/wikidata/v1/search/by-type?query_text=SOME_STRING_VALUE&lang_code=SOME_STRING_VALUE&type=SOME_STRING_VALUE&limit=SOME_INTEGER_VALUE&offset=SOME_INTEGER_VALUE' \ --header 'x-api-key: REPLACE_KEY_VALUE'
import requests url = "https://api.pressmonitor.com/wikidata/v1/search/by-type" querystring = {"query_text":"SOME_STRING_VALUE","lang_code":"SOME_STRING_VALUE","type":"SOME_STRING_VALUE","limit":"SOME_INTEGER_VALUE","offset":"SOME_INTEGER_VALUE"} headers = {"x-api-key": "REPLACE_KEY_VALUE"} response = requests.request("GET", url, headers=headers, params=querystring) print(response.text)
const http = require("https"); const options = { "method": "GET", "hostname": "api.pressmonitor.com", "port": null, "path": "/wikidata/v1/search/by-type?query_text=SOME_STRING_VALUE&lang_code=SOME_STRING_VALUE&type=SOME_STRING_VALUE&limit=SOME_INTEGER_VALUE&offset=SOME_INTEGER_VALUE", "headers": { "x-api-key": "REPLACE_KEY_VALUE" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end();
OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://api.pressmonitor.com/wikidata/v1/search/by-type?query_text=SOME_STRING_VALUE&lang_code=SOME_STRING_VALUE&type=SOME_STRING_VALUE&limit=SOME_INTEGER_VALUE&offset=SOME_INTEGER_VALUE") .get() .addHeader("x-api-key", "REPLACE_KEY_VALUE") .build(); Response response = client.newCall(request).execute();
<?php $curl = curl_init(); curl_setopt_array($curl, [ CURLOPT_URL => "https://api.pressmonitor.com/wikidata/v1/search/by-type?query_text=SOME_STRING_VALUE&lang_code=SOME_STRING_VALUE&type=SOME_STRING_VALUE&limit=SOME_INTEGER_VALUE&offset=SOME_INTEGER_VALUE", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", CURLOPT_HTTPHEADER => [ "x-api-key: REPLACE_KEY_VALUE" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; }

Responses

200 OK

Content-Type: application/json

GET /find/by-property

Find entities that contain a given property (optionally with a value/qualifier)

Parameters

Name Type In Required Description
property string query Required Wikidata Property id (e.g., P31, P279)
value string query Optional Value for property queries. Can be Q-id, string, number, or date ISO8601.
qualifier string query Optional Qualifier property id (e.g., P585)
rank string query Optional Preferred/normal/deprecated
lang_code string query Optional BCP47 / Wikidata language code (e.g., en, fr, hi)
Default: en
limit integer query Optional Page size
Default: 20
offset integer query Optional Result offset for pagination
Default: 0

Code Examples

curl --request GET \ --url 'https://api.pressmonitor.com/wikidata/v1/find/by-property?property=SOME_STRING_VALUE&value=SOME_STRING_VALUE&qualifier=SOME_STRING_VALUE&rank=SOME_STRING_VALUE&lang_code=SOME_STRING_VALUE&limit=SOME_INTEGER_VALUE&offset=SOME_INTEGER_VALUE' \ --header 'x-api-key: REPLACE_KEY_VALUE'
import requests url = "https://api.pressmonitor.com/wikidata/v1/find/by-property" querystring = {"property":"SOME_STRING_VALUE","value":"SOME_STRING_VALUE","qualifier":"SOME_STRING_VALUE","rank":"SOME_STRING_VALUE","lang_code":"SOME_STRING_VALUE","limit":"SOME_INTEGER_VALUE","offset":"SOME_INTEGER_VALUE"} headers = {"x-api-key": "REPLACE_KEY_VALUE"} response = requests.request("GET", url, headers=headers, params=querystring) print(response.text)
const http = require("https"); const options = { "method": "GET", "hostname": "api.pressmonitor.com", "port": null, "path": "/wikidata/v1/find/by-property?property=SOME_STRING_VALUE&value=SOME_STRING_VALUE&qualifier=SOME_STRING_VALUE&rank=SOME_STRING_VALUE&lang_code=SOME_STRING_VALUE&limit=SOME_INTEGER_VALUE&offset=SOME_INTEGER_VALUE", "headers": { "x-api-key": "REPLACE_KEY_VALUE" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end();
OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://api.pressmonitor.com/wikidata/v1/find/by-property?property=SOME_STRING_VALUE&value=SOME_STRING_VALUE&qualifier=SOME_STRING_VALUE&rank=SOME_STRING_VALUE&lang_code=SOME_STRING_VALUE&limit=SOME_INTEGER_VALUE&offset=SOME_INTEGER_VALUE") .get() .addHeader("x-api-key", "REPLACE_KEY_VALUE") .build(); Response response = client.newCall(request).execute();
<?php $curl = curl_init(); curl_setopt_array($curl, [ CURLOPT_URL => "https://api.pressmonitor.com/wikidata/v1/find/by-property?property=SOME_STRING_VALUE&value=SOME_STRING_VALUE&qualifier=SOME_STRING_VALUE&rank=SOME_STRING_VALUE&lang_code=SOME_STRING_VALUE&limit=SOME_INTEGER_VALUE&offset=SOME_INTEGER_VALUE", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", CURLOPT_HTTPHEADER => [ "x-api-key: REPLACE_KEY_VALUE" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; }

Responses

200 OK

Content-Type: application/json

GET /search/temporal

Time-aware search over statements (e.g., within a date range)

Parameters

Name Type In Required Description
property string query Required Wikidata Property id (e.g., P31, P279)
from string query Optional Start date (inclusive), ISO 8601 date
to string query Optional End date (inclusive), ISO 8601 date
value string query Optional Value for property queries. Can be Q-id, string, number, or date ISO8601.
lang_code string query Optional BCP47 / Wikidata language code (e.g., en, fr, hi)
Default: en
limit integer query Optional Page size
Default: 20
offset integer query Optional Result offset for pagination
Default: 0

Code Examples

curl --request GET \ --url 'https://api.pressmonitor.com/wikidata/v1/search/temporal?property=SOME_STRING_VALUE&from=SOME_STRING_VALUE&to=SOME_STRING_VALUE&value=SOME_STRING_VALUE&lang_code=SOME_STRING_VALUE&limit=SOME_INTEGER_VALUE&offset=SOME_INTEGER_VALUE' \ --header 'x-api-key: REPLACE_KEY_VALUE'
import requests url = "https://api.pressmonitor.com/wikidata/v1/search/temporal" querystring = {"property":"SOME_STRING_VALUE","from":"SOME_STRING_VALUE","to":"SOME_STRING_VALUE","value":"SOME_STRING_VALUE","lang_code":"SOME_STRING_VALUE","limit":"SOME_INTEGER_VALUE","offset":"SOME_INTEGER_VALUE"} headers = {"x-api-key": "REPLACE_KEY_VALUE"} response = requests.request("GET", url, headers=headers, params=querystring) print(response.text)
const http = require("https"); const options = { "method": "GET", "hostname": "api.pressmonitor.com", "port": null, "path": "/wikidata/v1/search/temporal?property=SOME_STRING_VALUE&from=SOME_STRING_VALUE&to=SOME_STRING_VALUE&value=SOME_STRING_VALUE&lang_code=SOME_STRING_VALUE&limit=SOME_INTEGER_VALUE&offset=SOME_INTEGER_VALUE", "headers": { "x-api-key": "REPLACE_KEY_VALUE" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end();
OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://api.pressmonitor.com/wikidata/v1/search/temporal?property=SOME_STRING_VALUE&from=SOME_STRING_VALUE&to=SOME_STRING_VALUE&value=SOME_STRING_VALUE&lang_code=SOME_STRING_VALUE&limit=SOME_INTEGER_VALUE&offset=SOME_INTEGER_VALUE") .get() .addHeader("x-api-key", "REPLACE_KEY_VALUE") .build(); Response response = client.newCall(request).execute();
<?php $curl = curl_init(); curl_setopt_array($curl, [ CURLOPT_URL => "https://api.pressmonitor.com/wikidata/v1/search/temporal?property=SOME_STRING_VALUE&from=SOME_STRING_VALUE&to=SOME_STRING_VALUE&value=SOME_STRING_VALUE&lang_code=SOME_STRING_VALUE&limit=SOME_INTEGER_VALUE&offset=SOME_INTEGER_VALUE", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", CURLOPT_HTTPHEADER => [ "x-api-key: REPLACE_KEY_VALUE" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; }

Responses

200 OK

Content-Type: application/json

GET /entities/{id}

Get full entity payload by Q-id

Parameters

Name Type In Required Description
id string path Required Wikidata Q-id (e.g., Q42)
lang_code string query Optional BCP47 / Wikidata language code (e.g., en, fr, hi)
Default: en

Code Examples

curl --request GET \ --url 'https://api.pressmonitor.com/wikidata/v1/entities/%7Bid%7D?lang_code=SOME_STRING_VALUE' \ --header 'x-api-key: REPLACE_KEY_VALUE'
import requests url = "https://api.pressmonitor.com/wikidata/v1/entities/%7Bid%7D" querystring = {"lang_code":"SOME_STRING_VALUE"} headers = {"x-api-key": "REPLACE_KEY_VALUE"} response = requests.request("GET", url, headers=headers, params=querystring) print(response.text)
const http = require("https"); const options = { "method": "GET", "hostname": "api.pressmonitor.com", "port": null, "path": "/wikidata/v1/entities/%7Bid%7D?lang_code=SOME_STRING_VALUE", "headers": { "x-api-key": "REPLACE_KEY_VALUE" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end();
OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://api.pressmonitor.com/wikidata/v1/entities/%7Bid%7D?lang_code=SOME_STRING_VALUE") .get() .addHeader("x-api-key", "REPLACE_KEY_VALUE") .build(); Response response = client.newCall(request).execute();
<?php $curl = curl_init(); curl_setopt_array($curl, [ CURLOPT_URL => "https://api.pressmonitor.com/wikidata/v1/entities/%7Bid%7D?lang_code=SOME_STRING_VALUE", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", CURLOPT_HTTPHEADER => [ "x-api-key: REPLACE_KEY_VALUE" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; }

Responses

200 OK

Content-Type: application/json

404 Not found

Content-Type: application/json

GET /entities/{id}/claims

Get flattened/enriched claim statements for an entity

Parameters

Name Type In Required Description
id string path Required Wikidata Q-id (e.g., Q42)
lang_code string query Optional BCP47 / Wikidata language code (e.g., en, fr, hi)
Default: en
limit integer query Optional Page size
Default: 20
limit integer query Optional Page size
Default: 20

Code Examples

curl --request GET \ --url 'https://api.pressmonitor.com/wikidata/v1/entities/%7Bid%7D/claims?lang_code=SOME_STRING_VALUE&limit=SOME_INTEGER_VALUE&offset=SOME_INTEGER_VALUE' \ --header 'x-api-key: REPLACE_KEY_VALUE'
import requests url = "https://api.pressmonitor.com/wikidata/v1/entities/%7Bid%7D/claims" querystring = {"lang_code":"SOME_STRING_VALUE","limit":"SOME_INTEGER_VALUE","offset":"SOME_INTEGER_VALUE"} headers = {"x-api-key": "REPLACE_KEY_VALUE"} response = requests.request("GET", url, headers=headers, params=querystring) print(response.text)
const http = require("https"); const options = { "method": "GET", "hostname": "api.pressmonitor.com", "port": null, "path": "/wikidata/v1/entities/%7Bid%7D/claims?lang_code=SOME_STRING_VALUE&limit=SOME_INTEGER_VALUE&offset=SOME_INTEGER_VALUE", "headers": { "x-api-key": "REPLACE_KEY_VALUE" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end();
OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://api.pressmonitor.com/wikidata/v1/entities/%7Bid%7D/claims?lang_code=SOME_STRING_VALUE&limit=SOME_INTEGER_VALUE&offset=SOME_INTEGER_VALUE") .get() .addHeader("x-api-key", "REPLACE_KEY_VALUE") .build(); Response response = client.newCall(request).execute();
<?php $curl = curl_init(); curl_setopt_array($curl, [ CURLOPT_URL => "https://api.pressmonitor.com/wikidata/v1/entities/%7Bid%7D/claims?lang_code=SOME_STRING_VALUE&limit=SOME_INTEGER_VALUE&offset=SOME_INTEGER_VALUE", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", CURLOPT_HTTPHEADER => [ "x-api-key: REPLACE_KEY_VALUE" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; }

Responses

200 OK

Content-Type: application/json

GET /properties

Get flattened/enriched claim statements for an entity

Parameters

Name Type In Required Description
id string path Required Wikidata Q-id (e.g., Q42)
lang_code string query Optional BCP47 / Wikidata language code (e.g., en, fr, hi)
Default: en
limit integer query Optional Page size
Default: 20
limit integer query Optional Page size
Default: 20

Code Examples

curl --request GET \ --url 'https://api.pressmonitor.com/wikidata/v1/entities/%7Bid%7D/claims?lang_code=SOME_STRING_VALUE&limit=SOME_INTEGER_VALUE&offset=SOME_INTEGER_VALUE' \ --header 'x-api-key: REPLACE_KEY_VALUE'
import requests url = "https://api.pressmonitor.com/wikidata/v1/entities/%7Bid%7D/claims" querystring = {"lang_code":"SOME_STRING_VALUE","limit":"SOME_INTEGER_VALUE","offset":"SOME_INTEGER_VALUE"} headers = {"x-api-key": "REPLACE_KEY_VALUE"} response = requests.request("GET", url, headers=headers, params=querystring) print(response.text)
const http = require("https"); const options = { "method": "GET", "hostname": "api.pressmonitor.com", "port": null, "path": "/wikidata/v1/entities/%7Bid%7D/claims?lang_code=SOME_STRING_VALUE&limit=SOME_INTEGER_VALUE&offset=SOME_INTEGER_VALUE", "headers": { "x-api-key": "REPLACE_KEY_VALUE" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end();
OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://api.pressmonitor.com/wikidata/v1/entities/%7Bid%7D/claims?lang_code=SOME_STRING_VALUE&limit=SOME_INTEGER_VALUE&offset=SOME_INTEGER_VALUE") .get() .addHeader("x-api-key", "REPLACE_KEY_VALUE") .build(); Response response = client.newCall(request).execute();
<?php $curl = curl_init(); curl_setopt_array($curl, [ CURLOPT_URL => "https://api.pressmonitor.com/wikidata/v1/entities/%7Bid%7D/claims?lang_code=SOME_STRING_VALUE&limit=SOME_INTEGER_VALUE&offset=SOME_INTEGER_VALUE", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", CURLOPT_HTTPHEADER => [ "x-api-key: REPLACE_KEY_VALUE" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; }

Responses

200 OK

Content-Type: application/json