# What is Crimedata?
Crimedata is a relevant crime data service and is represented by 100 meter grids. Crimedata will help us to know the "Crime Level" of the area, this information is critical for decision-making in many cases such as offering a loan, acquiring a property, locating a business, making delivery deliveries, among others. Additionally, the service shows the number of criminal acts by type.
The main source of information is the INEI, the Judiciary, the Public Ministry, the Ministry of Justice and Human Rights, the Ministry of the Interior, the National Police, INPE, among others. Said information was additionally processed using geostatistical methods to achieve an easy-to-use representation in grids available for any location within the Peruvian territory.
# Important
This document describes the Crimedata API web service. It is intended for website and mobile developers who want to use Crimedata data in maps provided by one of the Geodir platform APIs.
Before you start developing with the Crimedata API, review the authentication requirements (requires an API key) .
# Crimedata API
The following Crimedata requests are available:
- Crimedata LatLon returns the variables with crime level of the requested location latitude, longitude.
- Crimedata con direccion returns returns the variables with the crime level of the address (domicile) requested.
Each of the services is accessed as an HTTP request and returns a JSON or XML response. All requests to a Crimedata service must use the https:// protocol and include an API key.
The Crimedata API uses a Unique Identifier Code (grid_code) to uniquely identify an area of information.
# Crimedata API Request Format
A Crimedata API request has the following form:
https://apis.geodir.co/crimedata/v1/outputFormat?parameters
where outputFormat can be any of the following values:
- json (recommended) indicates output in JavaScript Object Notation (JSON); either
- xml indicates output in XML
Security is important and HTTPS is recommended whenever possible, especially for applications that include sensitive user data, such as a user's location, in requests. Using HTTPS encryption makes your application more secure and more resistant to eavesdropping or tampering.
Note: URLs must be properly encoded (See best practices) to be valid and are limited to 8000 characters for all web services. Keep this limit in mind when creating your URLs. Please note that different browsers, proxies and servers may also have different URL character limits.
Some parameters are required while others are optional. As is standard in URLs, parameters are separated by the ampersand character (&).
# Terms of Use Restrictions
For information on the terms of use, see the Crimedata API Policies and the License Restrictions section of the Geodir Platform Terms of Service.