Analytics API integration
The Analytics API provides structured access to key performance indicators related to innovation activity, including publication trends, company presence, and funding levels. It enables you to quantify interest, track growth, and assess maturity in specific technologies, organizations, or topics. Ideal for market analysis, technology scouting, and strategic planning, this API delivers data-driven insights to help you identify emerging opportunities and evaluate innovation potential.
Learn more about these indicators in this article.
The API returns data in JSON format.
Getting started
Before integrating the Documents API, you must authenticate and generate a token. You can test the API using the API Demo page, where you can also download a JavaScript demo app to test it directly in your browser.
Make Requests
To interact with the API, you must send HTTP GET or POST requests to the API endpoint using the default content type.
Every request needs a token.
- API Endpoint: https://api.mapegy.com
- Content-Type: application/x-www-form-urlencoded
- Route:
- KPI: /KPIUse this route to retrieve KPIs by query
- For filtering number of documents, you may use the following routes:
- Facets/Documents/Year/
- Facets/Documents/Quarter/
- Facets/Documents/Month/
- KPI: /KPIUse this route to retrieve KPIs by query
- Required parameter: q. Defines the query structure for retrieving documents.Find an example below. You can also learn more about the q parameter here.
{
"format_version": "1.6.0",
"data": {
"semantic": "",
"topics": [
[
"artificial intelligence",
"deep learning"
]
],
"not_topics": [],
"organizations": [],
"not_organizations": []
}
}
Optional Parameters:
- KPI
- type: Restrict results to specific indicators. Just add them as comma-separated values.
- include: Specifies which response fields to retrieve. Simply list the desired response fields, separated by commas. To view all available fields, run a query without specifying this parameter.
- Facets
- country_code: Add two letter country codes to focus on specific countries. Separate values by commas.
- date_from: Set earlier date using the following format: YYYY-MM-DD.
- date_to: Set latest date using the following format: YYYY-MM-DD.
- publisher: Publisher name for science.
- source: News source or science series,
- tag: NEWS tag name.
- patent_granted: Set true or false to filter by patent grant type.
- limit: Restricts the number of results, just enter a number from 1 to 500.
- include: Specifies which response fields to retrieve. Simply list the desired response fields, separated by commas. To view all available fields, run a query without specifying this parameter.
Example: Access the Analytics API with a valid token
- Route: /KPI/?q=
- Method: GET or POST
- Content-Type: application/x-www-form-urlencoded
- Mandatory parameters: q (query), token
- Optional parameters used: type
- Example GET request: Documents/?q=%7B%22format_version%22%3A%221.6.0%22,%22data%22%3A%7B%22semantic%22%3A%22%22,%22topics%22%3A%5B%5B%22artificial%20intelligence%22,%22deep%20learning%22%5D%5D,%22not_topics%22%3A%5B%5D,%22organizations%22%3A%5B%5D,%22not_organizations%22%3A%5B%5D%7D%7D&token=fr9Ch_2BDFI-rBR6edo0Lb-0JRVP6lBb5Fb7p4FYND0Xnlk_2NpNNcJ1IAYlO3SL&type=NB_NEWS
- Example response:
{
"kpi": {
"NB_DOCS": 853644,
"NB_NEWS": 853644
},
"meta": {
"contextual": {
"NB_NEWS": {
"alpha": 0.05,
"algorithm": "sample",
"date_init": "2015-07-03",
"error_est": 8097
}
}
}
}
Note: You may experience timeouts if queries are too broad, for example, retrieving publication trends over long time spans at high resolution (e.g., 10 years in monthly intervals), or requesting too many KPIs for a broad topic.