<s>
A	O
web	B-General_Concept
API	I-General_Concept
is	O
an	O
application	B-Application
programming	I-Application
interface	I-Application
(	O
API	B-Application
)	O
for	O
either	O
a	O
web	B-Application
server	I-Application
or	O
a	O
web	B-Application
browser	I-Application
.	O
</s>
<s>
As	O
a	O
web	O
development	O
concept	O
,	O
it	O
can	O
be	O
related	O
to	O
a	O
web	B-Application
application	I-Application
's	O
client	B-Protocol
side	I-Protocol
(	O
including	O
any	O
web	B-Application
frameworks	I-Application
being	O
used	O
)	O
.	O
</s>
<s>
A	O
server-side	B-Application
web	B-General_Concept
API	I-General_Concept
consists	O
of	O
one	O
or	O
more	O
publicly	O
exposed	O
endpoints	O
to	O
a	O
defined	O
request	B-Protocol
–	I-Protocol
response	I-Protocol
message	O
system	O
,	O
typically	O
expressed	O
in	O
JSON	B-General_Concept
or	O
XML	B-Protocol
by	O
means	O
of	O
an	O
HTTP-based	O
web	B-Application
server	I-Application
.	O
</s>
<s>
A	O
server	B-General_Concept
API	I-General_Concept
(	O
SAPI	O
)	O
is	O
not	O
considered	O
a	O
server-side	B-Application
web	B-General_Concept
API	I-General_Concept
,	O
unless	O
it	O
is	O
publicly	O
accessible	O
by	O
a	O
remote	O
web	B-Application
application	I-Application
.	O
</s>
<s>
A	O
client-side	B-Operating_System
web	B-General_Concept
API	I-General_Concept
is	O
a	O
programmatic	O
interface	O
to	O
extend	O
functionality	O
within	O
a	O
web	B-Application
browser	I-Application
or	O
other	O
HTTP	B-Application
client	I-Application
.	O
</s>
<s>
Originally	O
these	O
were	O
most	O
commonly	O
in	O
the	O
form	O
of	O
native	O
plug-in	B-Application
browser	B-Protocol
extensions	I-Protocol
however	O
most	O
newer	O
ones	O
target	O
standardized	O
JavaScript	B-Language
bindings	O
.	O
</s>
<s>
The	B-Operating_System
Mozilla	I-Operating_System
Foundation	I-Operating_System
created	O
their	O
WebAPI	B-General_Concept
specification	O
which	O
is	O
designed	O
to	O
help	O
replace	O
native	O
mobile	O
applications	O
with	O
HTML5	B-Application
applications	O
.	O
</s>
<s>
Google	B-Application
created	O
their	O
Native	B-Application
Client	I-Application
architecture	O
which	O
is	O
designed	O
to	O
help	O
replace	O
insecure	O
native	O
plug-ins	B-Application
with	O
secure	O
native	O
sandboxed	O
extensions	O
and	O
applications	O
.	O
</s>
<s>
They	O
have	O
also	O
made	O
this	O
portable	O
by	O
employing	O
a	O
modified	O
LLVM	B-Application
AOT	B-Application
compiler	I-Application
.	O
</s>
<s>
A	O
server-side	B-Application
web	B-General_Concept
API	I-General_Concept
consists	O
of	O
one	O
or	O
more	O
publicly	O
exposed	O
endpoints	O
to	O
a	O
defined	O
request	B-Protocol
–	I-Protocol
response	I-Protocol
message	O
system	O
,	O
typically	O
expressed	O
in	O
JSON	B-General_Concept
or	O
XML	B-Protocol
.	O
</s>
<s>
The	O
web	B-General_Concept
API	I-General_Concept
is	O
exposed	O
most	O
commonly	O
by	O
means	O
of	O
an	O
HTTP-based	O
web	B-Application
server	I-Application
.	O
</s>
<s>
Mashups	B-Application
are	O
web	B-Application
applications	I-Application
which	O
combine	O
the	O
use	O
of	O
multiple	O
server-side	B-Application
web	B-General_Concept
APIs	I-General_Concept
.	O
</s>
<s>
Webhooks	B-Protocol
are	O
server-side	B-Application
web	B-General_Concept
APIs	I-General_Concept
that	O
take	O
input	O
as	O
a	O
Uniform	B-Protocol
Resource	I-Protocol
Identifier	I-Protocol
(	O
URI	B-Protocol
)	O
that	O
is	O
designed	O
to	O
be	O
used	O
like	O
a	O
remote	O
named	B-Operating_System
pipe	I-Operating_System
or	O
a	O
type	O
of	O
callback	O
such	O
that	O
the	O
server	O
acts	O
as	O
a	O
client	O
to	O
dereference	O
the	O
provided	O
URI	B-Protocol
and	O
trigger	O
an	O
event	O
on	O
another	O
server	O
which	O
handles	O
this	O
event	O
thus	O
providing	O
a	O
type	O
of	O
peer-to-peer	O
IPC	B-Operating_System
.	O
</s>
<s>
Endpoints	O
are	O
important	O
aspects	O
of	O
interacting	O
with	O
server-side	B-Application
web	B-General_Concept
APIs	I-General_Concept
,	O
as	O
they	O
specify	O
where	O
resources	O
lie	O
that	O
can	O
be	O
accessed	O
by	O
third	O
party	O
software	O
.	O
</s>
<s>
Usually	O
the	O
access	O
is	O
via	O
a	O
URI	B-Protocol
to	O
which	O
HTTP	B-Protocol
requests	I-Protocol
are	O
posted	O
,	O
and	O
from	O
which	O
the	O
response	O
is	O
thus	O
expected	O
.	O
</s>
<s>
Web	B-General_Concept
APIs	I-General_Concept
may	O
be	O
public	O
or	O
private	O
,	O
the	O
latter	O
of	O
which	O
requires	O
an	O
access	O
token	O
.	O
</s>
<s>
As	O
API	B-Application
providers	O
still	O
want	O
to	O
update	O
their	O
web	B-General_Concept
APIs	I-General_Concept
,	O
many	O
have	O
introduced	O
a	O
versioning	O
system	O
in	O
the	O
URI	B-Protocol
that	O
points	O
to	O
an	O
endpoint	O
.	O
</s>
<s>
Web	O
2.0	O
Web	B-General_Concept
APIs	I-General_Concept
often	O
use	O
machine-based	O
interactions	O
such	O
as	O
REST	B-Protocol
and	O
SOAP	B-Application
.	O
</s>
<s>
RESTful	B-Protocol
web	B-General_Concept
APIs	I-General_Concept
use	O
HTTP	B-Protocol
methods	O
to	O
access	O
resources	O
via	O
URL-encoded	O
parameters	O
,	O
and	O
use	O
JSON	B-General_Concept
or	O
XML	B-Protocol
to	O
transmit	O
data	O
.	O
</s>
<s>
By	O
contrast	O
,	O
SOAP	B-Application
protocols	O
are	O
standardized	O
by	O
the	O
W3C	O
and	O
mandate	O
the	O
use	O
of	O
XML	B-Protocol
as	O
the	O
payload	O
format	O
,	O
typically	O
over	O
HTTP	B-Protocol
.	I-Protocol
</s>
<s>
Furthermore	O
,	O
SOAP-based	O
Web	B-General_Concept
APIs	I-General_Concept
use	O
XML	B-Language
validation	I-Language
to	O
ensure	O
structural	O
message	O
integrity	O
,	O
by	O
leveraging	O
the	O
XML	B-Language
schemas	I-Language
provisioned	O
with	O
WSDL	O
documents	O
.	O
</s>
<s>
A	O
WSDL	O
document	O
accurately	O
defines	O
the	O
XML	B-Protocol
messages	O
and	O
transport	O
bindings	O
of	O
a	O
Web	O
service	O
.	O
</s>
<s>
Server-side	B-Application
web	B-General_Concept
APIs	I-General_Concept
are	O
interfaces	O
for	O
the	O
outside	O
world	O
to	O
interact	O
with	O
the	O
business	O
logic	O
.	O
</s>
<s>
However	O
,	O
in	O
order	O
to	O
provide	O
a	O
web	B-General_Concept
API	I-General_Concept
of	O
high	O
quality	O
,	O
there	O
needs	O
to	O
be	O
a	O
sufficient	O
level	O
of	O
documentation	O
.	O
</s>
<s>
One	O
API	B-Application
provider	O
that	O
not	O
only	O
provides	O
documentation	O
,	O
but	O
also	O
links	O
to	O
it	O
in	O
its	O
error	O
messages	O
is	O
Twilio	O
.	O
</s>
<s>
However	O
,	O
there	O
are	O
now	O
directories	O
of	O
popular	O
documented	O
server-side	B-Application
web	B-General_Concept
APIs	I-General_Concept
.	O
</s>
<s>
The	O
number	O
of	O
available	O
web	B-General_Concept
APIs	I-General_Concept
has	O
grown	O
consistently	O
over	O
the	O
past	O
years	O
,	O
as	O
businesses	O
realize	O
the	O
growth	O
opportunities	O
associated	O
with	O
running	O
an	O
open	O
platform	O
,	O
that	O
any	O
developer	O
can	O
interact	O
with	O
.	O
</s>
<s>
ProgrammableWeb	B-Application
tracks	O
over	O
24000	O
Web	B-General_Concept
APIs	I-General_Concept
that	O
were	O
available	O
in	O
2022	O
,	O
up	O
from	O
105	O
in	O
2005	O
.	O
</s>
<s>
Web	B-General_Concept
APIs	I-General_Concept
have	O
become	O
ubiquitous	O
.	O
</s>
<s>
There	O
are	O
few	O
major	O
software	O
applications/services	O
that	O
do	O
not	O
offer	O
some	O
form	O
of	O
web	B-General_Concept
API	I-General_Concept
.	O
</s>
<s>
One	O
of	O
the	O
most	O
common	O
forms	O
of	O
interacting	O
with	O
these	O
web	B-General_Concept
APIs	I-General_Concept
is	O
via	O
embedding	O
external	O
resources	O
,	O
such	O
as	O
tweets	O
,	O
Facebook	O
comments	O
,	O
YouTube	O
videos	O
,	O
etc	O
.	O
</s>
<s>
Any	O
website	O
of	O
the	O
TOP	O
100	O
Alexa	O
Internet	O
ranked	O
websites	O
uses	O
APIs	B-Application
and/or	O
provides	O
its	O
own	O
APIs	B-Application
,	O
which	O
is	O
a	O
very	O
distinct	O
indicator	O
for	O
the	O
prodigious	O
scale	O
and	O
impact	O
of	O
web	B-General_Concept
APIs	I-General_Concept
as	O
a	O
whole	O
.	O
</s>
<s>
As	O
the	O
number	O
of	O
available	O
web	B-General_Concept
APIs	I-General_Concept
has	O
grown	O
,	O
open	O
source	O
tools	O
have	O
been	O
developed	O
to	O
provide	O
more	O
sophisticated	O
search	O
and	O
discovery	O
.	O
</s>
<s>
APIs.json	O
provides	O
a	O
machine-readable	O
description	O
of	O
an	O
API	B-Application
and	O
its	O
operations	O
,	O
and	O
the	O
related	O
project	O
APIs.io	O
offers	O
a	O
searchable	O
public	O
listing	O
of	O
APIs	B-Application
based	O
on	O
the	O
APIs.json	O
metadata	O
format	O
.	O
</s>
<s>
Many	O
companies	O
and	O
organizations	O
rely	O
heavily	O
on	O
their	O
Web	B-General_Concept
API	I-General_Concept
infrastructure	O
to	O
serve	O
their	O
core	O
business	O
clients	O
.	O
</s>
<s>
In	O
2014	O
Netflix	O
received	O
around	O
5	O
billion	O
API	B-Application
requests	O
,	O
most	O
of	O
them	O
within	O
their	O
private	O
API	B-Application
.	O
</s>
<s>
The	O
interfaces	O
through	O
which	O
this	O
data	O
is	O
typically	O
made	O
accessible	O
are	O
web	B-General_Concept
APIs	I-General_Concept
.	O
</s>
<s>
Web	B-General_Concept
APIs	I-General_Concept
allow	O
for	O
data	O
,	O
such	O
as	O
"	O
budget	O
,	O
public	O
works	O
,	O
crime	O
,	O
legal	O
,	O
and	O
other	O
agency	O
data	O
"	O
to	O
be	O
accessed	O
by	O
any	O
developer	O
in	O
a	O
convenient	O
manner	O
.	O
</s>
<s>
An	O
example	O
of	O
a	O
popular	O
web	B-General_Concept
API	I-General_Concept
is	O
the	O
Astronomy	O
Picture	O
of	O
the	O
Day	O
API	B-Application
operated	O
by	O
the	O
American	O
space	O
agency	O
NASA	O
.	O
</s>
<s>
It	O
is	O
a	O
server-side	B-Application
API	B-Application
used	O
to	O
retrieve	O
photographs	O
of	O
space	O
or	O
other	O
images	O
of	O
interest	O
to	O
astronomers	O
,	O
and	O
metadata	O
about	O
the	O
images	O
.	O
</s>
<s>
According	O
to	O
the	O
API	B-Application
documentation	I-Application
,	O
the	O
API	B-Application
has	O
one	O
endpoint	O
:	O
</s>
<s>
It	O
requires	O
one	O
piece	O
of	O
information	O
from	O
the	O
user	O
,	O
an	O
API	B-General_Concept
key	I-General_Concept
,	O
and	O
accepts	O
several	O
other	O
optional	O
pieces	O
of	O
information	O
.	O
</s>
<s>
The	O
parameters	O
for	O
this	O
API	B-Application
are	O
written	O
in	O
a	O
format	O
known	O
as	O
a	O
query	B-Protocol
string	I-Protocol
,	O
which	O
is	O
separated	O
by	O
a	O
question	O
mark	O
character	O
(	O
?	O
)	O
</s>
<s>
An	O
ampersand	O
( &	O
)	O
separates	O
the	O
parameters	O
in	O
the	O
query	B-Protocol
string	I-Protocol
from	O
each	O
other	O
.	O
</s>
<s>
Together	O
,	O
the	O
endpoint	O
and	O
the	O
query	B-Protocol
string	I-Protocol
form	O
a	O
URL	O
that	O
determines	O
how	O
the	O
API	B-Application
will	O
respond	O
.	O
</s>
<s>
This	O
URL	O
is	O
also	O
known	O
as	O
a	O
query	O
or	O
an	O
API	B-Application
call	O
.	O
</s>
<s>
In	O
the	O
below	O
example	O
,	O
two	O
parameters	O
are	O
transmitted	O
(	O
or	O
passed	O
)	O
to	O
the	O
API	B-Application
via	O
the	O
query	B-Protocol
string	I-Protocol
.	O
</s>
<s>
The	O
first	O
is	O
the	O
required	O
API	B-General_Concept
key	I-General_Concept
and	O
the	O
second	O
is	O
an	O
optional	O
parameter	O
—	O
the	O
date	O
of	O
the	O
photograph	O
requested	O
.	O
</s>
<s>
Visiting	O
the	O
above	O
URL	O
in	O
a	O
web	B-Application
browser	I-Application
will	O
initiate	O
a	O
GET	O
request	O
,	O
calling	O
the	O
API	B-Application
and	O
showing	O
the	O
user	O
a	O
result	O
,	O
known	O
as	O
a	O
return	B-Language
value	I-Language
or	O
as	O
a	O
return	O
.	O
</s>
<s>
This	O
API	B-Application
returns	O
JSON	B-General_Concept
,	O
a	O
type	O
of	O
data	O
format	O
intended	O
to	O
understood	O
by	O
computers	O
,	O
but	O
which	O
is	O
somewhat	O
easy	O
for	O
a	O
human	O
to	O
read	O
as	O
well	O
.	O
</s>
<s>
In	O
this	O
case	O
,	O
the	O
JSON	B-General_Concept
contains	O
information	O
about	O
a	O
photograph	O
of	O
a	O
white	O
dwarf	O
star	O
:	O
</s>
<s>
The	O
above	O
API	B-Application
return	O
has	O
been	O
reformatted	O
so	O
that	O
names	O
of	O
JSON	B-General_Concept
data	O
items	O
,	O
known	O
as	O
keys	O
,	O
appear	O
at	O
the	O
start	O
of	O
each	O
line	O
.	O
</s>
<s>
Following	O
the	O
above	O
URL	O
,	O
a	O
web	B-Application
browser	I-Application
user	O
would	O
see	O
this	O
photo	O
:	O
</s>
<s>
Although	O
this	O
API	B-Application
can	O
be	O
called	O
by	O
an	O
end	O
user	O
with	O
a	O
web	B-Application
browser	I-Application
(	O
as	O
in	O
this	O
example	O
)	O
it	O
is	O
intended	O
to	O
be	O
called	O
automatically	O
by	O
software	O
or	O
by	O
computer	O
programmers	O
while	O
writing	O
software	O
.	O
</s>
<s>
JSON	B-General_Concept
is	O
intended	O
to	O
be	O
parsed	B-Language
by	O
a	O
computer	O
program	O
,	O
which	O
would	O
extract	O
the	O
URL	O
of	O
the	O
photograph	O
and	O
the	O
other	O
metadata	O
.	O
</s>
