-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.html
More file actions
869 lines (777 loc) · 24.3 KB
/
index.html
File metadata and controls
869 lines (777 loc) · 24.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
<!DOCTYPE html>
<html lang="pt-BR">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="Documentação completa das APIs utilitárias incluindo consulta de IP, geração de senhas, perfis Netflix e QR Code PIX">
<title>API Utilitários - Documentação</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.7.0/styles/atom-one-dark.min.css">
<style>
:root {
--primary-color: #4361ee;
--secondary-color: #3f37c9;
--accent-color: #4895ef;
--light-color: #f8f9fa;
--dark-color: #212529;
--success-color: #4cc9f0;
--danger-color: #f72585;
--warning-color: #f8961e;
--border-radius: 8px;
--box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
--transition: all 0.3s ease;
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
line-height: 1.6;
color: var(--dark-color);
background-color: #f5f7fa;
}
.container {
max-width: 1200px;
margin: 0 auto;
padding: 0 20px;
}
header {
background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
color: white;
padding: 2rem 0;
box-shadow: var(--box-shadow);
margin-bottom: 2rem;
}
.header-content {
display: flex;
justify-content: space-between;
align-items: center;
flex-wrap: wrap;
}
h1 {
font-size: 2.5rem;
margin-bottom: 0.5rem;
}
.tagline {
font-size: 1.1rem;
opacity: 0.9;
}
.status {
display: inline-flex;
align-items: center;
background-color: rgba(255, 255, 255, 0.2);
padding: 0.5rem 1rem;
border-radius: 20px;
font-size: 0.9rem;
margin-top: 1rem;
}
.status.online {
color: #a7f3d0;
}
.status-dot {
display: inline-block;
width: 10px;
height: 10px;
border-radius: 50%;
background-color: #10b981;
margin-right: 8px;
animation: pulse 2s infinite;
}
@keyframes pulse {
0% { opacity: 1; }
50% { opacity: 0.5; }
100% { opacity: 1; }
}
.author {
margin-top: 1rem;
font-size: 0.9rem;
opacity: 0.8;
}
.api-section {
margin-bottom: 3rem;
}
.api-card {
background-color: white;
border-radius: var(--border-radius);
padding: 1.5rem;
box-shadow: var(--box-shadow);
margin-bottom: 1.5rem;
transition: var(--transition);
}
.api-card:hover {
transform: translateY(-3px);
box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
}
.api-title {
color: var(--primary-color);
margin-bottom: 1rem;
font-size: 1.5rem;
display: flex;
align-items: center;
}
.api-title i {
margin-right: 10px;
}
.endpoint {
display: flex;
align-items: center;
margin-bottom: 1rem;
padding: 0.75rem 1rem;
background-color: #f3f4f6;
border-radius: var(--border-radius);
font-family: 'Courier New', Courier, monospace;
}
.method {
display: inline-block;
padding: 0.25rem 0.75rem;
border-radius: 4px;
font-size: 0.8rem;
font-weight: bold;
margin-right: 1rem;
color: white;
min-width: 60px;
text-align: center;
}
.method.get {
background-color: #61affe;
}
.method.post {
background-color: #49cc90;
}
.path {
word-break: break-all;
}
.section-title {
font-size: 1.8rem;
margin: 2rem 0 1rem;
color: var(--secondary-color);
border-bottom: 2px solid var(--accent-color);
padding-bottom: 0.5rem;
}
.parameters {
width: 100%;
border-collapse: collapse;
margin: 1rem 0;
}
.parameters th, .parameters td {
padding: 0.75rem;
text-align: left;
border-bottom: 1px solid #ddd;
}
.parameters th {
background-color: #f3f4f6;
font-weight: 600;
}
.parameters tr:hover {
background-color: #f9fafb;
}
.required {
color: var(--danger-color);
font-weight: bold;
}
.optional {
color: var(--warning-color);
}
.example {
margin: 1.5rem 0;
}
.example-title {
font-weight: 600;
margin-bottom: 0.5rem;
display: flex;
align-items: center;
}
.example-title i {
margin-right: 8px;
color: var(--accent-color);
}
pre {
background-color: #2b2b2b;
color: #f8f8f2;
padding: 1rem;
border-radius: var(--border-radius);
overflow-x: auto;
font-size: 0.9rem;
line-height: 1.5;
}
.note {
background-color: #eef2ff;
border-left: 4px solid var(--primary-color);
padding: 1rem;
margin: 1rem 0;
border-radius: 0 var(--border-radius) var(--border-radius) 0;
}
.note-title {
font-weight: 600;
margin-bottom: 0.5rem;
color: var(--primary-color);
display: flex;
align-items: center;
}
.note-title i {
margin-right: 8px;
}
footer {
background-color: var(--dark-color);
color: white;
text-align: center;
padding: 2rem 0;
margin-top: 3rem;
}
.footer-content {
display: flex;
flex-direction: column;
align-items: center;
}
.social-links {
margin-top: 1rem;
}
.social-links a {
color: white;
margin: 0 10px;
font-size: 1.2rem;
transition: var(--transition);
}
.social-links a:hover {
color: var(--accent-color);
}
.copyright {
margin-top: 1rem;
font-size: 0.9rem;
opacity: 0.7;
}
@media (max-width: 768px) {
.header-content {
flex-direction: column;
align-items: flex-start;
}
h1 {
font-size: 2rem;
}
.endpoint {
flex-direction: column;
align-items: flex-start;
}
.method {
margin-bottom: 0.5rem;
margin-right: 0;
}
}
</style>
</head>
<body>
<header>
<div class="container header-content">
<div>
<h1>API Utilitários</h1>
<p class="tagline">Documentação completa dos serviços disponíveis</p>
<div class="status online">
<span class="status-dot"></span>
Online
</div>
</div>
</div>
</header>
<main class="container">
<section class="api-section">
<h2 class="section-title"><i class="fas fa-network-wired"></i> Serviços de Rede</h2>
<div class="api-card">
<h3 class="api-title"><i class="fas fa-address-card"></i> Consulta de IP</h3>
<div class="endpoint">
<span class="method get">GET</span>
<span class="path">/meu-ip</span>
</div>
<p>Retorna o endereço IP público do cliente que fez a requisição.</p>
<div class="example">
<div class="example-title"><i class="fas fa-code"></i> Exemplo de resposta</div>
<pre><code class="language-json">{
"ip": "123.45.67.89",
"data_hora": "2023-06-15T14:30:00Z"
}</code></pre>
</div>
</div>
</section>
<section class="api-section">
<h2 class="section-title"><i class="fas fa-lock"></i> Segurança</h2>
<div class="api-card">
<h3 class="api-title"><i class="fas fa-key"></i> Gerador de Senhas</h3>
<div class="endpoint">
<span class="method get">GET</span>
<span class="path">/gerar-senha?tamanho=12&caracteres=todos</span>
</div>
<p>Gera senhas aleatórias seguras com opções de personalização.</p>
<table class="parameters">
<thead>
<tr>
<th>Parâmetro</th>
<th>Tipo</th>
<th>Obrigatório</th>
<th>Descrição</th>
<th>Valores</th>
</tr>
</thead>
<tbody>
<tr>
<td>tamanho</td>
<td>integer</td>
<td class="optional">Opcional</td>
<td>Tamanho da senha</td>
<td>Padrão: 12 (min: 6, max: 32)</td>
</tr>
<tr>
<td>caracteres</td>
<td>string</td>
<td class="optional">Opcional</td>
<td>Tipo de caracteres a incluir</td>
<td>letras, numeros, simbolos, todos (padrão: todos)</td>
</tr>
</tbody>
</table>
<div class="example">
<div class="example-title"><i class="fas fa-code"></i> Exemplo de requisição</div>
<pre><code class="language-http">GET /gerar-senha?tamanho=16&caracteres=letras,numeros</code></pre>
</div>
<div class="example">
<div class="example-title"><i class="fas fa-code"></i> Exemplo de resposta</div>
<pre><code class="language-json">{
"senha": "AbcDefGhIjKlMnOp",
"tamanho": 16,
"caracteres_utilizados": ["letras", "numeros"],
"forca": "forte"
}</code></pre>
</div>
</div>
</section>
<section class="api-section">
<h2 class="section-title"><i class="fas fa-tv"></i> Entretenimento</h2>
<div class="api-card">
<h3 class="api-title"><i class="fas fa-film"></i> Perfil Netflix</h3>
<div class="endpoint">
<span class="method get">GET</span>
<span class="path">/netflix-profile?nome=Convidado</span>
</div>
<p>Gera um perfil fictício no estilo Netflix com avatar e cor personalizada.</p>
<table class="parameters">
<thead>
<tr>
<th>Parâmetro</th>
<th>Tipo</th>
<th>Obrigatório</th>
<th>Descrição</th>
</tr>
</thead>
<tbody>
<tr>
<td>nome</td>
<td>string</td>
<td class="optional">Opcional</td>
<td>Nome do perfil (padrão: "Convidado")</td>
</tr>
</tbody>
</table>
<div class="example">
<div class="example-title"><i class="fas fa-code"></i> Exemplo de resposta</div>
<pre><code class="language-json">{
"id": 1,
"nome": "Ulysses",
"avatar": "https://loodibee.com/wp-content/uploads/Netflix-avatar-12.png",
"cor": "#FFD700",
"data_criacao": "2023-06-15T14:30:00Z"
}</code></pre>
</div>
<div class="note">
<div class="note-title"><i class="fas fa-info-circle"></i> Observação</div>
<p>O avatar é fixo no estilo Netflix. A cor do perfil é gerada automaticamente com base no nome fornecido.</p>
</div>
</div>
</section>
<section class="api-section">
<h2 class="section-title"><i class="fas fa-qrcode"></i> Pagamentos</h2>
<div class="api-card">
<h3 class="api-title"><i class="fas fa-money-bill-wave"></i> Gerador de QR Code PIX</h3>
<div class="endpoint">
<span class="method post">POST</span>
<span class="path">/pix?chave=seuchave@pix.com&nome=SEU_NOME&valor=5.00&mensagem=Pagamento</span>
</div>
<p>Gera um QR Code PIX com payload e imagem em base64 para pagamentos instantâneos.</p>
<table class="parameters">
<thead>
<tr>
<th>Parâmetro</th>
<th>Tipo</th>
<th>Obrigatório</th>
<th>Descrição</th>
<th>Limite</th>
</tr>
</thead>
<tbody>
<tr>
<td>chave</td>
<td>string</td>
<td class="required">Sim</td>
<td>Chave Pix (CPF, CNPJ, telefone, e-mail ou aleatória)</td>
<td>Até 140 caracteres</td>
</tr>
<tr>
<td>nome</td>
<td>string</td>
<td class="required">Sim</td>
<td>Nome do recebedor</td>
<td>Até 25 caracteres</td>
</tr>
<tr>
<td>cidade</td>
<td>string</td>
<td class="required">Sim</td>
<td>Cidade do recebedor</td>
<td>Até 15 caracteres</td>
</tr>
<tr>
<td>valor</td>
<td>string</td>
<td class="required">Sim</td>
<td>Valor da transação (usar ponto como separador decimal)</td>
<td>Decimal positivo</td>
</tr>
<tr>
<td>mensagem</td>
<td>string</td>
<td class="optional">Não</td>
<td>Mensagem adicional no QR Code</td>
<td>Até 50 caracteres</td>
</tr>
</tbody>
</table>
<div class="example">
<div class="example-title"><i class="fas fa-code"></i> Exemplo de requisição</div>
<pre><code class="language-json">{
"chave": "16seuchave@pix.com",
"nome": "Nickolas",
"cidade": "BRASILIA",
"valor": "44.50",
"mensagem": "Pagamento"
}</code></pre>
</div>
<div class="example">
<div class="example-title"><i class="fas fa-code"></i> Exemplo de resposta</div>
<pre><code class="language-json">{
"status": "success",
"message": "QR Code gerado com sucesso",
"payload": "00020101021226360014br.gov.bcb.pix011416seuchave@pix.com5204000053039865445.005802BR598Nickolas608BRASILIA62130503Pagamento63047781",
"qrcode": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMQAAADECAYAAADApo5rAAAA...",
"timestamp": "2023-06-15T14:30:00Z"
}</code></pre>
</div>
<div class="note">
<div class="note-title"><i class="fas fa-lightbulb"></i> Como usar</div>
<ol>
<li>Faça uma requisição <strong>POST</strong> para o endpoint <code>/pix</code> com os dados do pagamento</li>
<li>A API retornará o <strong>payload</strong> (texto do BR Code) e a imagem do QR Code em <strong>base64</strong></li>
<li>Exiba a imagem no navegador com a tag <code><img src="..."></code> usando o valor de <code>qrcode</code></li>
<li>Para pagamentos, o usuário pode escanear o QR Code com qualquer app de banco</li>
</ol>
</div>
</div>
</section>
<section class="api-section">
<h2 class="section-title"><i class="fas fa-user-friends"></i> Identificação</h2>
<div class="api-card">
<h3 class="api-title"><i class="fas fa-venus-mars"></i> Identificador de Gênero</h3>
<div class="endpoint">
<span class="method get">GET</span>
<span class="path">/genero?nome=Lucas</span>
</div>
<p>Detecta o provável gênero associado a um nome fornecido. Usa um modelo estatístico baseado em nomes comuns.</p>
<table class="parameters">
<thead>
<tr>
<th>Parâmetro</th>
<th>Tipo</th>
<th>Descrição</th>
<th>Obrigatório</th>
</tr>
</thead>
<tbody>
<tr>
<td>nome</td>
<td>string</td>
<td>Nome para o qual se deseja identificar o gênero</td>
<td class="required">Sim</td>
</tr>
</tbody>
</table>
<div class="example">
<div class="example-title"><i class="fas fa-code"></i> Exemplo de resposta</div>
<pre><code class="language-json">{
"nome": "Lucas",
"genero": "masculino",
"probabilidade": 0.99
}</code></pre>
</div>
<div class="note">
<div class="note-title"><i class="fas fa-info-circle"></i> Observações</div>
<p>Este endpoint retorna apenas estimativas. Não é garantido que o gênero esteja correto para nomes unissex ou pouco comuns.</p>
</div>
</div>
</section>
<section class="api-section">
<h2 class="section-title"><i class="fas fa-futbol"></i> Futebol - Partidas Encerradas</h2>
<div class="api-card">
<h3 class="api-title"><i class="fas fa-calendar-check"></i> Jogos de Futebol Finalizados</h3>
<div class="endpoint">
<span class="method get">GET</span>
<span class="path">/futebol</span>
</div>
<p>Retorna uma lista de partidas de futebol que já ocorreram, incluindo informações detalhadas como placar, equipes, data e local.</p>
<div class="example">
<div class="example-title"><i class="fas fa-code"></i> Exemplo de resposta</div>
<pre><code>{
"data": [
{
"idEvent": "1032718",
"strEvent": "Flamengo vs Palmeiras",
"dateEvent": "2025-05-20",
"strTime": "19:00:00",
"strLeague": "Brasileirão Série A",
"strHomeTeam": "Flamengo",
"strAwayTeam": "Palmeiras",
"intHomeScore": "2",
"intAwayScore": "1",
"strVenue": "Maracanã",
"strStatus": "Match Finished"
},
{
"idEvent": "1032719",
"strEvent": "Manchester United vs Chelsea",
"dateEvent": "2025-05-21",
"strTime": "16:30:00",
"strLeague": "Premier League",
"strHomeTeam": "Manchester United",
"strAwayTeam": "Chelsea",
"intHomeScore": "1",
"intAwayScore": "1",
"strVenue": "Old Trafford",
"strStatus": "Match Finished"
}
]
}</code></pre>
</div>
<table class="parameters">
<thead>
<tr>
<th>Campo</th>
<th>Tipo</th>
<th>Descrição</th>
</tr>
</thead>
<tbody>
<tr>
<td>idEvent</td>
<td>string</td>
<td>Identificador único da partida</td>
</tr>
<tr>
<td>strEvent</td>
<td>string</td>
<td>Descrição do evento (ex: Flamengo vs Palmeiras)</td>
</tr>
<tr>
<td>dateEvent</td>
<td>string</td>
<td>Data da partida (formato YYYY-MM-DD)</td>
</tr>
<tr>
<td>strTime</td>
<td>string</td>
<td>Horário de início da partida (formato HH:MM:SS)</td>
</tr>
<tr>
<td>strLeague</td>
<td>string</td>
<td>Nome da liga ou campeonato</td>
</tr>
<tr>
<td>strHomeTeam</td>
<td>string</td>
<td>Nome do time mandante</td>
</tr>
<tr>
<td>strAwayTeam</td>
<td>string</td>
<td>Nome do time visitante</td>
</tr>
<tr>
<td>intHomeScore</td>
<td>string</td>
<td>Gols do time mandante</td>
</tr>
<tr>
<td>intAwayScore</td>
<td>string</td>
<td>Gols do time visitante</td>
</tr>
<tr>
<td>strVenue</td>
<td>string</td>
<td>Estádio onde ocorreu a partida</td>
</tr>
<tr>
<td>strStatus</td>
<td>string</td>
<td>Status da partida (ex: Match Finished)</td>
</tr>
</tbody>
</table>
<div class="note">
<div class="note-title"><i class="fas fa-info-circle"></i> Nota</div>
<p>Os dados são atualizados diariamente e representam apenas jogos finalizados. (Em breve Melhorias).</p>
</div>
</div>
</section>
<section class="api-section">
<h2 class="section-title"><i class="fas fa-exchange-alt"></i> Conversão de Moeda</h2>
<div class="api-card">
<h3 class="api-title"><i class="fas fa-dollar-sign"></i> Conversor de Moeda</h3>
<div class="endpoint">
<span class="method get">GET</span>
<span class="path">/conversor?de=USD¶=BRL&valor=10</span>
</div>
<p>Converte um valor de uma moeda para outra com base nas cotações em tempo real.</p>
<div class="example">
<div class="example-title"><i class="fas fa-code"></i> Exemplo de resposta</div>
<pre><code>{
"de": "USD",
"para": "BRL",
"valor_original": "10",
"cotacao": 5.02,
"valor_convertido": "50.20"
}</code></pre>
</div>
<table class="parameters">
<thead>
<tr>
<th>Parâmetro</th>
<th>Tipo</th>
<th>Obrigatório</th>
<th>Descrição</th>
</tr>
</thead>
<tbody>
<tr>
<td>de</td>
<td>string</td>
<td>Sim</td>
<td>Moeda de origem (ex: <code>USD</code>, <code>BRL</code>, <code>EUR</code>)</td>
</tr>
<tr>
<td>para</td>
<td>string</td>
<td>Sim</td>
<td>Moeda de destino (ex: <code>BRL</code>, <code>USD</code>)</td>
</tr>
<tr>
<td>valor</td>
<td>string ou número</td>
<td>Sim</td>
<td>Valor numérico a ser convertido</td>
</tr>
</tbody>
</table>
<div class="note">
<div class="note-title"><i class="fas fa-info-circle"></i> Nota</div>
<p>Limite de <strong>10 requisições por minuto</strong> por IP. Os dados são baseados na cotação atual extraída do site do Banco Central.</p>
</div>
</div>
</section>
<section class="api-section">
<h2 class="section-title"><i class="fas fa-shield-alt"></i> Proxy CORS</h2>
<div class="api-card">
<h3 class="api-title"><i class="fas fa-exchange-alt"></i> CORS Proxy</h3>
<div class="endpoint">
<span class="method get">GET</span>
<span class="path">/proxy?url=https://site.com/endpoint</span>
</div>
<p>
Esta API serve como um proxy para contornar bloqueios de <strong>CORS (Cross-Origin Resource Sharing)</strong>.
Ela permite que você faça requisições para outros sites (APIs externas) que normalmente estariam bloqueadas no navegador por segurança.
</p>
<p>
É útil para frontend que precisa acessar uma API que <strong>não envia os cabeçalhos CORS corretos</strong>. O servidor da nossa API adiciona automaticamente os cabeçalhos:
</p>
<pre><code>
Access-Control-Allow-Origin: *
Access-Control-Allow-Methods: GET
</code></pre>
<div class="example">
<div class="example-title"><i class="fas fa-code"></i> Exemplo de uso</div>
<pre><code>
GET /proxy?url=https://jsonplaceholder.typicode.com/posts/1
</code></pre>
<p>Resposta (redirecionada e com CORS liberado):</p>
<pre><code>{
"userId": 1,
"id": 1,
"title": "sunt aut facere...",
"body": "quia et suscipit..."
}</code></pre>
</div>
<table class="parameters">
<thead>
<tr>
<th>Parâmetro</th>
<th>Tipo</th>
<th>Obrigatório</th>
<th>Descrição</th>
</tr>
</thead>
<tbody>
<tr>
<td>url</td>
<td>string</td>
<td>Sim</td>
<td>URL completa do site ou API de destino. Deve começar com <code>http://</code> ou <code>https://</code></td>
</tr>
</tbody>
</table>
<div class="note">
<div class="note-title"><i class="fas fa-info-circle"></i> Nota</div>
<p>
Essa API não executa JavaScript dos sites de destino, apenas retorna o conteúdo bruto (HTML, JSON, etc). Se o site de destino precisa de execução de scripts para gerar conteúdo, isso não será refletido na resposta.
</p>
</div>
</div>
</section>
<section class="api-section">
<h2 class="section-title"><i class="fas fa-clock"></i> Fuso Horário</h2>
<div class="api-card">
<h3 class="api-title"><i class="fas fa-clock"></i> Consulta de Data/Hora</h3>
<div class="endpoint">
<span class="method get">GET</span>
<span class="path">/datetime</span>
</div>
<p>Retorna a Data/Hora, Data e Hora.</p>
<div class="example">
<div class="example-title"><i class="fas fa-code"></i> Exemplo de resposta</div>
<pre><code class="language-json">{"datetime":"2025-08-05 02:58:17","date":"2025-08-05","time":"02:58:17"}</code></pre>
</div>
</div>
</section>
<section class="api-section">
</main>
<footer>
<div class="container footer-content">
<p>Desenvolvido por <strong>AGL SK</strong></p>
<div class="social-links">
<a href="https://github.com/aglsk" aria-label="GitHub"><i class="fab fa-github"></i></a>
<a href="#" aria-label="LinkedIn"><i class="fab fa-linkedin"></i></a>
<a href="#" aria-label="Twitter"><i class="fab fa-twitter"></i></a>
</div>
<p class="copyright">© 2025 API Utilitários. Todos os direitos reservados.</p>
</div>
</footer>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.7.0/highlight.min.js"></script>
<script>hljs.highlightAll();</script>
</body>
</html>