This API capitalizes each first letter of words in your text.
URL: https://api.apipip.com/v1/capitalize-words/
Parameters
Name | Description |
---|---|
text |
(Required) The text or sentence to be capitalized. |
Headers
Name | Description |
---|---|
X-Key |
(No required) |
How to use Capitalize Each Word API
import requests
# Define the API endpoint URL
url = 'https://api.apipip.com/v1/capitalize-words/'
# Define the text to capitalize
data = {
'text': 'hello world'
}
# Send a POST request to the API endpoint
response = requests.post(url, json=data)
print(response.text)
const url = 'https://api.apipip.com/v1/capitalize-words/';
const data = {
text: 'hello world'
};
fetch(url, {
method: 'POST',
body: JSON.stringify(data),
headers: {
'Content-Type': 'application/json'
}
})
.then(response => response.text())
.then(result => console.log(result));
import Foundation
let url = URL(string: "https://api.apipip.com/v1/capitalize-words/")!
var request = URLRequest(url: url)
request.httpMethod = "POST"
let data = ["text": "hello world"]
request.httpBody = try? JSONSerialization.data(withJSONObject: data)
request.addValue("application/json", forHTTPHeaderField: "Content-Type")
let task = URLSession.shared.dataTask(with: request) { (data, response, error) in
if let data = data {
if let result = String(data: data, encoding: .utf8) {
print(result)
}
}
}
task.resume()
API Response
{"capitalized_text":"Hello World"}
Note: The API works with all programming languages