---
title: "INE scraping validation"
url: "https://developer.incode.com/api-reference/api-validate-ine/"
section: "api-reference"
group: "API validations"
version: "v1.1"
status: "live"
endpoint: "POST /api/validate/ine"
---
# INE scraping validation

`POST /api/validate/ine`

Base URL: `https://demo-api.incodesmile.com` — Incode demo environment

Check for valid INE directly with an automated search in [https://listanominal.ine.mx/scpln/](https://listanominal.ine.mx/scpln/)
and return corresponding values of that ID.

Scraping service will start working asynchronously and this service will return a resultsId to fetch the results in
[/api/fetch/ine](#/API%20Validations/fetchIne). The recommended wait time is 20 sec.

Possible parameters are ocr, cic, claveElector and numeroEmision but the parameters sent depend on the model of the INE/IFE
to be consulted.

Model C: IFE with emission year from 2008 to 2013, should send claveElector, numeroEmision and ocr from the back of ID.

Model D: INE with emission year from 2013, should send cic from back of ID (9 characters) and OCR from the back of the ID (13 characters).

Model E,F,G,H: INE with emission year from 2014 onwards, should send CIC from the back of the ID (9 characters) and
citizen id (ocr) from the back of the ID (9 characters).

Additional indications and information on the models of the credentials can be found in [https://listanominal.ine.mx/scpln/](https://listanominal.ine.mx/scpln/)

## Path & query parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `api-version` | header | string | yes |  |

## Request body

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `ocr` | string | yes |  |
| `identificadorCiudadano` | string |  |  |
| `cic` | string |  | Mandatory for model D,E,F,G,H |
| `claveElector` | string |  | Mandatory for model C |
| `numeroEmision` | string |  | Mandatory for model C, should have a length of 2: ex 02 |

## Responses

### 200

idResults: String

### 400

Bad Request

Response body (`application/json`):

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `timestamp` | integer (int64) |  | UTC timestamp in milliseconds |
| `status` | integer (int32) |  | Custom error code or HTTP status code |
| `error` | string |  | HTTP status error |
| `message` | string |  | Custom error message |
| `path` | string |  | Endpoint path |
| `details` | object |  | Custom error details |

## Code samples

Generated from this endpoint's method, path, and the conventional Incode headers. The base URL is the Incode demo environment; replace `<YOUR_API_KEY>` with a key for your region.

### cURL

```bash
curl -X POST https://demo-api.incodesmile.com/api/validate/ine \
  -H "x-api-key: <YOUR_API_KEY>" \
  -H "api-version: 1.0" \
  -H "Content-Type: application/json" \
  -d '{
    "ocr": "",
    "identificadorCiudadano": "",
    "cic": "",
    "claveElector": "",
    "numeroEmision": ""
  }'
```

### Node

```js
const res = await fetch("https://demo-api.incodesmile.com/api/validate/ine", {
  method: "POST",
  headers: {
      "x-api-key": "<YOUR_API_KEY>",
      "api-version": "1.0",
      "Content-Type": "application/json",
  },
    body: JSON.stringify({
      "ocr": "",
      "identificadorCiudadano": "",
      "cic": "",
      "claveElector": "",
      "numeroEmision": ""
    }),
});
const data = await res.json();
```

### Python

```python
import requests

headers = {
    "x-api-key": "<YOUR_API_KEY>",
    "api-version": "1.0",
    "Content-Type": "application/json",
}
res = requests.post("https://demo-api.incodesmile.com/api/validate/ine", headers=headers, json={
  "ocr": "",
  "identificadorCiudadano": "",
  "cic": "",
  "claveElector": "",
  "numeroEmision": ""
})
data = res.json()
```

### Java

```java
HttpRequest req = HttpRequest.newBuilder()
    .uri(URI.create("https://demo-api.incodesmile.com/api/validate/ine"))
    .header("x-api-key", "<YOUR_API_KEY>")
    .header("api-version", "1.0")
    .header("Content-Type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"ocr\": \"\",\n  \"identificadorCiudadano\": \"\",\n  \"cic\": \"\",\n  \"claveElector\": \"\",\n  \"numeroEmision\": \"\"\n}"))
    .build();
HttpResponse<String> res = HttpClient.newHttpClient()
    .send(req, HttpResponse.BodyHandlers.ofString());
```

### Example response

```json
{
  "success": true,
  "status": "OK"
}
```
