String API
Platform Integrations

n8n

Call String from n8n's HTTP Request node — no community node to install.

n8n's built-in HTTP Request node calls String directly. There is nothing to install, and it works the same on n8n Cloud and self-hosted.

Store your key as a credential

Put the API key in a credential rather than typing it into the node, so it is encrypted at rest and reusable across workflows.

Create a Header Auth credential

Go to Credentials → Add credential and choose Header Auth.

Fill in the two fields

FieldValue
NameAuthorization
ValueBearer YOUR_API_KEY

The word Bearer and a single space are part of the value — without them the API answers 401.

Configure the node

Add an HTTP Request node and set:

FieldValue
MethodPOST
URLhttps://request.usestring.ai/v1/fetch
AuthenticationGeneric Credential Type
Generic Auth TypeHeader Auth
Credential for Header Auththe credential you created above
Send Bodyon
Body Content TypeJSON
Specify BodyUsing JSON

Then put the request in the JSON field:

{
  "url": "https://example.com/article",
  "format": "markdown"
}

To take the URL from an earlier node, switch the field to an expression:

{{ JSON.stringify({ url: $json.url, format: "markdown" }) }}

Use Specify Body → Using Fields Below for simple cases

Two or three top-level string fields are easier to read as separate Body Parameters. Switch to Using JSON when the body nests — jsonSchema and actions both do.

Read the response

With "format": "markdown" the page text arrives at {{ $json.data }}, ready for an AI node with no HTML handling in between.

Leave Response Format on Autodetect; String answers application/json, so n8n parses it without help. Set Response Format to Text only when you request "format": "raw" and want the original bytes untouched.

Handling failures

A blocked or missing page is a non-2xx response, which fails the node and stops the execution. Two options, depending on what the workflow should do:

  • Turn on Never Error to let every response through, then branch on {{ $json.statusCode }} with an If node.
  • Leave it off and use n8n's own Retry On Fail on the node.

Status codes and their bodies are listed in Access control.

Cutting executions

Every node run costs an execution, so fold work into the request instead of adding steps after it:

  • A jsonSchema in the body returns only the fields you want, removing a downstream parsing node entirely — see Structured extraction.
  • "format": "markdown" removes whatever HTML-cleaning steps would otherwise sit between the fetch and the model.