Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
curl --request POST \
--url https://api.json.pe/api/ruc/trabajadores \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"ruc": "20552103816"
}
'import requests
url = "https://api.json.pe/api/ruc/trabajadores"
payload = { "ruc": "20552103816" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({ruc: '20552103816'})
};
fetch('https://api.json.pe/api/ruc/trabajadores', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.json.pe/api/ruc/trabajadores",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'ruc' => '20552103816'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.json.pe/api/ruc/trabajadores"
payload := strings.NewReader("{\n \"ruc\": \"20552103816\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.json.pe/api/ruc/trabajadores")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"ruc\": \"20552103816\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.json.pe/api/ruc/trabajadores")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"ruc\": \"20552103816\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "exito",
"data": [
{
"periodo": "2025-02",
"numero_trabajadores": "19 810",
"numero_pensionistas": "2",
"numero_prestadores_de_servicio": "155"
},
{
"periodo": "2025-03",
"numero_trabajadores": "19 946",
"numero_pensionistas": "2",
"numero_prestadores_de_servicio": "162"
},
{
"periodo": "2025-04",
"numero_trabajadores": "23 305",
"numero_pensionistas": "2",
"numero_prestadores_de_servicio": "136"
},
{
"periodo": "2025-05",
"numero_trabajadores": "20 445",
"numero_pensionistas": "2",
"numero_prestadores_de_servicio": "169"
},
{
"periodo": "2025-06",
"numero_trabajadores": "20 388",
"numero_pensionistas": "2",
"numero_prestadores_de_servicio": "153"
},
{
"periodo": "2025-07",
"numero_trabajadores": "20 478",
"numero_pensionistas": "2",
"numero_prestadores_de_servicio": "164"
},
{
"periodo": "2025-08",
"numero_trabajadores": "20 719",
"numero_pensionistas": "2",
"numero_prestadores_de_servicio": "169"
},
{
"periodo": "2025-09",
"numero_trabajadores": "20 890",
"numero_pensionistas": "2",
"numero_prestadores_de_servicio": "153"
},
{
"periodo": "2025-10",
"numero_trabajadores": "20 892",
"numero_pensionistas": "2",
"numero_prestadores_de_servicio": "181"
},
{
"periodo": "2025-11",
"numero_trabajadores": "21 045",
"numero_pensionistas": "1",
"numero_prestadores_de_servicio": "159"
},
{
"periodo": "2025-12",
"numero_trabajadores": "21 202",
"numero_pensionistas": "1",
"numero_prestadores_de_servicio": "171"
},
{
"periodo": "2026-01",
"numero_trabajadores": "21 207",
"numero_pensionistas": "1",
"numero_prestadores_de_servicio": "145"
}
]
}{
"success": false,
"message": "Bad Request"
}Consulta trabajadores por RUC.
curl --request POST \
--url https://api.json.pe/api/ruc/trabajadores \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"ruc": "20552103816"
}
'import requests
url = "https://api.json.pe/api/ruc/trabajadores"
payload = { "ruc": "20552103816" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({ruc: '20552103816'})
};
fetch('https://api.json.pe/api/ruc/trabajadores', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.json.pe/api/ruc/trabajadores",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'ruc' => '20552103816'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.json.pe/api/ruc/trabajadores"
payload := strings.NewReader("{\n \"ruc\": \"20552103816\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.json.pe/api/ruc/trabajadores")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"ruc\": \"20552103816\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.json.pe/api/ruc/trabajadores")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"ruc\": \"20552103816\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "exito",
"data": [
{
"periodo": "2025-02",
"numero_trabajadores": "19 810",
"numero_pensionistas": "2",
"numero_prestadores_de_servicio": "155"
},
{
"periodo": "2025-03",
"numero_trabajadores": "19 946",
"numero_pensionistas": "2",
"numero_prestadores_de_servicio": "162"
},
{
"periodo": "2025-04",
"numero_trabajadores": "23 305",
"numero_pensionistas": "2",
"numero_prestadores_de_servicio": "136"
},
{
"periodo": "2025-05",
"numero_trabajadores": "20 445",
"numero_pensionistas": "2",
"numero_prestadores_de_servicio": "169"
},
{
"periodo": "2025-06",
"numero_trabajadores": "20 388",
"numero_pensionistas": "2",
"numero_prestadores_de_servicio": "153"
},
{
"periodo": "2025-07",
"numero_trabajadores": "20 478",
"numero_pensionistas": "2",
"numero_prestadores_de_servicio": "164"
},
{
"periodo": "2025-08",
"numero_trabajadores": "20 719",
"numero_pensionistas": "2",
"numero_prestadores_de_servicio": "169"
},
{
"periodo": "2025-09",
"numero_trabajadores": "20 890",
"numero_pensionistas": "2",
"numero_prestadores_de_servicio": "153"
},
{
"periodo": "2025-10",
"numero_trabajadores": "20 892",
"numero_pensionistas": "2",
"numero_prestadores_de_servicio": "181"
},
{
"periodo": "2025-11",
"numero_trabajadores": "21 045",
"numero_pensionistas": "1",
"numero_prestadores_de_servicio": "159"
},
{
"periodo": "2025-12",
"numero_trabajadores": "21 202",
"numero_pensionistas": "1",
"numero_prestadores_de_servicio": "171"
},
{
"periodo": "2026-01",
"numero_trabajadores": "21 207",
"numero_pensionistas": "1",
"numero_prestadores_de_servicio": "145"
}
]
}{
"success": false,
"message": "Bad Request"
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
El RUC a consultar
"20552103816"
