Feedly Python API Docs | dltHub
Build a Feedly-to-database pipeline in Python using dlt with AI Workbench support for Claude Code, Cursor, and Codex.
Last updated:
Feedly API is a flexible, easy-to-integrate REST API that enables you to automate workflows and seamlessly share threat intelligence. The REST API base URL is https://cloud.feedly.com/v3 and All requests require a Bearer token for authentication..
dlt is an open-source Python library that handles authentication, pagination, and schema evolution automatically. dlthub provides AI context files that enable code assistants to generate production-ready pipelines. Install with uv pip install "dlt[workspace]" and start loading Feedly data in under 10 minutes.
What data can I load from Feedly?
Here are some of the endpoints you can load from Feedly:
| Resource | Endpoint | Method | Data selector | Description |
|---|---|---|---|---|
| profile | /v3/profile | GET | Top-level object with user profile fields | |
| streams_contents | /v3/streams/contents | GET | items | Returns a list of articles |
| streams_ids | /v3/streams/ids | GET | ids | Returns a list of stream IDs |
| feeds_feed_id | /v3/feeds/:feedId | GET | Feed metadata object | |
| search_feeds | /v3/search/feeds | GET | results | Returns a list of search results for feeds |
| collections | /v3/collections | GET | Top-level array of collections | |
| markers_get_ids | /v3/markers/ids | GET | Returns IDs of saved markers | |
| tags | /v3/tags | GET | Top-level array of tags | |
| entries_get | /v3/entries/:entryId | GET | Single entry object | |
| ml_trend_discovery_trends | /v3/ml/trend-discovery/trends | POST | items/trends | Retrieve trends based on specific industries, filters, and sorting criteria (POST method, but relevant for data extraction) |
How do I authenticate with the Feedly API?
Access tokens are passed in the Authorization header as: Authorization: Bearer YourAccessToken. Tokens can be generated via the Feedly Self Service API page (Enterprise) or via the OAuth2 auth/token flow for user-level tokens.
1. Get your credentials
- If you are an Enterprise user, go to https://feedly.com/i/team/api (Self Service page). 2. Click 'New API Token' to generate a token and copy it, as it will only be shown once. 3. For user tokens, perform an OAuth2 flow: first, GET /v3/auth/auth to obtain a code, then POST /v3/auth/token with client_id=feedly, client_secret (application value), grant_type, and redirect_uri to receive access and refresh tokens.
2. Add them to .dlt/secrets.toml
[sources.feedly_source] token = "your_feedly_token_here"
dlt reads this automatically at runtime — never hardcode tokens in your pipeline script. For production environments, see setting up credentials with dlt for environment variable and vault-based options.
How do I set up and run the pipeline?
Set up a virtual environment and install dlt:
uv venv && source .venv/bin/activate uv pip install "dlt[workspace]"
1. Install the dlt AI Workbench:
dlt ai init --agent <your-agent> # <agent>: claude | cursor | codex
This installs project rules, a secrets management skill, appropriate ignore files, and configures the dlt MCP server for your agent. Learn more →
2. Install the rest-api-pipeline toolkit:
dlt ai toolkit rest-api-pipeline install
This loads the skills and context about dlt the agent uses to build the pipeline iteratively, efficiently, and safely. The agent uses MCP tools to inspect credentials — it never needs to read your secrets.toml directly. Learn more →
3. Start LLM-assisted coding:
Use /find-source to load data from the Feedly API into DuckDB.
The rest-api-pipeline toolkit takes over from here — it reads relevant API documentation, presents you with options for which endpoints to load, and follows a structured workflow to scaffold, debug, and validate the pipeline step by step.
4. Run the pipeline:
python feedly_pipeline.py
If everything is configured correctly, you'll see output like this:
Pipeline feedly_pipeline load step completed in 0.26 seconds 1 load package(s) were loaded to destination duckdb and into dataset feedly_data The duckdb destination used duckdb:/feedly.duckdb location to store data Load package 1749667187.541553 is LOADED and contains no failed jobs
Inspect your pipeline and data:
dlt pipeline feedly_pipeline show
This opens the Pipeline Dashboard where you can verify pipeline state, load metrics, schema (tables, columns, types), and query the loaded data directly.
Python pipeline example
This example loads streams_contents and profile from the Feedly API into DuckDB. It mirrors the endpoint and data selector configuration from the table above:
import dlt from dlt.sources.rest_api import RESTAPIConfig, rest_api_resources @dlt.source def feedly_source(token=dlt.secrets.value): config: RESTAPIConfig = { "client": { "base_url": "https://cloud.feedly.com/v3", "auth": { "type": "bearer", "token": token, }, }, "resources": [ {"name": "streams_contents", "endpoint": {"path": "v3/streams/contents", "data_selector": "items"}}, {"name": "profile", "endpoint": {"path": "v3/profile"}} ], } yield from rest_api_resources(config) def get_data() -> None: pipeline = dlt.pipeline( pipeline_name="feedly_pipeline", destination="duckdb", dataset_name="feedly_data", ) load_info = pipeline.run(feedly_source()) print(load_info)
To add more endpoints, append entries from the resource table to the "resources" list using the same name, path, and data_selector pattern.
How do I query the loaded data?
Once the pipeline runs, dlt creates one table per resource. You can query with Python or SQL.
Python (pandas DataFrame):
import dlt data = dlt.pipeline("feedly_pipeline").dataset() sessions_df = data.streams_contents.df() print(sessions_df.head())
SQL (DuckDB example):
SELECT * FROM feedly_data.streams_contents LIMIT 10;
In a marimo or Jupyter notebook:
import dlt data = dlt.pipeline("feedly_pipeline").dataset() data.streams_contents.df().head()
See how to explore your data in marimo Notebooks and how to query your data in Python with dataset.
What destinations can I load Feedly data to?
dlt supports loading into any of these destinations — only the destination parameter changes:
| Destination | Example value |
|---|---|
| DuckDB (local, default) | "duckdb" |
| PostgreSQL | "postgres" |
| BigQuery | "bigquery" |
| Snowflake | "snowflake" |
| Redshift | "redshift" |
| Databricks | "databricks" |
| Filesystem (S3, GCS, Azure) | "filesystem" |
Change the destination in dlt.pipeline(destination="snowflake") and add credentials in .dlt/secrets.toml. See the full destinations list.
Troubleshooting
Authentication Errors
- 401 Unauthorized: This error indicates a missing or invalid Bearer token. Ensure your
Authorizationheader is correctly formatted asAuthorization: Bearer YourAccessToken. - 403 Forbidden: This error suggests insufficient permissions or plan restrictions. Self-service API tokens are typically for Enterprise accounts.
Bad Requests
- 400 Bad Request: This error occurs due to invalid parameters, such as incorrect feed IDs. The error message will often provide more details, e.g.,
{"errorCode":400, "errorId":"ap11-sv2.2016122220.3175965","errorMessage":"invalid feed ids"}.
Rate Limiting
- 429 Too Many Requests: Feedly APIs are subject to rate limits, which vary by plan (e.g., up to 100,000 requests/month for Feedly Threat Intelligence customers). If you encounter this, you are exceeding your allocated request quota.
Pagination
- Endpoints that return long lists use
countandcontinuationfor pagination. A paginated response will typically includeid,updated,continuation, and anitemsarray. To retrieve subsequent pages, use thecontinuationtoken from the previous response in your next request.
Ensure that the API key is valid to avoid 401 Unauthorized errors. Also, verify endpoint paths and parameters to avoid 404 Not Found errors.
Next steps
Continue your data engineering journey with the other toolkits of the dltHub AI Workbench:
data-exploration— Build custom notebooks, charts, and dashboards for deeper analysis with marimo notebooks.dlthub-runtime— Deploy, schedule, and monitor your pipeline in production.
dlt ai toolkit data-exploration install dlt ai toolkit dlthub-runtime install
Was this page helpful?
Community Hub
Need more dlt context for Feedly?
Request dlt skills, commands, AGENT.md files, and AI-native context.