Git Product home page Git Product logo

api-multas's Introduction

💵 API de Multas Brasil

A ideia desse repositório é obter dados de Multas de todos os Detrans, através de Web Scrap e retornar os dados das multas em JSON

Estados suportados

Ainda não suportamos todos os estados, em breve iremos adicionar mais estados, se quiser sugerir um estado, abra uma PR

DETRANS SITUAÇÃO DISPONIBILIDADE
Detran AC Em desenvolvimento
Detran AL DISPONÍVEL Operacional
Detran DF DISPONÍVEL Operacional
Detran GO DISPONÍVEL Operacional
Detran MG DISPONÍVEL Operacional
Detran MS DISPONÍVEL Operacional
Detran PB DISPONÍVEL Operacional
Detran PE DISPONÍVEL Operacional
Detran SE DISPONÍVEL Operacional
Detran AM Em desenvolvimento
Detran BA Em desenvolvimento
Detran CE Em desenvolvimento
Detran ES Em desenvolvimento
Detran MA Em desenvolvimento
Detran MT Em desenvolvimento
Detran PA Em desenvolvimento
Detran PR Em desenvolvimento
Detran RJ Em desenvolvimento
Detran RN Em desenvolvimento
Detran RO Em desenvolvimento
Detran RR Em desenvolvimento
Detran RS Em desenvolvimento
Detran SC Em desenvolvimento
Detran SP Em desenvolvimento
Detran TO Em desenvolvimento

Dependencias (Linux)

apt update -y && apt upgrade -y && apt install git curl -y 

Instalando Node 18 Linux

curl https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash  && source ~/.profile  && nvm install 18 && nvm use 18

Instalando Yarn Linux

curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - && echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list && sudo apt update -y && sudo apt install yarn -y && yarn global add pm2

Instalando Node e Yarn Windows

https://classic.yarnpkg.com/lang/en/docs/install/#windows-stable

https://nodejs.org/pt-br/download

Instalação API

cd /opt/
git clone https://github.com/APIBrasil/api-multas.git && cd /api-multas
cp .env-exemplo .env && yarn && yarn start

Exemplos de requests e respostas

Endpoint

[POST] https://localhost:2222/multas/mg
[POST] https://localhost:2222/multas/al

Payload

O payload é padrão para todos os estados.

{ 
    "placa":"ABC1234",
    "renavam":"00000000000"
}

Response

O response pode variar de acordo com o estado.

{
    "placa": "ABC1234",
    "renavam": "00000000000",
    "multas": [
        {
            "sequencia": "1",
            "processo": "00000000",
            "descricao": "TRANSITAR EM VELOCIDADE SUPERIOR A MAXIMA PERMITIDA EM ATE 2",
            "local": "AV. RISOLETA NEVES  A 138M DA RUA RAIMUNDA FERREIR",
            "valor": 152.11
        },
        {
            "sequencia": "2",
            "processo": "00000000",
            "descricao": "DIRIGIR VEICULO SEGURANDO TELEFONE CELULAR",
            "local": "AVE AFONSO SILVA ESQUINA RUA ESPIRITO DE LUZ",
            "valor": 299.54
        }
    ]
}

Observações

⚠️ Essa API é apenas parte de um estudo pessoal, use em produção por sua conta e risco, lembre-se essa API se basea em técnicas de web scrap para obter os dados em transformar em JSON, se o DETRAN do seu estado alterar algo nos avise para que possamos corrgir.

api-multas's People

Contributors

jhowbhz avatar robsontrasel avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.