API
Wikidata API
Wikidata est une base de connaissances collaborative qui compte plus de 121 millions d'éléments couvrant des personnes, organisations, lieux, œuvres et concepts. Elle est importante pour la résolution d'entités, les graphes de connaissances, l'enrichissement de recherche et la recherche structurée.
Documentation API Version: 1.0.0 10 Endpoints Authentification
URL de base
https://api.pressmonitor.co.in Authentification
Toutes les requêtes utilisent un jeton Bearer. Ajoutez l en-tête Authorization à chaque appel.
Authorization: Bearer YOUR_API_KEY
x-subscription-id: YOUR_SUB_ID GET
/suggest-entities Suggérer des entités
Paramètres
| Nom | Type | Emplacement | Obligatoire | Description |
|---|---|---|---|---|
| query_text | string | query | Oui | Texte de la requête |
| lang | string | query | Non | Langue |
| limit | string | query | Non | Limite |
| offset | string | query | Non | Décalage |
Exemples de code
curl -X GET "https://api.pressmonitor.co.in/suggest-entities?query_text=VALUE" -H "Authorization: Bearer YOUR_API_KEY" -H "x-subscription-id: YOUR_SUB_ID" Réponses
200 Succès
GET
/search/by-label Rechercher des entités par libellé
Paramètres
| Nom | Type | Emplacement | Obligatoire | Description |
|---|---|---|---|---|
| query_text | string | query | Oui | Texte de la requête |
| lang | string | query | Non | Langue |
| limit | string | query | Non | Limite |
| offset | string | query | Non | Décalage |
Exemples de code
curl -X GET "https://api.pressmonitor.co.in/search/by-label?query_text=VALUE" -H "Authorization: Bearer YOUR_API_KEY" -H "x-subscription-id: YOUR_SUB_ID" Réponses
200 Succès
GET
/search/by-description Rechercher des entités par description
Paramètres
| Nom | Type | Emplacement | Obligatoire | Description |
|---|---|---|---|---|
| query_text | string | query | Oui | Texte de la requête |
| lang | string | query | Non | Langue |
| limit | string | query | Non | Limite |
| offset | string | query | Non | Décalage |
Exemples de code
curl -X GET "https://api.pressmonitor.co.in/search/by-description?query_text=VALUE" -H "Authorization: Bearer YOUR_API_KEY" -H "x-subscription-id: YOUR_SUB_ID" Réponses
200 Succès
GET
/search/by-type Rechercher des entités par type
Paramètres
| Nom | Type | Emplacement | Obligatoire | Description |
|---|---|---|---|---|
| type | string | query | Oui | Type |
| query_text | string | query | Non | Texte de la requête |
| lang | string | query | Non | Langue |
| limit | string | query | Non | Limite |
| offset | string | query | Non | Décalage |
Exemples de code
curl -X GET "https://api.pressmonitor.co.in/search/by-type?type=VALUE" -H "Authorization: Bearer YOUR_API_KEY" -H "x-subscription-id: YOUR_SUB_ID" Réponses
200 Succès
GET
/search/by-claim Rechercher des entités par valeur de revendication
Paramètres
| Nom | Type | Emplacement | Obligatoire | Description |
|---|---|---|---|---|
| property | string | query | Oui | Propriété |
| value | string | query | Non | Valeur |
| mode | string | query | Non | Mode |
| lang | string | query | Non | Langue |
| limit | string | query | Non | Limite |
| offset | string | query | Non | Décalage |
Exemples de code
curl -X GET "https://api.pressmonitor.co.in/search/by-claim?property=VALUE" -H "Authorization: Bearer YOUR_API_KEY" -H "x-subscription-id: YOUR_SUB_ID" Réponses
200 Succès
GET
/find/by-property Rechercher des entités par propriété
Paramètres
| Nom | Type | Emplacement | Obligatoire | Description |
|---|---|---|---|---|
| property | string | query | Oui | Propriété |
| value | string | query | Non | Valeur |
| qualifier | string | query | Non | Qualificateur |
| rank | string | query | Non | Rang |
| lang | string | query | Non | Langue |
| limit | string | query | Non | Limite |
| offset | string | query | Non | Décalage |
Exemples de code
curl -X GET "https://api.pressmonitor.co.in/find/by-property?property=VALUE" -H "Authorization: Bearer YOUR_API_KEY" -H "x-subscription-id: YOUR_SUB_ID" Réponses
200 Succès
GET
/search/temporal Rechercher des entités par intervalle de dates
Paramètres
| Nom | Type | Emplacement | Obligatoire | Description |
|---|---|---|---|---|
| property | string | query | Oui | Propriété |
| from | string | query | Non | De |
| to | string | query | Non | À |
| value | string | query | Non | Valeur |
| lang | string | query | Non | Langue |
| limit | string | query | Non | Limite |
| offset | string | query | Non | Décalage |
Exemples de code
curl -X GET "https://api.pressmonitor.co.in/search/temporal?property=VALUE" -H "Authorization: Bearer YOUR_API_KEY" -H "x-subscription-id: YOUR_SUB_ID" Réponses
200 Succès
GET
/entities/$0 Obtenir une entité par ID
Paramètres
| Nom | Type | Emplacement | Obligatoire | Description |
|---|---|---|---|---|
| wikidata_id | string | query | Oui | ID Wikidata |
| lang | string | query | Non | Langue |
Exemples de code
curl -X GET "https://api.pressmonitor.co.in/entities/$0?wikidata_id=VALUE" -H "Authorization: Bearer YOUR_API_KEY" -H "x-subscription-id: YOUR_SUB_ID" Réponses
200 Succès
GET
/entities/$0/claims Obtenir les revendications d'une entité
Paramètres
| Nom | Type | Emplacement | Obligatoire | Description |
|---|---|---|---|---|
| wikidata_id | string | query | Oui | ID Wikidata |
| lang | string | query | Non | Langue |
| limit | string | query | Non | Limite |
| offset | string | query | Non | Décalage |
Exemples de code
curl -X GET "https://api.pressmonitor.co.in/entities/$0/claims?wikidata_id=VALUE" -H "Authorization: Bearer YOUR_API_KEY" -H "x-subscription-id: YOUR_SUB_ID" Réponses
200 Succès
GET
/properties Obtenir les propriétés
Exemples de code
curl -X GET "https://api.pressmonitor.co.in/properties" -H "Authorization: Bearer YOUR_API_KEY" -H "x-subscription-id: YOUR_SUB_ID" Réponses
200 Succès