Upstash Documentation home page
Search...
⌘K
Ask AI
Discord
Blog
X
Console
Console
Search...
Navigation
Bitmap
GETBIT
General
Redis
Kafka
Vector
QStash
SDKs
Developer API
Overall
Overview
SDKs
Typescript
@upstash/redis
Overview
Get Started
Commands
Overview
Auth
Bitmap
BITCOUNT
BITOP
BITPOS
GETBIT
Generic
Hash
Json
List
PubSub
Scripts
Server
Set
Sorted Set
Stream
String
Transactions
Deployment
Pipeline
Advanced
Retries
Troubleshooting
Developing or Testing
@upstash/query
@upstash/vector
@upstash/edge-flags
@upstash/ratelimit
@upstash/kafka
@upstash/qstash
Python
DevOps
Terraform
Pulumi
CLI
Example
Copy
Ask AI
const
bit
=
await
redis
.
getbit
(
key
,
4
);
Bitmap
GETBIT
Retrieve a single bit.
Example
Copy
Ask AI
const
bit
=
await
redis
.
getbit
(
key
,
4
);
Arguments
key
string
required
The key of the bitset
offset
integer
required
Specify the offset at which to get the bit.
Response
The bit value stored at offset.
Example
Copy
Ask AI
const
bit
=
await
redis
.
getbit
(
key
,
4
);
Was this page helpful?
Yes
No
Suggest edits
Raise issue
BITPOS
DEL
Assistant
Responses are generated using AI and may contain mistakes.